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

Best way to manage user feedback when not finding extensions #120

Open
dlmr opened this issue Sep 10, 2016 · 0 comments
Open

Best way to manage user feedback when not finding extensions #120

dlmr opened this issue Sep 10, 2016 · 0 comments

Comments

@dlmr
Copy link
Member

dlmr commented Sep 10, 2016

We currently give feedback to the user when Roc tried to load an extension that could not be found. This is to be nice since the user will get early feedback if something is wrong with their setup, e.g have forgotten to do npm install. However this can also cause some confusion as seen in rocjs/roc-package-web-app-react#28.

How can we best go about managing this?

I see some different ways we could solve this, each with their own strengths and weakness. Preferably we would like this to be as automatic as possible requiring little to none user interaction.

One alternative is to only load extensions that have been requested and that are installed. This would remove incorrect messages when running in production but the user would also not see any errors when starting the application without installing anything.

Another way would be to only load extensions from dependencies if NODE_ENV=production is defined. We would then recommend users to start in production using NODE_ENV=production roc start. Alternatively we could add a production flag to the core so we can do roc start --production. We can't add it directly to roc-plugin-start since we will not know about the flag util after we have loaded all extensions which would be to late.

Another "problem" is the configuration properties that are only used by development extensions and that Roc will warn for not being managed when starting the project without them. I can not see any automatic fix for this if we don't go down the path where we mark certain configuration properties as development only using their names or similar. The best solution is probably to recommend a split between development configuration and production configuration that can be composed.

Another way to solve all of this is to not show these messages if the user has not started the using --verbose, meaning that we still have all the valuable information but we hide it in most cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant