endo icon indicating copy to clipboard operation
endo copied to clipboard

@endo/far depends on @fast-check/ava via pass-style

Open dckc opened this issue 2 years ago • 1 comments

I was trying to endo bundle ./src/txSync.js where the only import is @endo/far and I got:

(Error#1)
Error#1: Cannot find dependency ava for file:///home/connolly/projects/finquick/packages/fincaps/node_modules/@fast-check/ava/

  at gatherDependency (packages/compartment-mapper/src/node-modules.js:447:11)
...

I asked yarn why @fast-check/ava and it says...

=> Found "@fast-check/[email protected]"
info Reasons this module exists
   - "@endo#far#@endo#pass-style" depends on it
   - Hoisted from "@endo#far#@endo#pass-style#@fast-check#ava"

sure enough, it's not in devDependencies:

https://github.com/endojs/endo/blob/9b17577fef74960466d9d7a1d6081e985ce990d0/packages/pass-style/package.json#L34-L36

dckc avatar Aug 27 '23 03:08 dckc

I just ran into this again when exploring endoScript in a fresh project:

$ LOCKDOWN_OPTIONS='{"errorTaming":"unsafe","stackFiltering":"verbose"}' node src/core-eval-gen.js src/hello.contract.js
'@endo/lockdown' sniffed and found a 'LOCKDOWN_OPTIONS' environment variable

writing entry dist/hello.deploy.mjs
from . copying [ 'objectTools.js' ] to dist
from platform-goals copying [ 'start-contract.js' ] to dist
making endoScript bundle of dist/hello.deploy.mjs
(Error#1)
Error#1: Cannot find dependency ava for file:///home/connolly/projects/core-eval-gen/node_modules/@fast-check/ava/
  at gatherDependency (file:///home/connolly/projects/core-eval-gen/node_modules/@endo/compartment-mapper/src/node-modules.js:486:11)
  at async Promise.all (index 0)
  at async graphPackage (file:///home/connolly/projects/core-eval-gen/node_modules/@endo/compartment-mapper/src/node-modules.js:416:3)
  at async gatherDependency (file:///home/connolly/projects/core-eval-gen/node_modules/@endo/compartment-mapper/src/node-modules.js:498:3)
  at async Promise.all (index 4)
  at async graphPackage (file:///home/connolly/projects/core-eval-gen/node_modules/@endo/compartment-mapper/src/node-modules.js:416:3)
  at async gatherDependency (file:///home/connolly/projects/core-eval-gen/node_modules/@endo/compartment-mapper/src/node-modules.js:498:3)
  at async Promise.all (index 2)
  at async graphPackage (file:///home/connolly/projects/core-eval-gen/node_modules/@endo/compartment-mapper/src/node-modules.js:416:3)
  at async gatherDependency (file:///home/connolly/projects/core-eval-gen/node_modules/@endo/compartment-mapper/src/node-modules.js:498:3)
  at async Promise.all (index 2)
  at async graphPackage (file:///home/connolly/projects/core-eval-gen/node_modules/@endo/compartment-mapper/src/node-modules.js:416:3)
  at async graphPackages (file:///home/connolly/projects/core-eval-gen/node_modules/@endo/compartment-mapper/src/node-modules.js:583:3)
  at async compartmentMapForNodeModules (file:///home/connolly/projects/core-eval-gen/node_modules/@endo/compartment-mapper/src/node-modules.js:764:17)
  at async makeBundle (file:///home/connolly/projects/core-eval-gen/node_modules/@endo/compartment-mapper/src/bundle.js:259:26)
  at async bundleScript (file:///home/connolly/projects/core-eval-gen/node_modules/@endo/bundle-source/src/script.js:75:18)
  at async codeGen (file:///home/connolly/projects/core-eval-gen/src/core-eval-gen.js:67:24)
  at async main (file:///home/connolly/projects/core-eval-gen/src/core-eval-gen.js:82:3)

context:

  • https://github.com/Agoric/agoric-sdk/discussions/9717
  • https://github.com/Agoric/dapp-agoric-basics/pull/48

dckc avatar Sep 12 '24 18:09 dckc

I'm running into this again in a PR review. @endo/marshal was added to package.json; the yarn.lock changes have a bunch of additions such as @endo/pass-style, which make sense, but then it has @fast-check/ava, which seems like it should only be a devdependency. (or peer dependency?)

https://github.com/Agoric/agoric-sdk/pull/10241/files#diff-d9ffc9be79cc3b4ccdf255e295aa9d62bfe69a1ce56d86ec95e974aba1ef66c5R137

dckc avatar Oct 21 '24 16:10 dckc