Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Closed
dckc opened this issue Aug 27, 2023 · 2 comments · Fixed by #2645
Closed

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

dckc opened this issue Aug 27, 2023 · 2 comments · Fixed by #2645
Assignees
Labels
bug Something isn't working kriskowal-just-do-it-2024-01 Tasks that kriskowal can close out quickly to clear weeds

Comments

@dckc
Copy link
Contributor

dckc commented Aug 27, 2023

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/ava@1.1.5"
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:

"dependencies": {
"@endo/promise-kit": "^0.2.59",
"@fast-check/ava": "^1.1.5"

@kriskowal kriskowal added the kriskowal-review-2024-01 Issues that kriskowal wants to bring to the attention of the team for review as of January, 2024 label Jan 8, 2024
@aj-agoric aj-agoric removed the kriskowal-review-2024-01 Issues that kriskowal wants to bring to the attention of the team for review as of January, 2024 label Jan 31, 2024
@kriskowal kriskowal added the kriskowal-just-do-it-2024-01 Tasks that kriskowal can close out quickly to clear weeds label Jan 31, 2024
@aj-agoric aj-agoric added the bug Something isn't working label Feb 5, 2024
@erights erights self-assigned this Mar 4, 2024
@dckc
Copy link
Contributor Author

dckc commented Sep 12, 2024

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:

@dckc
Copy link
Contributor Author

dckc commented Oct 21, 2024

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

gibson042 added a commit that referenced this issue Nov 22, 2024
Fixes #1741

Rather than importing `fc` directly to export arbitraries,
@endo/pass-style/tools.js now returns them from an exported
`makeArbitraries` function that requires `fc` as an argument.
gibson042 added a commit that referenced this issue Dec 2, 2024
Fixes #1741

Rather than importing `fc` directly to export arbitraries,
@endo/pass-style/tools.js now returns them from an exported
`makeArbitraries` function that requires `fc` as an argument.

While technically a breaking change, it is pragmatically not marked as
such because we are not aware of anything outside of Endo that imports
a fast-check arbitrary.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working kriskowal-just-do-it-2024-01 Tasks that kriskowal can close out quickly to clear weeds
Projects
None yet
5 participants