-
Notifications
You must be signed in to change notification settings - Fork 623
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
Use the same feature name validation rule from Cargo #7500
Use the same feature name validation rule from Cargo #7500
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔢 Self-check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔢 Self-check again
This PR is ready for review. |
unfortunately this PR still mixes the refactoring of the error messages with the change of the validation rules. reviewing commit-by-commit does not help because 2765157 does both at the same time too. this makes it significantly harder to see which change belongs to the error message refactoring and which change belongs to the validation rules change. |
I have to change the error because now we support the Unicode character in the feature name. I don't see any benefits to keeping that unclear error message.
It's just two functions with about 50 line changes. And I just copied it from the Cargo repo. I think it's a waste of time, so I'm closing my PR. |
I'm not saying "don't do it". I'm just saying do one after the other. If adding support for the unicode character requires us to refactor our error handling then refactor the error handling first, commit that, and then implement the behavior change on top. This makes it significantly easier to review and less likely to introduce unintentional bugs. |
I can get your point. If this is a new feature or a really big change to the rules. I think it makes sense. But you asking me to split 30 lines of code which I copied from Cargo into two commits. I don't think it makes sense. It is wasting our time. I have spent a bunch of time making sure I can help the reviewing process. And I keep receiving negative feedback from my pull request. You just keep asking to change every line code in your approach. Nobody can 100% follow your code style to write code. It's just 30 lines of code. And I didn't break any tests and also added a lot of tests to check it. so I am so frustrated to move forward with this PR. So I decided to close it. |
Thank you for taking the time to review it. |
Let me try it agian:( |
249ec92
to
5f415c2
Compare
☔ The latest upstream changes (presumably #7206) made this pull request unmergeable. Please resolve the merge conflicts. |
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
invalid_feature and invalid_feature_name both for test invalid feature name. So we can use the same prefix for them. Signed-off-by: hi-rustin <rustin.liu@gmail.com>
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
7a03809
to
cc5ed5e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebased to fix the lockfile merge conflict. I have a couple more suggestions on how to improve the code, but those can be added afterwards as well.
Split from #7379
.
in the feature name. I added some unit tests and integration tests for it.The summary:
_
, or0
to9
2. can only contain numbers,
+
,-
,_
,.
, or most letters+
,-
,_
, or most letters_
, or0
to9
2. can only contain numbers,
+
,-
,_
,.
, or most letters