vessel icon indicating copy to clipboard operation
vessel copied to clipboard

Support private library imports

Open ByronBecker opened this issue 3 years ago • 2 comments

Vessel currently does not support imports from private libraries. This is due to a limitation of the headers passed by the rust_dhall crate https://github.com/Nadrieril/dhall-rust/issues/134.

ByronBecker avatar Nov 19 '22 08:11 ByronBecker

I spent a lot of time looking into this today, and it seems like a rather deep limitation of the current dhall-rust implementation.

For now, it's possible to get around this with the following hack:

  • Install the latest version of the Dhall CLI
  • Rename package-set.dhall to something like package-set-initial.dhall
  • Add package-set.dhall to your .gitignore
  • Add headers via the using syntax or DHALL_HEADERS environment variable
  • Create a bash / npm / make script which runs dhall resolve --file package-set-initial.dhall > package-set.dhall && vessel install

We are planning to move away from Dhall in favor of Motoko (via motoko.rs) as the preferred configuration language for Vessel, so I'll make sure that custom headers will be easy to use in package-set.mo files.

rvanasa avatar Nov 19 '22 18:11 rvanasa

We are planning to move away from Dhall in favor of Motoko (via motoko.rs) as the preferred configuration language for Vessel

Wooooo 🎉

Looking forward to seeing this. And thanks for the intermediate workaround.

ByronBecker avatar Nov 19 '22 18:11 ByronBecker