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
Skip gemspec validations that warn except when on a gem authoring context #3668
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deivid-rodriguez
changed the title
Skip warning validations
Skip gemspec validations that warn except when on a gem authoring context
May 29, 2020
Looks good to me! I'm a little worried about the test coverage of this change, but I have currently no idea how to make it better. I can take a look and rethink this later if needed. |
If there's no objections to do this, I think the coverage is fine. All these validations are quite thoroughly tested I believe. |
bronzdoc
reviewed
May 31, 2020
deivid-rodriguez
force-pushed
the
skip_warning_validations
branch
from
May 31, 2020 13:53
a1a378a
to
4d848a6
Compare
It's not so basic anymore, and it does much more than validating required fields.
deivid-rodriguez
force-pushed
the
skip_warning_validations
branch
from
May 31, 2020 14:03
4d848a6
to
f4fe949
Compare
@bronzdoc Could you review again ♻️ ? |
bronzdoc
approved these changes
Jun 2, 2020
Ok, let's do this! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
What was the end-user or developer problem that led to this PR?
As highlighted by #3664, gemspec validations can be slow.
What is your fix for the problem, implemented in this PR?
Also, gemspec validations are targeted to gem authors, not final users. That's (I guess) why bundler silences them when using
path
gems. It needs to validate them to make sure they are functional, but it's not interested in validation warnings.So, my proposal is to limit the "optional linting" than emits warnings to "gem packaging" contexts.
As per the implementation, I "reused" the
packaging
parameter toGem::Specification#validate
for this. The introduction of this parameter is not very explicit about its motivation, but I believe the intention was precisely to do something like this.Closes #3664.
Tasks:
I will abide by the code of conduct.