-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Remove automatic propagation of generators options #5011
Remove automatic propagation of generators options #5011
Conversation
789d2d8
to
0b5deb0
Compare
Not sure, but I think it was needed when the payment extension installation was handled on the legacy frontend (bolt, in this case). |
Here's a failure removing that propagation: https://app.circleci.com/pipelines/github/nebulab/solidus/921/workflows/7cdc3ac6-4548-45b7-b192-e928ae7986e1/jobs/13190. Still, I'd explore if we can remove it, because passing those options to other commands (like the |
736e671
to
6ec6d2c
Compare
@kennyadsl yes the reason was that every extension needed to respect the root setting for avoiding/keeping interactivity and running/skipping migrations, and as @waiting-for-dev pointed out we had cases of nested calls that were hard to control otherwise. The extra options as far as I can remember are ignored by the generate command and that made them appearing on other generators just a cosmetic issue, but I fully support a solution that allows to avoid this hack 🙌 In addition to solidus_bolt we should be certain we're not messing with interactivity for solidus_auth_devise. |
👍 but we shouldn't because the |
6ec6d2c
to
0e75344
Compare
0e75344
to
ec3def2
Compare
By removing the override of the `generate` method in this generator, we stop propagating those custom arguments to all the inner generators called by the installer. For example, at the moment, the installer is running rails generate rspec:install --auto-accept --auto-run-migrations see [1], which doesn't make sense and might also have unexpected behaviors if we (or any dependency) run a generator during their installation, which accepts those arguments. Instead of always propaging these option, we are explicitely declaring them when needed. [1]: solidusio/solidus_starter_frontend#295 Co-authored-by: safafa <[email protected]>
ec3def2
to
56d7a0f
Compare
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.
❤️
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.
👏
Summary
Ref: solidusio/solidus_starter_frontend#295.
By removing the override of the
generate
method in thisgenerator, we stop propagating those custom arguments to
all the inner generators called by the installer.
For example, at the moment, the installer is running
which doesn't make sense and might also have
unexpected behaviors if we (or any dependency) run a generator
during their installation, which accepts those arguments.
Instead of always propaging these option, we are explicitely
declaring them when needed.
Install Output Example after this change
Co-Authored @safafa
Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed: