-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[close #1202] Add support for Rails 7 & jsbundling #1212
Conversation
Rails 7 introduced the gem: ``` gem "jsbundling-rails", "~> 0.1.0" ``` Which no longer relies on `webpacker`. Issue #1202 was opened since developers using jsbundling would expect `yarn` to be available but won't have the `webpacker` gem which we use to gate detection for yarn installation. With this change we now install nodejs when a `package.json` is detected and yarn when `yarn.lock` is detected.
dbfd02e
to
dacd7ac
Compare
If I'm reading the code correctly, both before and after this change, if an app uses However for apps that either:
...then the Ruby buildpack will start installing its own Node, when it didn't before - even if they aren't actually using Rails 7. In the case of (1), this means there will be two Node.js versions installed. Will this cause any problems? PATH order? Slug size? In the case of (2) only one Node.js version will be installed, but it may/may not be unused depending on whether they use this Rails 7 feature. For apps not using Rails 7 this seems like it will increase slug size unnecessarily? You'll know whether the above is an issue or not, but wanted to double check these had been considered :-) |
When we move over to cloud native buildpacks all apps that have a
That's extremely uncommon. We do announce that we're installing the binaries, so it should at least be debuggable to see what's going on. Hopefully (but I don't know) the
I've had other gem maintainers ask me to special case their apps to install node and webpack the same way we install it for users of Customers could put their
The alternative to this check of |
dacd7ac
to
b60d882
Compare
Rails 7 introduced the gem: ``` gem "jsbundling-rails", "~> 0.1.0" ``` Which no longer relies on `webpacker`. Issue #1202 was opened since developers using jsbundling would expect `yarn` to be available but won't have the `webpacker` gem which we use to gate detection for yarn installation. With this change we now install nodejs when a `package.json` is detected and yarn when `yarn.lock` is detected.
b60d882
to
61361a0
Compare
Why do you think that? Out of 9 apps we have using both |
Rails 7 introduced the gem:
Which no longer relies on
webpacker
.Issue #1202 was opened since developers using jsbundling would expect
yarn
to be available but won't have thewebpacker
gem which we use to gate detection for yarn installation.With this change we now install nodejs when a
package.json
is detected and yarn whenyarn.lock
is detected.