Sort generated file maps by file basenames #45
Merged
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.
Description of the Change
This change adds basic sorting to the contents of generated file maps (which appear in assets libraries and tests). This is nice to have to ensure each time Spider builds, it creates lists of files in the same order every time.
I need this because in my project we would like to run
spider build
in CI to make sure the developer has regenerated all assets. We usegit diff
to make sure the assets are synced correctly, and without sorting we get a lot of false errors.Alternate Designs
This is the simplest change I could think of.
Why Should This Be In Core?
It's a small change which adds consistency and predictability for users of the package.
Benefits
Consistency, predictability, ability to use reliably within CI pipelines.
Possible Drawbacks
No long-term drawbacks that I can think of. Users moving to a version including this change might see a bit more noise in
git diff
the next time they run thespider build
command.Verification Process
spider build
following the changeApplicable Issues
N/A - happy to create one if needed.
Thanks for the useful project!