v2.0.0-rc.5 #389
v2.0.0-rc.5
#389
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
cldk 2.0.0-rc.5
Two changes, and they are the two halves of one question: what should happen when an analyzer ships a field the SDK has not learned about yet. Until now the answer was "refuse the entire payload." That answer caught a real bug within seconds — and it also meant a backward-compatible analyzer release could not be taken up at all until the SDK was edited first. This release takes up that fix and changes the answer.
extra="forbid"toextra="ignore"A Java or TypeScript
analysis.jsoncarrying a field these models do not declare now parses, with that field dropped, where it previously raised.Migration: if you relied on a
ValidationErrorto detect analyzer drift, that signal is gone — compare against the analyzer's published schema instead. No code change is needed to keep parsing; payloads that failed before will now succeed.What it gives up, stated plainly because it is the whole cost:
forbidwas the drift detector. Underignorean addition is absorbed silently, and the first symptom is a wrong answer from something reading a field the SDK never learned.Scoped narrower than the whole codebase, on a distinction that matters:
_Baseincldk/models/javaandcldk/models/typescript, the analyzer mirrors validated from the wire, plusJCompilationUnit, which overridesmodel_configwholesale for its alias settings and so never inherited the change (a subclass config replaces rather than merges);forbid—JCallableOverviewandJClassOverviewinprojections.py. Nothing callsmodel_validateon them; the SDK builds them from graph rows. Strictness there catches our own typo'd kwarg, not the analyzer's additions.ignorerather thanallow, deliberately:allowkeeps unknown fields inmodel_extraand so widensmodel_dump_json()with whatever the analyzer emitted, and several tests assert properties of dumps. A field the SDK does not model must not be able to change what a dump contains.What this does not cost:
extradoes not govern required fields, so "a 1.xanalysis.jsonis refused, not parsed" survives intact — a v1 payload still fails, because it lacks what v2 requires rather than carrying extras.Interprocedural dataflow predicates now work
Analyzer pins move to
codeanalyzer-python==1.5.1,codeanalyzer-java==3.1.2andcodeanalyzer-typescript==1.5.3. All three shipped the same fix in lockstep:param_inandparam_outedges now name the bound formal invar.The schemas had declared that property since the L4 layer landed while the projections wrote nothing, so a consumer predicate on it evaluated to null on every edge crossing a call boundary — and under Cypher's three-valued logic an
all()over that null excludes the whole path. An interprocedural flow therefore read as a proved absence of flow, indistinguishable from a real negative. If you have been writing Cypher overvarand concluding "no flow," those conclusions are worth re-running.Measured on a graph emitted by rc.4's pinned
codeanalyzer-python1.5.0:varwas null on 4 of 4PY_PARAM_INedges and 6 of 6PY_PARAM_OUT, while all 44PY_DDGcarried it. So this was the shipped state of rc.4, not a legacy-graph edge case. After the bump: 4 of 4 and 6 of 6 carry it.No analyzer floor moves. Each delta is the
varfix plus release plumbing, with no change to thecan://grammar. Raising a floor would refuse graphs that still work, since the fix only adds a property — and a capability difference belongs in a data-measured probe rather than a version literal.Upgrade
With the read-only Neo4j backend:
Links
All reactions