brownplt / pyret-npm

Apache License 2.0
4 stars 2 forks source link

Math library not found by pyret-npm #3

Closed BNAndras closed 9 months ago

BNAndras commented 10 months ago

Moving this from the Pyret Discord.

use context essentials2020

include math

print(min([list: 3, 1, 2]))

fails with pyret-npm 0.0.26 with the error Compiling worklist...Could not find builtin module math in any of /Users/anagy/Documents/.pyret/compiled, /opt/homebrew/lib/node_modules/pyret-npm/pyret-lang/build/phaseA/lib-compiled. If I use node to compile the Pyret code using

node build/phaseA/pyret.jarr \
    --build-runnable math-min.arr \
    --outfile math-min.js \
    --builtin-js-dir src/js/trove/ \
    --builtin-arr-dir src/arr/trove \
    --require-config src/scripts/standalone-configA.json
node math-min.js

I get the expected 1The program didn't define any tests.

jpolitz commented 10 months ago

Sorry this took a few days – this is updated now (and a few other libraries that were “there” but not visible should be findable now, like statistics).

( https://github.com/brownplt/pyret-lang/commit/76bc6aa6188526636ef1ccf507af103a2d4cd565 )