wrap-cli icon indicating copy to clipboard operation
wrap-cli copied to clipboard

No Black-Box CLI Defaults

Open dOrgJelli opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe. Currently the CLI makes use of many "default" modules that extent / modify the functionality of the various commands. For examples of this, checkout the For example, the ./cli/src/lib/defaults/ directory: https://github.com/polywrap/toolchain/tree/origin-dev/packages/cli/src/lib/defaults

When these defaults are used, we should make it abundantly clear where they are coming from.

Describe the solution you'd like

|$ polywrap create wasm rust wrapper

~/wrapper|$ cat polywrap.build.yaml
format: 0.1
strategy: quick-build
image: docker://polywrap/vm-base-rs

~/wrapper|$ rm polywrap.build.yaml

~/wrapper|$ polywrap build
ERROR: no polywrap.build.yaml manifest found.
Suggestion: try running `polywrap build init`?

NOTE: we always ensure we're fetching the build image from somewhere, instead of having a hard-coded default. No configuration file exists, the code won't work as it doesn't have a baked-in default.

Describe alternatives you've considered Maybe it is good to keep some defaults baked into the CLI.

Additional context Add any other context or screenshots about the feature request here.

dOrgJelli avatar Feb 07 '23 00:02 dOrgJelli

It feels weird to add the necessity to create a build manifest so the user can define the image he wants. In the build process, we can show which image is used (without using -v flag), and if the user would like to customize something, then yes, it should do it through the build manifest.

I think we should keep it as simple as possible when it comes to developing with us - but we can also be very informative when it comes to saying what the user is using under the hood (like the docker image)

cbrzn avatar Feb 08 '23 12:02 cbrzn