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

Automate bin/suspenders in development environment without --path #1100

Closed
thiagoa opened this issue Jul 15, 2022 · 2 comments
Closed

Automate bin/suspenders in development environment without --path #1100

thiagoa opened this issue Jul 15, 2022 · 2 comments
Assignees

Comments

@thiagoa
Copy link
Contributor

thiagoa commented Jul 15, 2022

Some facts:

  • Suspenders includes itself in the generated application's Gemfile
  • Suspenders generators run in the context of the generated applications
  • Generated applications include Suspenders as a development dependency

Given the last item, if we're running Suspenders in development, we'd end up with two copies of it: the development copy and a gem copy. The problem is that:

  • The development copy will start up Suspenders
  • Generators, since they run in the context of an application, will be picked up from the gem

Therefore, running bin/suspenders in development may put us in a situation where the development copy has changes that the gem copy does not, which means our code changes would not fully apply.

To prevent such a mismatch, the existing solution is to run Suspenders with --path, which inserts a path option in the Gemfile:

gem "suspenders", path: "..."

To activate this behavior, running bin/suspenders with a --path option is necessary:

bin/suspenders myapp --path=$HOME/suspenders

That is not an intuitive solution and may trip up developers working on suspenders, which won't always remember to use --path. What if we could infer when to use a path option in the Gemfile by detecting if we're running in development? We can certainly do that.

@thiagoa thiagoa self-assigned this Jul 15, 2022
@thiagoa thiagoa changed the title Automate or document running bin/suspenders in development Automate bin/suspenders in development environment without --path Jul 22, 2022
@stevepolitodesign
Copy link
Contributor

@thiagoa now that #1135 is merged, is this issue still relevant?

@stevepolitodesign
Copy link
Contributor

Closing since bin/suspenders was removed in #1135

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

No branches or pull requests

2 participants