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

Skip gemspec validations that warn except when on a gem authoring context #3668

Merged
merged 7 commits into from Jun 2, 2020

Conversation

deivid-rodriguez
Copy link
Member

@deivid-rodriguez deivid-rodriguez commented May 29, 2020

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 to Gem::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:

  • Describe the problem / feature
  • Write tests
  • Write code to solve the problem
  • Get code review from coworkers / friends

I will abide by the code of conduct.

@deivid-rodriguez deivid-rodriguez changed the title Skip warning validations Skip gemspec validations that warn except when on a gem authoring context May 29, 2020
@simi
Copy link
Member

simi commented 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.

@deivid-rodriguez
Copy link
Member Author

If there's no objections to do this, I think the coverage is fine. All these validations are quite thoroughly tested I believe.

@deivid-rodriguez
Copy link
Member Author

@bronzdoc Could you review again ♻️ ?

@deivid-rodriguez
Copy link
Member Author

Ok, let's do this!

@deivid-rodriguez deivid-rodriguez merged commit 3cf7607 into master Jun 2, 2020
@deivid-rodriguez deivid-rodriguez deleted the skip_warning_validations branch June 2, 2020 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Programs using "bundle ruby" start slower with proprietary gemspec licenses
4 participants