quaertym / ember-cli-dependency-checker

Ember CLI addon for checking missing node and bower dependencies before running ember commands
MIT License
40 stars 38 forks source link

Don't check dependencies for commands other than `test/serve/build` #55

Closed runspired closed 2 years ago

runspired commented 8 years ago

This addon should not be checking dependencies for commands that aren't test serve or build. By doing so it breaks many commands that still valid, and likely even what the user needs at that moment in time, such as ember install or ember update.

One of the things I'm doing with ember-cli-toolbelts is enabling easier dependency maintenance, but this addon conflicts with that.

stefanpenner commented 8 years ago

I'm not sure how one knows a command is valid if the dependencies may or may not be in-sync.

Ember install is currently used to add dependency not install missing ones. So it must validate existing ones are correct to proceed (today)

runspired commented 8 years ago

ember install can also be used to update an installed addon to it's latest version, which should work even if the addon is declared but not installed at that moment.

stefanpenner commented 8 years ago

Unfortunately due to the chicken + egg nature of installing something with itself (the update case of ember install) It is something we must discourage.

As mentioned in the other issue, there are plans to create a more standalone installer capable of doing this. As we would like to migrate to a more constraint based installer (over the one npm client ships by default).

rwjblue commented 8 years ago

I disagree with the premise of the issue. We need to validate the deps for any command to be ran and function. If we do not check deps and provide helpful information then those commands themselves may be completely non-functional.

runspired commented 8 years ago

@rwjblue could we build a way to flag a command as "warn only" instead of error out?

rwjblue commented 8 years ago

Maybe? There is already both an ENV var check (if present disables checking) and the automatic detection (and changing the default to warn instead of error) when a symlink is detected in node_modules (going on the assumption that you have npm link'ed).

As far as I know, we do not directly have access to the command name being invoked here (though we may be able to add that).

jacobq commented 6 years ago

I think the SKIP_DEPENDENCY_CHECKER=true opt-out method is reasonable. To me, it's a release valve for when a bug in ember-cli-dependency-checker is stopping a command that would otherwise be successful. (It also helps me avoid going nuts when I just want to run ember -v but some npm craziness has temporarily broken node_modules.)

Do people still want to keep this issue open? (It's 2+ years old now.)