brownplt / code.pyret.org

Website for serving Pyret to folks.
Other
24 stars 44 forks source link

Fresh build not working? #545

Closed asolove closed 3 weeks ago

asolove commented 3 weeks ago

It seems to me like using a fresh checkout of horizon and then following the Readme does not currently build.

What I did

What happened

The npm run build results in:

$ npm run build

> code.pyret.org@0.0.0 build
> heroku local:run make web-local

 ›   Warning: heroku update available from 7.69.1 to 8.11.5.
# Explicitly exclude crypto, buffer, and stylus, nested npm dependencies that aren't needed
node_modules/.bin/browserify src/scripts/npm-dependencies.js -x crypto -x buffer -x stylus -o build/web/js/bundled-npm-deps.js
/Library/Developer/CommandLineTools/usr/bin/make phaseA -C pyret/
npx browserify src/js/trove/require-node-dependencies.js -o build/bundled-node-deps.js
node -max-old-space-size=8192 build/phase0/pyret.jarr --outfile build/phaseA/pyret.jarr \
                      --build-runnable src/arr/compiler/pyret.arr \
                      --builtin-js-dir src/js/trove/ \
                      --builtin-arr-dir src/arr/trove/ \
                      --compiled-dir build/phaseA/compiled/ \
                      -no-check-mode  \
                      --require-config src/scripts/standalone-configA.json
72/72 modules compiled (pyret.arr)             
Cleaning up and generating standalone...
/Users/asolove/src/code.pyret.org/node_modules/pyret-lang
mkdir -p compiled/;
#cp pyret/build/phaseA/compiled/*.js ./compiled/
node pyret/build/phaseA/pyret.jarr \
    --builtin-js-dir src/web/js/trove/ \
    --builtin-js-dir pyret/src/js/trove/ \
    -allow-builtin-overrides \
    --builtin-arr-dir src/web/arr/trove/ \
    --builtin-arr-dir pyret/src/arr/trove/ \
    --require-config cpo-config.json \
    --build-runnable src/web/arr/cpo-main.arr \
    --standalone-file cpo-standalone.js \
    --compiled-dir ./compiled \
    --deps-file build/web/js/bundled-npm-deps.js \
    --outfile build/web/js/cpo-main.jarr -no-check-mode
Compiling worklist...The run ended in error:

Could not find module vector-util in any of src/web/arr/trove/, pyret/src/arr/trove/, src/web/js/trove/, pyret/src/js/trove/
Pyret stack:
  file:///Users/asolove/src/code.pyret.org/node_modules/pyret-lang/src/arr/compiler/locators/builtin.arr: line 223, column 6
  file:///Users/asolove/src/code.pyret.org/node_modules/pyret-lang/src/arr/compiler/cli-module-loader.arr: line 161, column 8
  file:///Users/asolove/src/code.pyret.org/node_modules/pyret-lang/src/arr/compiler/cli-module-loader.arr: line 290, column 17
  file:///Users/asolove/src/code.pyret.org/node_modules/pyret-lang/src/arr/compiler/compile-lib.arr: line 246, column 18
  builtin://lists: line 510, column 36
  file:///Users/asolove/src/code.pyret.org/node_modules/pyret-lang/src/arr/compiler/compile-lib.arr: line 245, column 21
  file:///Users/asolove/src/code.pyret.org/node_modules/pyret-lang/src/arr/compiler/compile-lib.arr: line 240, column 6
  file:///Users/asolove/src/code.pyret.org/node_modules/pyret-lang/src/arr/compiler/compile-lib.arr: line 253, column 12
  builtin://lists: line 689, column 51
  builtin://lists: line 580, column 2
  file:///Users/asolove/src/code.pyret.org/node_modules/pyret-lang/src/arr/compiler/compile-lib.arr: line 251, column 8
  file:///Users/asolove/src/code.pyret.org/node_modules/pyret-lang/src/arr/compiler/compile-lib.arr: line 240, column 6
  file:///Users/asolove/src/code.pyret.org/node_modules/pyret-lang/src/arr/compiler/compile-lib.arr: line 253, column 12
  builtin://lists: line 689, column 51
  builtin://lists: line 580, column 2
  file:///Users/asolove/src/code.pyret.org/node_modules/pyret-lang/src/arr/compiler/compile-lib.arr: line 251, column 8
  file:///Users/asolove/src/code.pyret.org/node_modules/pyret-lang/src/arr/compiler/compile-lib.arr: line 240, column 6
  file:///Users/asolove/src/code.pyret.org/node_modules/pyret-lang/src/arr/compiler/compile-lib.arr: line 265, column 8
  file:///Users/asolove/src/code.pyret.org/node_modules/pyret-lang/src/arr/compiler/cli-module-loader.arr: line 374, column 7
  file:///Users/asolove/src/code.pyret.org/node_modules/pyret-lang/src/arr/compiler/cli-module-loader.arr: line 440, column 18
  file:///Users/asolove/src/code.pyret.org/node_modules/pyret-lang/src/arr/compiler/pyret.arr: line 130, column 10
  file:///Users/asolove/src/code.pyret.org/node_modules/pyret-lang/src/arr/compiler/pyret.arr: line 92, column 4
  file:///Users/asolove/src/code.pyret.org/node_modules/pyret-lang/src/arr/compiler/pyret.arr: line 231, column 12
make: *** [build/web/js/cpo-main.jarr] Error 1

Hypotheses

Things I did to try to fix it

blerner commented 3 weeks ago

Your pyret-lang checkout is stale, I think: that vector-util module was added recently with the matrices PR, and recent cpo builds definitely include it, along with the matrices library and those functions whose names seem unbound. Pull pyret-lang to its most recent #horizon, and you should be fine.

asolove commented 3 weeks ago

I love this theory and it looks like by checking it out fresh and symlinking, that seems to work.

But I'd love to figure out why the Readme steps, which used to work, and which claims to be fetching pyret-lang#horizon via npm dependencies, don't work.

On Fri, Jul 5, 2024 at 8:56 AM Ben Lerner @.***> wrote:

Your pyret-lang checkout is stale, I think: that vector-util module was added recently with the matrices PR, and recent cpo builds definitely include it, along with the matrices library and those functions whose names seem unbound. Pull pyret-lang to its most recent #horizon, and you should be fine.

— Reply to this email directly, view it on GitHub https://github.com/brownplt/code.pyret.org/issues/545#issuecomment-2210830594, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAACCL747XNUTZ2TYPQEHZLZK2JWLAVCNFSM6AAAAABKNECL3KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJQHAZTANJZGQ . You are receiving this because you authored the thread.Message ID: @.***>

blerner commented 3 weeks ago

Chances are your package-lock file specified a specific checkout for pyret-lang, so you didn't actually update that package. Chances are you mostly haven't been updating it, then, but since there hadn't been (m)any build-order-breaking changes, it just was never noticed? I get bit by this silent non-updating more often than is pleasant...