Problem
--emit neo4j --neo4j-uri … --eager pushes a graph with no type nodes at all. Without --eager, the same command on the same project pushes them correctly. The run exits 0 either way and reports nothing.
The result is a graph that looks populated — modules and callables are all there — but has no :TSClass, :TSInterface, :TSEnum, :TSTypeAlias or :TSNamespace, and therefore no TS_HAS_METHOD, TS_HAS_FIELD, TS_EXTENDS or TS_IMPLEMENTS. A consumer that requires those relationship types refuses the graph at attach; one that does not will quietly see an application with no classes.
Repro
codeanalyzer-typescript 1.3.0 from PyPI, against any project with a class, pushed to an empty Neo4j:
cants -i <project> --emit neo4j --neo4j-uri bolt://localhost:7687 \
--neo4j-user neo4j --neo4j-password <pw> --app-name probe-plain
cants -i <project> --emit neo4j --neo4j-uri bolt://localhost:7687 \
--neo4j-user neo4j --neo4j-password <pw> --app-name probe-eager --eager
then, per application:
MATCH (n) WHERE n.id STARTS WITH 'can://typescript/<app>/'
UNWIND labels(n) AS l RETURN l, count(*) ORDER BY l
Measured on a five-file sample app:
| flags |
result |
no --eager |
TSCallable 35, TSClass 6, TSEnum 2, TSInterface 2, TSModule 5, TSNamespace 1, TSTypeAlias 1 |
--eager |
TSCallable 35, TSModule 5 — and nothing else |
Callables and modules are unaffected in both.
Not the file projection
The same run's graph.cypher carries every type node and applies cleanly, so the projection itself is right and only the live push loses them. Writing the emitted graph.cypher by hand is a usable workaround, which is what we have done in our test harness for now.
Why it took a while to see
A push without --eager is correct, so this only appears when a caller asks for a clean rebuild — which a test harness or a CI job is exactly the sort of caller to do.
Environment
codeanalyzer-typescript 1.3.0 (PyPI wheel), Neo4j 5, macOS. Happy to supply the sample project if useful.
Problem
--emit neo4j --neo4j-uri … --eagerpushes a graph with no type nodes at all. Without--eager, the same command on the same project pushes them correctly. The run exits 0 either way and reports nothing.The result is a graph that looks populated — modules and callables are all there — but has no
:TSClass,:TSInterface,:TSEnum,:TSTypeAliasor:TSNamespace, and therefore noTS_HAS_METHOD,TS_HAS_FIELD,TS_EXTENDSorTS_IMPLEMENTS. A consumer that requires those relationship types refuses the graph at attach; one that does not will quietly see an application with no classes.Repro
codeanalyzer-typescript 1.3.0 from PyPI, against any project with a class, pushed to an empty Neo4j:
then, per application:
Measured on a five-file sample app:
--eagerTSCallable 35, TSClass 6, TSEnum 2, TSInterface 2, TSModule 5, TSNamespace 1, TSTypeAlias 1--eagerTSCallable 35, TSModule 5— and nothing elseCallables and modules are unaffected in both.
Not the file projection
The same run's
graph.cyphercarries every type node and applies cleanly, so the projection itself is right and only the live push loses them. Writing the emittedgraph.cypherby hand is a usable workaround, which is what we have done in our test harness for now.Why it took a while to see
A push without
--eageris correct, so this only appears when a caller asks for a clean rebuild — which a test harness or a CI job is exactly the sort of caller to do.Environment
codeanalyzer-typescript 1.3.0 (PyPI wheel), Neo4j 5, macOS. Happy to supply the sample project if useful.