-
-
Notifications
You must be signed in to change notification settings - Fork 51
fix(#351) install via commit(-ish)/hash
#352
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
base: master
Are you sure you want to change the base?
Conversation
|
This was my initial call too. I figured to check other sections of the CodeBase as I've been working with it on and off for awhile now & figured I'd triple check the actual RegEx that we're compiling. I would say it's a bug as we're not (originally) enforcing the existence of the full stop during parsing. Rust aims to move as much of its validation logic, or really any logic that it can, to compile time, over procedural validations and relying on ordering of checks. Procedural validations can be dangerous in that they allow for invalid states to exist (often way too far into the program lifespan). Rust has ample tools to enforce this via enums & matches-even things like the Ord trait are available if so desired. Relying on match check ordering without a way to enforce it at compile time is bugs waiting to happen for sure. |
e2866d7 to
c0c74dc
Compare
install via commit(-ish)/hashinstall via commit(-ish)/hash
c0c74dc to
686e882
Compare
686e882 to
4306b5e
Compare
|
Just so im up to date with the approach used to fix the issue, to clarify the issue, the thing that failed identifying the hash was because the previous regex pattern didn't enforce dots? |
|
Correct, I've tested this locally with all commands that make use of the call. |
Summary
Closes: #351
This pull request includes the following changes:
Details
This pull request addresses a bug identified in #351, where the commitish regex did not enforce the presence of dots between version numbers. The updated regex now requires dots, ensuring that version strings like "1.0.0" are correctly recognized.
This was done by changing the regex pattern from using a
(\.)?to(\.)+, ensuring that at least one dot is present between version segments. Reaming repeats of dots are handled by the appended{_,_}number quantifier.