Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Ignore bundler warnings on windows #281

Merged
merged 2 commits into from
May 26, 2016
Merged

Ignore bundler warnings on windows #281

merged 2 commits into from
May 26, 2016

Conversation

JonRowe
Copy link
Member

@JonRowe JonRowe commented May 24, 2016

Currently windows builds get broken by a bundler warning

@JonRowe JonRowe force-pushed the ignore_bundler_warnings branch 3 times, most recently from 53405e6 to c1ef271 Compare May 25, 2016 11:34
@JonRowe JonRowe force-pushed the ignore_bundler_warnings branch from 4131233 to 79fe672 Compare May 25, 2016 12:03
@JonRowe
Copy link
Member Author

JonRowe commented May 26, 2016

/cc @rspec/owners this fixes the build issues with appveyor, feedback welcome

l =~ %r{bundler/(source/)?rubygems} ||
# Ignore bundler + rubygems warning.
l =~ %r{site_ruby/\d\.\d\.\d/rubygems} ||
l =~ %r{lib/bundler/rubygems}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the l =~ %r{bundler/(source/)?rubygems} line will match anything this regex was match -- so do we really need it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why the first regex doesn't work, but it doesn't :/

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's an example of a string that matches this but not the first?

Sent from my iPhone

On May 25, 2016, at 6:02 PM, Jon Rowe [email protected] wrote:

In lib/rspec/support/spec/library_wide_checks.rb:

@@ -68,8 +68,13 @@ def load_all_files(files, preamble, postamble=nil)
run_ruby_with_current_load_path(command, *options)
end

  • Ignore bundler warning.

  • stderr = stderr.split("\n").reject { |l| l =~ %r{bundler/source/rubygems} }.join("\n")
  • stderr = stderr.split("\n").reject do |l|
  •  # Ignore bundler warning.
    
  •  l =~ %r{bundler/(source/)?rubygems} ||
    
  •  # Ignore bundler + rubygems warning.
    
  •  l =~ %r{site_ruby/\d.\d.\d/rubygems} ||
    
  •  l =~ %r{lib/bundler/rubygems}
    
    I'm not sure why the first regex doesn't work, but it doesn't :/


You are receiving this because you are on a team that was mentioned.
Reply to this email directly or view it on GitHub

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lib/bundler/rubygems I only added it because the regex wasn't catching that on windows

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rubular reports that that matches:

http://rubular.com/r/T5HRERvB54

Do regexes work differently when MRI is compiled on windows?

Anyhow, can you add a comment explaining why this extra regex is needed even though it looks like it shouldn't be?

@JonRowe JonRowe force-pushed the ignore_bundler_warnings branch from 79fe672 to b8e5016 Compare May 26, 2016 06:17
@JonRowe
Copy link
Member Author

JonRowe commented May 26, 2016

Updated.

@myronmarston
Copy link
Member

LGTM, merge when green.

@JonRowe JonRowe merged commit 322c846 into master May 26, 2016
@JonRowe JonRowe deleted the ignore_bundler_warnings branch May 26, 2016 06:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants