Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes the plugin doesn't detect when a flow file has been set #4

Closed
hamaluik opened this issue Apr 24, 2015 · 2 comments
Closed

Comments

@hamaluik
Copy link

Right clicking on a flow file and setting it as the current flow project does't always work—no errors or warnings are issued, just the command doesn't do anything (trying to check flow status says "no flow file, specify a flow file first".

Seems somewhat random. I can only sometimes replicate this by having a folder open which is not a flow project, then opening a folder with a flow file in a new window. Setting the project in the new window does not work.

It almost seems like it may have something to do with length of time a window / folder has been open?

@ghost
Copy link

ghost commented May 2, 2015

Came here to report the same issue. I've been noticing this output in Sublime's console on startup:

reloading plugin sublime_flow.flow
[flow] loaded show status
[flow] loaded set target build
[flow] loaded set project file
[flow] loaded run build
[flow] loaded generate import
<sublime_flow.flow.FlowProject object at 0x7fab15234110>
[flow] __init__
reloading plugin sublime_flow.haxe_parse_completion_list
reloading plugin sublime_haxe.haxe_completion
hello haxe completion
[haxe completion] __init__
plugins loaded
Traceback (most recent call last):
  File "flow in /home/name/.config/sublime-text-3/Installed Packages/sublime_flow.sublime-package", line 49, in <lambda>
  File "flow in /home/name/.config/sublime-text-3/Installed Packages/sublime_flow.sublime-package", line 57, in check_for_last_used_flow_file
AttributeError: 'NoneType' object has no attribute 'get'

If it matters, I'm running Sublime build 3083 on Ubuntu 15.04 64-bit, although I noticed it on 14.04 as well.

@ruby0x1
Copy link
Member

ruby0x1 commented May 2, 2015

Thanks for the info @aivukuro

For general info,
The latest version of the plugin has two issues that sometimes overlap so it can be confused for both or none.

One of them is HaxeFoundation/haxelib#207
which causes the internal query to flow info to fail, as haxelib crashes because sublime uses "user data" paths on windows/osx, which include spaces.

This only applies on newer (3.2.x related) versions.

The other relates to the recent code, specifically check_for_last_used_flow_file, which is supposed to remember the last used flow file and re-use it but it seems that the code is a bit presumptuous - it assumes the window you have open on launch was the one that stored the state, but the state is window specific, and i'm not even sure if that persists across sessions if you're not using a project file. What that leads to is it trying to remember but failing, and sometimes causing real attempts to fail as well.

The latter issue will be resolved soon, I have been fixing that and it will be up in a automatic update when its done.

@ruby0x1 ruby0x1 closed this as completed Nov 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants