-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Fix sanity check specs warnings #2231
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
Conversation
It seems there is an issue with the last Bundler. I downgrade to 2.0.2 on my machine and I don't have the error anymore. |
62749f3
to
a5e0e26
Compare
Related issue for bundler rubygems/bundler#7487 |
5adc963
to
ff2929f
Compare
Sorry for the noise. I will look at JRuby errors. |
Just a heads-up regarding |
@pirj I don't think we need to change this part anymore. We still have this kind of noise.
With --- a/spec/sanity_check_spec.rb
+++ b/spec/sanity_check_spec.rb
@@ -47,6 +47,7 @@ RSpec.describe "Verify required rspec dependencies" do
FileUtils.chmod 0777, script
bundler_env do
+ puts `bundle exec #{script} 2>&1`
expect(`bundle exec #{script} 2>&1`).to be_empty
expect($?.exitstatus).to eq(0)
end But where are those dependencies? It seems this noise come from other gemspec of dependencies of gems we install. If think we should rewrite this test. |
@benoittgt I meant that some Travis build jobs get stuck and fail with timeout while trying to read user input from console on build setup stage. It currently fails on 2.6.3 and 2.3.8 builds. I'll debug it later today. |
This comment has been minimized.
This comment has been minimized.
f441a34
to
aeb5cf2
Compare
@@ -1,6 +1,6 @@ | |||
function run_cukes { | |||
if is_mri_192_plus; then | |||
bin/rake acceptance --trace | |||
(unset RUBYOPT; bin/rake acceptance --trace) |
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.
Ok I see why that was recommended in the bundler thread, this becomes a question of do we want to keep disabling rubygems on rspec-rails, I mean if rails depends on bundler, and bundler depends on rubygems...
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.
Do we now need to add require rubygems instead?
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.
I believe it's required by default unless you set --disable=gems
in RUBYOPT
.
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.
do we want to keep disabling rubygems on rspec-rails
I don't think we have to. But this is a change we have to address on rspec-dev.
I tried to readd only rubygems as an option but I get warnings. unset
seems to be a good option.
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.
This is the only build we have an issue with so it doesn't need to be propagated.
Avoid: Failures: 1) Verify required rspec dependencies passes when libraries are required Got 1 failure and 1 other error: 1.1) Failure/Error: expect(`bundle exec #{script} 2>&1`).to be_empty expected `"WARNING: open-ended dependency on activesupport (>= 4.2) is not recommended\n if activesupport is ... 'railties', '~> 4.2'\nWARNING: See http://guides.rubygems.org/specification-reference/ for help\n".empty?` to return true, got false
On Bundler 2.1.0 the loading of rubygems has been rewritten. It breaks our existing usage of command execution. The --disable=gem flag is problematic because we need to load rubygems in Bundler. It is not explicitly loaded in Bundle 2.1.0 Related: - rubygems/bundler#7487
aeb5cf2
to
0007e19
Compare
I cherry-picked my suggested version of this to another PR, #2240 and merged it because I'm working on fixing the other builds, but I think this is getting closer to fixing rails too. |
d246c82
to
9c13baf
Compare
This is so broken.
🤦🏼♂️ We have the again the issue where it seems we have bundler 2.1.0 and bundler 2.1.1 installed and the default bundler is 2.1.0?
Locally I have: $ gem list | grep '^bundler ('
bundler (2.1.1, 2.1.0, 2.0.2)
$ bundle exec rake cucumber
/Users/bti/.rvm/rubies/ruby-2.6.3/bin/ruby -S bundle exec cucumber --tag ~@rails_pre_5.1 --tag ~@rails_pre_5 --tag ~@rails_pre_6
Using the default profile...
................... (no errors) |
It's worst than before. Good output:
But after
I have to move and could not probably look at it today, but tomorrow. Feel free to remove my commits. |
4ec4160
to
02a7a6b
Compare
This reverts commit be5a2c5.
Hey @mvz, can you please take a look? We're experiencing a weird issue:
After reverting aruba update commit, this problem disappears. |
d1f8e95
to
18e15b1
Compare
That is strange. @pirj any idea how to reproduce this locally? |
I think what happens is that bundler now sets more env vars than aruba knows to unset. I'll be trying out some fixes in #2241. |
Thanks for the quick response! |
It was introduced to avoid build failure on 2.4 suggesting to update json gem. Let's see if it comes up again.
@mvz Jon asked the question about ENV vars but without clear answer rubygems/bundler#7487 (comment) I am trying at the moment to look at difference between 2.0 and 2.1 but the diff is big. rubygems/bundler@2-0-stable...2-1-stable |
Congrats @pirj that's much better! Edit: I am trying to reproduce locally. |
With Rubygems 3.1 we see on JRuby warnings on every gem commands like: ``` NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. Gem::Specification#rubyforge_project= called from /Users/bti/.rvm/rubies/jruby-head/lib/ruby/gems/shared/specifications/default/json-2.2.0-java.gemspec:18. ``` As a temporary fix we downgrade to 3.0.6, waiting for a json dependency updated. Related: - rubygems/rubygems#2798 - rubygems/rubygems#2984 (comment)
If you're able to update the JSON gem to 2.3.0, it should resolve that problem. They stopped using the deprecated |
@duckinator but even if I update |
Closing, in favor of #2244 |
Thanks for all your work here @pirj @benoittgt and @mvz I tried to cherry-pick your commits for #2244 where possible, I just wanted the minimal changes to fix the build. |
I am happy with the final result. I think we should open a new discussion on how the build is written. I would love to be able to more easily run the build locally, and run each step without looking at shell functions or Rakefile. Like simply copy paste one line from travis logs. |
@benoittgt more than happy for you to look at that :) |
Fix build errors on sanity check specs.
Bundler.with_clean_env
is deprecatedopen-ended dependency