Add 'plist-load' feature, analogous to existing 'yaml-load' feature #345
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.
Why do this?
The
plist
package thatsyntect
currently unconditionally depends brings in several dependencies on its own, the heaviest beingxml-rs
. For use cases where loading of themes is not needed, it is pleasant to not have to compile unneeded dependencies.This new
plist-load
feature is very similar to the existingyaml-load
feature, both in purpose, and how it is implemented. Whereasyaml-load
is for syntax definitions,plist-load
is for themes and theme preferences.Public API is not affected
I have taken care not to change the public API (with all features enabled) with this change.
That the public API has not changed (at least not in terms of added/removed/moved items) can be verified with this little oneliner:
Example of usefulness in practice
To demonstrate that this feature is useful, I recommend to compare the number of dependencies you have to build when you do this:
Before this change, you need to build 68 dependencies. After this change, it is only necessary to build 52 dependencies.
Guide to Code Review
I recommend to Code Review each commit in this PR individually.
The first two commits are simple refactorings. The third commit just cuts and pastes code around. The fourth commit introduces the
plist-load
feature, and also adds an automated CI test for this feature.