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
Preferences and plugins not reloaded after saving them when package folder is symlinked #1154
Comments
Seems to be an isolated issue since it has always worked fine for me. (Win7, 3109) By the way, your quoted text not appearing is expected since ST does not need to reload a changed file from disk if it changed the file by itself. The expected message would be |
Sublime Text 3109 on OS X. Opened settings file, changed font size and saved the file. Sublime Text resized the font correctly. If I create an error in the JSON, I get a warning immediately as a popup indicating the error. I also tested adding gibberish to the JSON file, then changing the font size via the menu. Sublime Text properly re-wrote the settings file from memory, removing the gibberish. |
Perhaps post the full contents of your console? This may help in identifying any issues. |
@wbond It can be related to Settings not reloading. Sublime doesn't reload settings if the |
Note that I symlinked the entire Packages folder, which is probably the reason why it worked for me despite syncing over Dropbox. |
I can confirm the original issue with ST3, Build 1342, 64Bit on Windows 10, 64 bit. If I only symlink the user folder than ST won't recognise the changes and they will only be in effect after an restart. I tried the workaround from FichteFoll to symlink the whole packages directory that contains the user directory. That works and ST3 will immediately notice the changed settings upon saving. |
Thanks a lot for this tip, a warning for this should be in the docs too imo. Also, if you go the full In my case for ex. I use Syncthing (which is awesome btw) with the following ignore rules:
|
In https://packagecontrol.io/docs/syncing creating a symlink for the User directory is actively encouraged. Therefore a user can/must consider a symlinked package folder (User in this case) not to have any negative impact. When opening the Packages folder as project all files in the sidebar withing the User package are not updated as well. Neigher deleted, renamed nor added files are recognized. Sidebar gets out of sync. With those two facts in mind, I ask myself whether this issue points to a minor enhancement or rather a major bug?! |
Imo the instructions on https://packagecontrol.io/docs/syncing are just misleading since this has never worked. I hardlinked my configuration files for syncing them with git. See FichteFoll/dotfiles@4b518e8 for details. |
This issue drives the description on https://github.com/sublimehq/Packages how to use single packages from this repository useless. It is a pain to work with such packages and need to restart ST after each change. By copying the packages to ST you loose any opportunity to commit changes. |
I've double checked this, both in the code, and tested it myself. On Mac, as of build 3157, symlinks are traversed properly and events are handled correctly. I've test symlinking individual package folders (including User) along with the whole Packages and Installed Packages folders. This also explains why when I tested the Package Control syncing instructions, they worked fine, since I was using a Mac at that point. From reading the source, the code to handle symlinks on Macs has been as part of ST3 since some time in 2012. There have been some tweaks since then, but mostly to handle edge-case bugs. Windows and Linux, however, do not handle symlinked folders within the data folder. This will be addressed. However, this issue here is about a Mac. So my belief is either than something else on @JohannesMP's machine was causing an issue, or there was a bug in Apple's FSEvent library. There has been a report of symlinking to Dropbox on Mac would cause an issue also. I've tested that, and on macOS Sierra and the latest version of Dropbox, everything work properly. |
It would be nice if we could keep this issue about all platforms as multiple users, including myself (on both Windows and Linux) have indicated that they are suffering from this. There doesn't seem to be an issue for the general case, so let's just have #187 closed and keep this open as the general one. Otherwise we'd need a new separate one. |
This was fixed in build 3158. |
I recently made the switch to changing my hardlinked config files to symlink, but had to realize that ST only seems to be capable of monitoring symlinked directories, not individual files. The changelog of 3158 has this to say:
However, when I change my Default keymap (or settings file) that is symlinked, the settings are not reloaded. That's quite unfortunate. Should I open a new issue for this, @wbond? According to @OdatNurd, this seems to occur with settings, keymaps and command files, but not with menus for some reason. |
I don't know why menus wouldn't be affected. And yes, you should open a new enhancement request. We don't check individual files for symlinking on any platform. |
On mac, Build 3103 I'm having an issue where when I manually open, edit and save the user preferences file, the new saved settings are not applied. Furthermore, any actions that would modify the preferences result in the old preferences overriding the new ones I modified.
For example, I am able to type complete garbage in the preferences file, save it, and not receive JSON warnings as I would have in the past.
More frustratingly, any valid changes made to the preferences file, even just changing the
font_size
value manually, are ignored and replaced the next time an action modifies it, such asSublime Text->Preferences->Font->Larger
.Demo of both typing garbage as well as attempting to modify just the font size:
It used to be that modifying the preferences file would simply re-load it, and any invalid JSON would result in an error immediately. I would like the old behavior back.
It should be noted that the message
reloading /Users/USER/Library/Application Support/Sublime Text 3/Packages/User/Preferences.sublime-settings
does not appear in the console after manually editing and saving the file.The only package I have installed is "Tomorrow Color Schemes", and this issue occurs even without it.
The text was updated successfully, but these errors were encountered: