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

Allow scenarios without dependency changes #81

Closed
trentmwillis opened this issue Jul 2, 2016 · 13 comments · Fixed by #143
Closed

Allow scenarios without dependency changes #81

trentmwillis opened this issue Jul 2, 2016 · 13 comments · Fixed by #143

Comments

@trentmwillis
Copy link
Member

Currently, the ScenarioManager checks to ensure that there are dependency managers which are only created if you specify some sort of dependency change in your scenarios.

However, I have a use-case where I would like to run multiple different scenarios without changing any dependencies. This currently results in a No dependency manager adapter error being thrown. I can workaround this by specifying an empty dependency change (e.g., npm: {}), but this feels hacky.

So, I have two questions:

  1. Why is there a requirement that dependency managers must be present currently?
  2. Can we remove that requirement? It seems like answer should be yes since I can hack around it now anyway.
@rwjblue
Copy link
Member

rwjblue commented Jul 2, 2016

Yes. It should not be required. It makes sense to have various scenarios (possibly with the project default deps) for different commands and stuff.

@trentmwillis
Copy link
Member Author

Sounds good, will open a PR then.

@kategengler
Copy link
Member

@trentmwillis Is this still desired?

@trentmwillis
Copy link
Member Author

I found a way to do what I want, but I feel like this could still be beneficial, just haven't had the time to do it

@rwjblue
Copy link
Member

rwjblue commented Aug 8, 2017

I believe this is possible now (and a scenario without dependency changes is part of the default addon blueprint).

Closing...

@rwjblue rwjblue closed this as completed Aug 8, 2017
@kategengler
Copy link
Member

I think what was meant was a scenario without either npm or bower. @mixonic also asked about this recently in slack.

@trentmwillis
Copy link
Member Author

Yes, the original issue was to have different scenarios (say with different commands), but without any dependency changes.

@mixonic
Copy link
Member

mixonic commented Aug 8, 2017

Specifically I've found myself in the ember-resolver and in a client app wanting to run scenarios that are based on ENV variables. No dependencies to change, just different commands to run.

@rwjblue
Copy link
Member

rwjblue commented Aug 8, 2017

Hmm. I guess I don't fully grok what y'all mean.

The following config does not do any dependency changes and has a custom command per-scenario:

module.exports = [
  { 
    name: 'default',
    command: 'ember test'
    npm: {},
    bower: {}
  },
  { 
    name: 'special-sauce',
    command: 'SPECIAL_SAUCE=true ember test'
    npm: {},
    bower: {}
  }
]

What am I missing?

@rwjblue
Copy link
Member

rwjblue commented Aug 8, 2017

(reopening because it seems that I must be misunderstanding...)

@rwjblue rwjblue reopened this Aug 8, 2017
@trentmwillis
Copy link
Member Author

@rwjblue your example is correct, but you should able to do this without needing to specify npm or bower fields. In other words, you should be able to specify a scenario like so without an error:

{ 
  name: 'special-sauce',
  command: 'SPECIAL_SAUCE=true ember test'
}

@rwjblue
Copy link
Member

rwjblue commented Aug 8, 2017

AHA! OK! Sorry, I was over-focusing on the fact that it was possible and didn't realize we were mostly just talking about the ergonomics. Turns out that it is important to read the actual description fully 😞 . Sorry for the run around...

I think we can just remove the error when there are no managers: #143.

@trentmwillis
Copy link
Member Author

No worries! Thanks for opening the PR :)

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 a pull request may close this issue.

4 participants