-
Notifications
You must be signed in to change notification settings - Fork 589
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
[JavaScript] Move JSON out of the JavaScript package. #1771
Comments
Also worth thinking about #285 when this is considered. |
All included sublime-syntax files I've seen so far have been used without path. Something like In case of a stub file, I think
|
It would still need a base scope, but other than that I suppose it should work. Since "JSON" comes after "JavaScript" the new one would take priority. |
As suggested in issue sublimehq#1771 this commit moves the JSON syntax into a dedicated package in order to be able to disable either JavaScript or JSON independently. This commit does not yet create the suggested compatibility redirection within the JavaScript package. The decision about it is left to the core devs right now 1. as it would cause a duplicated syntax file 2. a quick search within packagecontrol.io did not reveal any packages depending on the builtin JavaScript/JSON.sublime-syntax 3. the location of the sublime-syntax file should not be too important if it is imported via `scope:source.json` or its name `JSON.sublime-syntax` only. Conflicts would be caused only if it was imported via `Packages/JavaScript/JSON.sublime-syntax` which is easy to fix.
As suggested in issue sublimehq#1771 this commit moves the JSON syntax into a dedicated package in order to be able to disable either JavaScript or JSON independently. This commit does not yet create the suggested compatibility redirection within the JavaScript package. The decision about it is left to the core devs right now 1. as it would cause a duplicated syntax file 2. a quick search within packagecontrol.io did not reveal any packages depending on the builtin JavaScript/JSON.sublime-syntax 3. the location of the sublime-syntax file should not be too important if it is imported via `scope:source.json` or its name `JSON.sublime-syntax` only. Conflicts would be caused only if it was imported via `Packages/JavaScript/JSON.sublime-syntax` which is easy to fix.
Note from wbond: initial work on splitting JSON happened in 9c44e60, this ties up some loose ends. As suggested in issue #1771 this commit moves the JSON syntax into a dedicated package in order to be able to disable either JavaScript or JSON independently. This commit does not yet create the suggested compatibility redirection within the JavaScript package. The decision about it is left to the core devs right now 1. as it would cause a duplicated syntax file 2. a quick search within packagecontrol.io did not reveal any packages depending on the builtin JavaScript/JSON.sublime-syntax 3. the location of the sublime-syntax file should not be too important if it is imported via `scope:source.json` or its name `JSON.sublime-syntax` only. Conflicts would be caused only if it was imported via `Packages/JavaScript/JSON.sublime-syntax` which is easy to fix.
Can be closed since #1805 has been merged. |
Closes sublimehq#1555 (fixed) Closes sublimehq#1671 (fixed by core) Closes sublimehq#1696 (fixed) Closes sublimehq#1699 (fixed) Closes sublimehq#1771 (fixed) Closes sublimehq#2034 (fixed) Closes sublimehq#2329 (fixed) Closes sublimehq#2550 (invalid)
This has been completed |
Note from wbond: initial work on splitting JSON happened in 9c44e60, this ties up some loose ends. As suggested in issue sublimehq#1771 this commit moves the JSON syntax into a dedicated package in order to be able to disable either JavaScript or JSON independently. This commit does not yet create the suggested compatibility redirection within the JavaScript package. The decision about it is left to the core devs right now 1. as it would cause a duplicated syntax file 2. a quick search within packagecontrol.io did not reveal any packages depending on the builtin JavaScript/JSON.sublime-syntax 3. the location of the sublime-syntax file should not be too important if it is imported via `scope:source.json` or its name `JSON.sublime-syntax` only. Conflicts would be caused only if it was imported via `Packages/JavaScript/JSON.sublime-syntax` which is easy to fix.
The JSON syntax definition, tmPreferences, and tests are inside the JavaScript directory. This means that a user can't disable the JavaScript package (e.g. when using a third-party package) without also disabling the core JSON syntax (and vice versa).
JSON had its roots in JavaScript, but it is nowadays used for all sorts of things. I think that it would make sense to promote JSON to its own default package. There is no module named "JSON" in the Package Control channel, so there should be no serious risk of conflict.
Some third-party code could be hardcoding the location of
JSON.sublime-syntax
. If this is a concern, we could leave a stub at that location:The text was updated successfully, but these errors were encountered: