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

bump compression-webpack-plugin to ^4.0.0 #2695

Merged

Conversation

akoskm
Copy link

@akoskm akoskm commented Aug 13, 2020

@akoskm
Copy link
Author

akoskm commented Aug 13, 2020

@gauravtiwari I made this PR on top of https://github.com/rails/webpacker/tree/4-x-stable as you suggested. The build failures are the same for each job https://travis-ci.org/github/rails/webpacker/jobs/717516894 did I mess up something?

@DeeDeeG

This comment has been minimized.

@DeeDeeG
Copy link

DeeDeeG commented Aug 13, 2020

CI configs have a comment that is referring to this problem and explaining how it attempts to fix it.

webpacker/.travis.yml

Lines 3 to 9 in 8db818b

before_install:
- gem install rubygems-update && update_rubygems
# Rails 4.2 doesn't support bundler 2.0, so we need to lock bundler to
# v1.17.3. This is just for Ruby 2.5 which ships with bundler 2.x on Travis
# CI while Ruby 2.6 does not.
# https://github.com/travis-ci/travis-rubies/issues/57#issuecomment-458981237
- yes | rvm @global do gem install bundler -v 1.17.3 || true

The problem is, bundler v2 is used anyhow (which is incompatible with Rails 4.2).

@DeeDeeG
Copy link

DeeDeeG commented Aug 13, 2020

I have a fix that appears to be working.

commit: DeeDeeG@b21cb25

CI: https://travis-ci.com/github/DeeDeeG/webpacker/builds/179666602

(Uses rvm's "gemsets" feature to make sure bundler v2 isn't available/used. Then install bundler v1.17.3 in that isolated gemset.)

Makes the default bundler v2.x.x unavailable,
so that the older bundler v1.17.3 can be used instead.
@DeeDeeG
Copy link

DeeDeeG commented Aug 14, 2020

Unrelated to this PR (compression-webpack-plugin bump), there is a genuine install failure for the combination of Rails 5.1.x and Ruby 2.4.

https://travis-ci.org/github/rails/webpacker/jobs/717814477#L338-L348

There is an unconstrained sprockets dependency, which resolves to the latest sprockets (sprockets 4), which does require Ruby 2.5 or newer.

https://rubygems.org/gems/sprockets/versions/4.0.0

I'm suprised bundler isn't clever enough to just use an older sprockets? These are unsupported older versions of Rails and Ruby, so I'm not sure being able to install Rails 5.1 under Ruby 2.4 is this repo's responsibility. Or anyone's... They are both EOL, right?

Still, I wonder if this would be fixed with latest rubygems. I might see if I can get that last failure to go away, but it's not related to this PR, or even this repo, not really.

Edit: Hmm, I don't have that failure on one of my runs, so it might be just a flaky/intermittent failure.

@akoskm
Copy link
Author

akoskm commented Aug 14, 2020

@DeeDeeG thanks, it looks like a flake to me. There is a timeout error in the log:

Retrying download gem from https://rubygems.org/ due to error (2/4): Gem::RemoteFetcher::UnknownHostError timed out (https://rubygems.org/gems/unicode-display_width-1.5.0.gem)

probably Travis couldn't fetch a package during the build. Unfortunately, I cannot rerun the build.

@gauravtiwari gauravtiwari merged commit e8e0910 into rails:4-x-stable Aug 16, 2020
@gauravtiwari
Copy link
Member

released: 4.3.0

@ansonhoyt
Copy link

Why would this go into 4-x-stable when it isn't until 5.0.0 that webpacker drops Node 8 support? This is a breaking change (though I admit Node 8 is now EOL). See compression-webpack-plugin 4.0.0 changelog.

We have a few things running on older servers, so this change means we'll need to pin webpacker to ~4.2.0 (or mess with "resolutions" in package.json) until we get around to updating them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants