Closed deemp closed 10 months ago
Is this a spago issue? Does it behave differently if you just call purs
? (if you run spago with -v
it will print the purs
commands it's calling under the hood)
IDK whether purs
or spago
is responsible for tracking the built files.
spago build -v
shows that purs
is called once and for all .purs
files.
[ 9ms] CWD: /home/eyjafjallajokull/Desktop/gh/spago
[ 13ms] Global cache: "/home/eyjafjallajokull/.cache/spago-nodejs"
[ 13ms] Local cache: "/home/eyjafjallajokull/Desktop/gh/spago/.spago"
[ 47ms] DB: Connecting to database at /home/eyjafjallajokull/.cache/spago-nodejs/spago.v1.sqlite
[ 50ms] Reading Spago workspace configuration...
[ 50ms] Reading config from spago.yaml
[ 147ms] Found packages at these paths:
bin/spago.yaml
core/spago.yaml
docs-search/client-halogen/spago.yaml
docs-search/common/spago.yaml
docs-search/index/spago.yaml
[ 148ms] Reading config from bin/spago.yaml
[ 152ms] Reading config from core/spago.yaml
[ 154ms] Reading config from docs-search/client-halogen/spago.yaml
[ 158ms] Reading config from docs-search/common/spago.yaml
[ 160ms] Reading config from docs-search/index/spago.yaml
[ 362ms] Lockfile is up to date, using it
[ 363ms] Found lockfile, using the package set from there
[ 364ms]
✅ Selecting 6 packages to build:
docs-search-client-halogen
docs-search-common
docs-search-index
spago
spago-bin
spago-core
[ 364ms] Requested to install these packages: []
[ 372ms] Downloading dependencies...
[ 393ms] Building...
[ 400ms] Running command:
purs compile --codegen corefn,docs,js,sourcemaps --json-errors .spago/p/aff-7.1.0/src/**/*.purs .spago/p/aff-promise-4.0.0/src/**/*.purs
...
Spago doesn't track builds, that's entirely happening in the compiler. Spago only puts together the globs and processes the output.
I see the compiler repo has a similar issue. I updated the description of this issue and will close it now.
The compiler won't reuse artefacts from canceled builds. You have to let a full build complete before you can see it skip compiling modules.
Superseded by https://github.com/purescript/purescript/issues/3995
Related to https://github.com/purescript/spago/issues/700
Problem
Hi!
spago
seems to ignore already compiled files.Steps to reproduce
Clone this repo at
master
or at a commit, e.g. bbe37b6cd497aa544bd0761fa7a56a5f5d002a87.Remove the
output
directory.Run
spago build
.✅ Selecting 6 packages to build: docs-search-client-halogen docs-search-common docs-search-index spago spago-bin spago-core
Downloading dependencies... Building... [ 11 of 1014] Compiling Record.Unsafe [ 10 of 1014] Compiling Spago.Command.Script [ 9 of 1014] Compiling Web.DOM.Internal.Types [ 3 of 1014] Compiling Spago.Generated.BuildInfo [ 7 of 1014] Compiling Type.Function [ 2 of 1014] Compiling Type.Row [ 1 of 1014] Compiling Unsafe.Coerce [ 6 of 1014] Compiling Web.Event.Internal.Types [ 4 of 1014] Compiling Type.Proxy [ 8 of 1014] Compiling Type.Equality [ 5 of 1014] Compiling Spago.Texts [ 12 of 1014] Compiling Partial ...
Interrupt the build (
Ctrl+C
in my case) before it finishes.Check the
output
directory (part of the logs is omitted).Record the statistics on
output/Control.Semigroupoid/index.js
.Run
spago build
again.Interrupt the build.
Record the statistics on
output/Control.Semigroupoid/index.js
.Expected result
spago build
-s less files (now it's1014
) on subsequent runs