Sublime Forum

BUG "Installated Packages/*.sublime-package" filenames

#1

I recently had an email informing me that a plugin I manage named Marked.app Menu wasn’t installing correctly into ST3 through Package Control. It works just fine if you clone the repo into the packages. Package Control installs the plugin into “~/Library/Application Support/Sublime Text 3/Installed Packages/Marked.app Menu.sublime-package” but when loading we see the following error:

reloading plugin Marked.app Menu.marked Traceback (most recent call last): File "/Applications/Sublime Text 3.app/Contents/MacOS/sublime_plugin.py", line 73, in reload_plugin m = importlib.import_module(modulename) File "X/importlib/__init__.py", line 88, in import_module File "<frozen importlib._bootstrap>", line 1577, in _gcd_import File "<frozen importlib._bootstrap>", line 1558, in _find_and_load File "<frozen importlib._bootstrap>", line 1505, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 313, in _call_with_frames_removed File "<frozen importlib._bootstrap>", line 1577, in _gcd_import File "<frozen importlib._bootstrap>", line 1558, in _find_and_load File "<frozen importlib._bootstrap>", line 1505, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 313, in _call_with_frames_removed File "<frozen importlib._bootstrap>", line 1577, in _gcd_import File "<frozen importlib._bootstrap>", line 1558, in _find_and_load File "<frozen importlib._bootstrap>", line 1522, in _find_and_load_unlocked ImportError: No module named 'Marked'

This appears to be because of the period in “Marked.app Menu.sublime-package” which leads me to believe that either sublime-package files should not contain periods or ST3 is determining the file-extension-less name incorrectly (presumably going by the position of the first period rather than the last). Or both?

0 Likes

#2

I’ve submitted a pull request to Package Control to further the conversation around this issue: github.com/wbond/package_contro … /pull/2524

0 Likes

#3

Obviously not a final fix (assuming the dot is the problem), but if you would like to make your plugin compatible, you can add a “.no-sublime-package” file to the top level of your repository. This flag tells package control to extract the plugin, rather than simply “installing” the sublime-package file.

0 Likes

#4

I wasn’t aware of that option, skuroda. That’d definitely do the job. I’ve opted to retitle the package in question in the mean-time, though I’ll forward your suggestion as a possible solution: don’t create sublime-package files for packages with a “.” in the name. Thanks

0 Likes