Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Progress on #951 continues, and I now have work-in-progress code where
syntaxes.bin
has been removed, and every syntax is present inminimal_syntaxes.bin
. Notably, without duplicates, so the size ofminimal_syntaxes.bin
is the same assyntaxes.bin
, differing only by some tens of kbs. See Enselic#38.While there still are problems to solve, I am confident in some parts of the code, and will
startcontinue to create separate PRs to take the code base in that direction. (Actually, #1856 is also this kind of PR.)This PR consists of three commits. The first commit just renames stuff in preparation for the third commit. The second commits just moves code around a bit to fit better with the third commit. The "real" code is in the third commit. It adds code to add information about what dependents a syntax has. For example, the Rust syntax is a dependent for the Markdown syntax, because Markdown depends on Rust via
embed: scope:source.rust
.Knowing the dependents of a syntax is useful when constructing
SyntaxSet
s without duplicateSyntaxReference
s (and is used in Enselic#38).While this code adds info about syntax dependents, there is a temporary env var flag that makes it not used yet when building assets. The env var will be removed later, and the dependents info will start being used when building assets.