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

Polywrap CLI: Imports Cache Directory

Open dOrgJelli opened this issue 3 years ago • 2 comments

Is your feature request related to a problem? Please describe. Currently, when importing wrappers into Polywrap projects, there is no an easy way to look at the schema you're importing.

This holds true for all project types: wasm, plugin, app, interface.

Describe the solution you'd like I'd like there to be an imports directory, similar to how other frameworks (npm, cargo, etc) import dependencies into a local cache folder. This way you (as a developer) can navigate into this folder and view the dependencies.

I think this should be done on a per-project basis, so it makes sense to put it in the .polywrap/ project directory that is created by the CLI as a cache for its various commands (build, infra, etc).

Describe alternatives you've considered N/A

Additional context Try this exercise for yourself to see how bad the developer experience is:

  • Create a new polywrap project: polywrap create wasm rust test-wrapper
  • Edit the src/schema.graphql file
  • Add #import { Module } into Fs from "wrap://ens/fs.polywrap.eth"
  • Run polywrap codegen
  • See how the ./src/wrap/ types are generated, but you cannot find the interface "ens/fs.polywrap.eth" in a human readable format (GraphQL) anywhere.

dOrgJelli avatar Nov 01 '22 02:11 dOrgJelli

Blocked by #1442

pileks avatar Dec 13 '22 16:12 pileks

Moved out of origin-qa as it's a nice-to-have.

pileks avatar Feb 14 '23 10:02 pileks