I seem to be having a problem with my now published package. When I try to install it from Package Control, and then have a VHDL file, I get the following error: error: Error loading syntax file "Packages/vhdl_mode/VHDL.sublime-syntax": Unable to read Packages/vhdl_mode/VHDL.sublime-syntax
. Now, I’ve looked at the .sublime-package
file and the VHDL syntax is in there.
The only clue I’ve got is that Package/vhdl_mode
is where I used to develop it. Is there something in Sublime that would have saved a reference to that?
EDIT: Actually, I might have found it. I’d opened ST3 and had a bunch of VHDL files already loaded. They were all with white lettering. However if I clicked the language tile in the corner and RESELECTED the language, they’re okay. Is the source of the syntax stored in the workspace?
EDIT2: Well hell, there is another error. The Python main file is not loading properly now, when it worked fine in its own directory. It has to do with the import scoping.
So during all of development, I kept everything in the packages directory under User/vhdl_mode
. I discovered that when I was loading my secondary packages, I ended up having to scope them under the package name. So I have the following lines:
import vhdl_mode.vhdl_lang as vhdl
import vhdl_mode.vhdl_util as util
However now when ST3 starts up, it’s creating the error:
Traceback (most recent call last):
File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 109, in reload_plugin
m = importlib.import_module(modulename)
File "./python3.3/importlib/__init__.py", line 90, in import_module
File "<frozen importlib._bootstrap>", line 1584, in _gcd_import
File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 915, in load_module
exec(compile(source, source_path, 'exec'), mod.__dict__)
File "vhdl_mode in C:\Users\mnorton\AppData\Roaming\Sublime Text 3\Installed Packages\VHDL Mode.sublime-package", line 16, in <module>
ImportError: No module named 'vhdl_mode'
Does the import hierarchy change when in a Package Control repository?
EDIT3: I changed the title to be more relevant. I think the language setting had to be due to the fact I had a workspace already initiated. Every other VHDL file after that was lexically handled. My commands are screwed but that’s a different error.