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

fix: remove comments from whole file instead of line by line for performance #1198

Merged
merged 1 commit into from Apr 8, 2022

Conversation

blopker
Copy link
Contributor

@blopker blopker commented Apr 7, 2022

Summary

This change uses 1 call to sed for the whole .tool-versions file instead of for each line. This can substantially speed up file parsing if there are many comments in a file. I also had an issue with the current root .tool-verisons file not installing bats correctly because of the leading v.

Fixes: List issue numbers here

This fixes issue #1195.

Changes:

  • Remove comments from whole .tool-versions at once instead of line by line for performance
  • Remove the leading v from the root .tool-versions file to help asdf resolve it correctly.

@blopker blopker requested a review from a team as a code owner April 7, 2022 22:42
@blopker blopker changed the title Fix #1195: remove comments from whole file instead of line by line for performance fix: remove comments from whole file instead of line by line for performance Apr 7, 2022
@blopker blopker force-pushed the feature/feature/comment-parse branch from 2c0858f to e0d8d1e Compare April 7, 2022 22:48
@Stratus3D
Copy link
Member

This is excellent @blopker !

@Stratus3D Stratus3D merged commit de6e22f into asdf-vm:master Apr 8, 2022
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

2 participants