Skip to content

Lock the webpacker gem to the beta release#8191

Merged
leio10 merged 2 commits intodecidim:developfrom
mainio:fix/webpacker-beta-dependency
Jul 15, 2021
Merged

Lock the webpacker gem to the beta release#8191
leio10 merged 2 commits intodecidim:developfrom
mainio:fix/webpacker-beta-dependency

Conversation

@ahukkanen
Copy link
Copy Markdown
Contributor

@ahukkanen ahukkanen commented Jul 6, 2021

🎩 What? Why?

After #8181 bundler will install the 6.0.0.pre.x version of the Webpacker gem unless you specifically lock the webpacker version in the application's Gemfile. This will break some Webpacker functionality because the pre-versions are older than the beta versions (see the release history)

Why this happens is that alphabetically 6.0.0.pre.2 > 6.0.0.beta.7.

The real issue is that the Webpacker gem hasn't released version 6.0.0 yet and also it has not released an RC version which would be higher in alphabetical order than 6.0.0.pre.2.

This solves the issue by locking the webpacker dependency to the beta release until there is either an actual release or an RC release available.

📌 Related Issues

Testing

Upgrade some existing Decidim installation to 0.25.0.dev following the upgrade guide.

📋 Checklist

  • CONSIDER adding a unit test if your PR resolves an issue.
  • ✔️ DO check open PR's to avoid duplicates.
  • ✔️ DO keep pull requests small so they can be easily reviewed.
  • ✔️ DO build locally before pushing.
  • ✔️ DO make sure tests pass.
  • ✔️ DO make sure any new changes are documented in docs/.
  • ✔️ DO add and modify seeds if necessary.
  • ✔️ DO add CHANGELOG upgrade notes if required.
  • ✔️ DO add to GraphQL API if there are new public fields.
  • ✔️ DO add link to MetaDecidim if it's a new feature.
  • AVOID breaking the continuous integration build.
  • AVOID making significant changes to the overall architecture.

ahukkanen added 2 commits July 6, 2021 16:45
Because the "pre" release is older than "beta" but is higher in
alphabetical order, it would be otherwise installed which can
break webpacker functionality.

See:
rails/webpacker#3055
@ahukkanen ahukkanen changed the title Lock the "webpacker" gem to the beta release Lock the webpacker gem to the beta release Jul 6, 2021
@ahukkanen
Copy link
Copy Markdown
Contributor Author

A further note to add here is that the production/staging apps work fine even with webpacker 6.0.0.pre.2.

The problem is with the development environment running alongside with the webpack-dev-server. With the dev server you would notice that none of the JavaScript loaded with javascript_pack_tag actually works.

@ferblape
Copy link
Copy Markdown
Contributor

Just to give a bit more of context rails/webpacker#2955 (comment)

Copy link
Copy Markdown
Contributor

@leio10 leio10 left a comment

Choose a reason for hiding this comment

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

Thanks! ❤️

@leio10 leio10 merged commit a231402 into decidim:develop Jul 15, 2021
@ahukkanen ahukkanen deleted the fix/webpacker-beta-dependency branch July 15, 2021 07:51
@ahukkanen ahukkanen mentioned this pull request Aug 31, 2021
12 tasks
@andreslucena andreslucena added type: internal PRs that aren't necessary to add to the CHANGELOG for implementers and removed target: developer-experience type: fix PRs that implement a fix for a bug labels Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in-review module: core type: internal PRs that aren't necessary to add to the CHANGELOG for implementers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants