Skip to content
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

Sort generated file maps by file basenames #45

Merged
merged 1 commit into from Mar 7, 2022

Conversation

WSydnA
Copy link
Contributor

@WSydnA WSydnA commented Mar 4, 2022

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 use git 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 the spider build command.

Verification Process

  • Ran spider build following the change
  • Verified all assets were still generated
  • Verified the assets were listed alphabetically as expected

Applicable Issues

N/A - happy to create one if needed.

Thanks for the useful project!

@codecov-commenter
Copy link

Codecov Report

Merging #45 (308747a) into main (467e8e5) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #45      +/-   ##
==========================================
+ Coverage   86.42%   86.46%   +0.03%     
==========================================
  Files          11       11              
  Lines         361      362       +1     
==========================================
+ Hits          312      313       +1     
  Misses         49       49              
Impacted Files Coverage Δ
lib/src/dart_class_generator.dart 94.40% <100.00%> (+0.04%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 14de2ba...308747a. Read the comment docs.

Copy link
Owner

@BirjuVachhani BirjuVachhani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@BirjuVachhani BirjuVachhani merged commit bb15070 into BirjuVachhani:main Mar 7, 2022
@BirjuVachhani
Copy link
Owner

@WSydnA Thank you for your contribution. I'll release this soon. 😊

@BirjuVachhani
Copy link
Owner

@WSydnA This has been released in v2.2.2

@WSydnA
Copy link
Contributor Author

WSydnA commented Mar 14, 2022

@BirjuVachhani Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants