You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fresh clone cannot install or build since the reshape: root tsconfig now includes graph/test fixtures (92 errors, npm install exits 2) and npm ci has no lock file #580
A fresh clone of main at 61b0ef1 cannot be installed or built with the documented commands:
step
result
npm ci
exits 1: EUSAGE — The npm ci command can only install with an existing package-lock.json. The lock files were removed in #476 ("lock files uncommitted").
npm install
installs the dependencies, then exits 2, because the root prepare script runs npm run build.
npm run build
npm run build -w parser succeeds (parser/dist/, 2,257 files). The root tsc then fails with 92 errors, all under graph/test/typescript/fixtures/.
At 69a0383 the root tsconfig.json had "rootDir": "./src" and "include": ["src/**/*"], and the suites' fixtures lived in a top-level test/, outside the compiled root.
b30d3bfb ("reshape: the engine's tests move to graph/test/") and f24503a0 ("src/ becomes graph/") changed that. The root config is now "rootDir": "./graph" and "include": ["graph/**/*"], so tsc compiles every fixture under graph/test/typescript/fixtures/*/src.
Those fixtures are separate TypeScript programs. They import through path aliases (@d/, @tt/, @f/, @fixture/) defined only in each fixture's own tsconfig.json, and some deliberately exercise invalid code. Under the root config they cannot resolve.
The pipeline itself works despite the failed build. graph/pipeline/run-souffle.sh runs the bundle stage through node_modules/.bin/tsx whenever tsx is installed, and the parser workspace builds first. So this breaks installation and dist/, not a solve. But npm install exiting non-zero is the first thing anyone following the README sees, and bin/axiomcode's own hint ("run: npm install && npm run build") leads straight into it.
Reproduce
git clone <repo> x && cd x && git checkout 61b0ef1
npm ci # EUSAGE, no package-lock.json
npm install; echo $? # 2 (prepare -> build)
npm run build 2>&1 | sed $'s/\x1b\\[[0-9;]*m//g' | grep -c 'error TS' # 92, all graph/test/typescript/fixtures
Suggested fix
Add "graph/test/**" to exclude in the root tsconfig.json, or give the suites their own tsconfig. This restores the pre-reshape boundary.
Either commit package-lock.json again, or change the docs and hints from npm ci to npm install.
Consider making prepare build only what a consumer needs (-w parser plus the bundle), so a type error in a test fixture cannot fail installation.
Valid at 61b0ef1, and fixed by the next commit on main, #477 (febf8b45), which is your suggested fix 1: the root tsconfig now has "exclude": ["node_modules", "dist", "graph/test"].
Verified just now on a fresh clone of main at 9d10d81: npm install exits 0, 0 TypeScript errors, parser/dist/index.js and dist/bundle/cli.js present, bin/axiomcode --help runs.
On the other points: the documented install command is npm install (README and the hint in bin/axiomcode); npm ci is not referenced anywhere, and the lock files are intentionally not committed. Point 3 is moot once the fixtures are outside the compiled root. Point 4 is #418, which now includes a fresh-clone install job for exactly this class of failure.
What
A fresh clone of
mainat61b0ef1cannot be installed or built with the documented commands:npm ciEUSAGE — The npm ci command can only install with an existing package-lock.json. The lock files were removed in #476 ("lock files uncommitted").npm installpreparescript runsnpm run build.npm run buildnpm run build -w parsersucceeds (parser/dist/, 2,257 files). The roottscthen fails with 92 errors, all undergraph/test/typescript/fixtures/.Counted from the de-coloured build log:
Cause: a regression from the reshape
69a0383the roottsconfig.jsonhad"rootDir": "./src"and"include": ["src/**/*"], and the suites' fixtures lived in a top-leveltest/, outside the compiled root.b30d3bfb("reshape: the engine's tests move to graph/test/") andf24503a0("src/ becomes graph/") changed that. The root config is now"rootDir": "./graph"and"include": ["graph/**/*"], sotsccompiles every fixture undergraph/test/typescript/fixtures/*/src.@d/,@tt/,@f/,@fixture/) defined only in each fixture's owntsconfig.json, and some deliberately exercise invalid code. Under the root config they cannot resolve.The pipeline itself works despite the failed build.
graph/pipeline/run-souffle.shruns the bundle stage throughnode_modules/.bin/tsxwhenever tsx is installed, and the parser workspace builds first. So this breaks installation anddist/, not a solve. Butnpm installexiting non-zero is the first thing anyone following the README sees, andbin/axiomcode's own hint ("run: npm install && npm run build") leads straight into it.Reproduce
Suggested fix
"graph/test/**"toexcludein the roottsconfig.json, or give the suites their own tsconfig. This restores the pre-reshape boundary.package-lock.jsonagain, or change the docs and hints fromnpm citonpm install.preparebuild only what a consumer needs (-w parserplus the bundle), so a type error in a test fixture cannot fail installation.mainwould have caught (No CI gate on main: the regression suites never run before a merge, and a suite that skips itself reports success #417).Found while running
callgraph-benchmarkagainst the latest engine from a scratch clone.