You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
ifNODE_ENV=production
is defined. We would then recommend users to start in production usingNODE_ENV=production roc start
. Alternatively we could add a production flag to the core so we can doroc start --production
. We can't add it directly toroc-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.The text was updated successfully, but these errors were encountered: