Skip to content

docs: bring the guides, examples and install pages up to cldk 2.0.0 - #16

Open
rahlk wants to merge 4 commits into
astrofrom
docs/issue-13-cldk-2.0.0-release
Open

rahlk wants to merge 4 commits into
astrofrom
docs/issue-13-cldk-2.0.0-release

Conversation

@rahlk

@rahlk rahlk commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Closes #13.

This PR updates the install, guide, example and backend pages for cldk 2.0.0, the stable release on PyPI. The API reference pages under reference/python-api/ are in #14.

Each sample on these pages ran on cldk==2.0.0 from PyPI, and each output comment comes from such a run. The pinned samples are Apache Commons CLI 1.7.0, Flask 3.1.3 and Zod v4.6.7. The analyzers are codeanalyzer-python 1.5.3, codeanalyzer-typescript 1.6.0 and codeanalyzer-java 3.3.3, with JDK 17 and Maven 3.9. Each page names the versions that produced its outputs.

Merge order

Merge #15 first, then this PR, then #14. Merge this PR and #14 back to back: #14 links to these pages, and on astro alone these pages still describe the release candidate.

Changes

Install and start (installing, quickstart, resources/cheatsheet, what-is-cldk, examples, reference/sdks)

  • Install 2.0.0 with no --pre. Every extra is quoted for pip, Poetry and uv, and every Java sample installs cldk[java].
  • State the Python versions (3.11 to 3.14, a C compiler on 3.14, no 3.15 yet).
  • SYSTEM_PYTHON for each kind of virtual environment, because CLDK.python() raises RuntimeError in one without it.
  • State the JDK and Maven that Java call graphs need, and the JAVA_HOME rule.
  • Use real outputs. Commons CLI has 75 classes. Its call graph has 652 nodes and 1980 edges on JDK 17, and 1976 edges on JDK 21 or 25.

Guides (concepts, symbol-tables, call-graphs, dataflow, system-dependence, taint)

  • Remove the release-candidate badges and notes. Rerun the outputs on 2.0.0.
  • cldk 2.0.0 pins codeanalyzer-python 1.5.3, which still has codeanalyzer-python#220. The pages keep the 1.5.4 workaround, and they state the gaps that 1.5.4 still has, for example sanitize(PREFIX).
  • Correct what paths, exhausted, complete and unresolved claim.
  • The upgrade notes give pip install -U "cldk[java]" for Java readers.
  • Terminology: the guides say "level" for the four analysis levels, never "rung". The heading "The ladder CLDK builds" is now "The four levels CLDK builds", and backends/codeanalyzer-iac.mdx links to its new anchor.

Examples (examples/java, python, typescript, javascript)

  • Clone Flask 3.1.3 and Zod v4.6.7 instead of HEAD, so the outputs stay valid.
  • Regenerate every output. Most Java outputs did not match cldk 2.0.0.
  • The JavaScript page gives every file of its my_app and mixed_app samples.

Backends, scale and contributing

  • Update the CLI flags and output schemas to the pinned analyzers.
  • State the cache rules that apply through the SDK.
  • Quote "cldk[neo4j]".
  • Remove the invented Odoo outputs.
  • State the TypeScript Neo4j attach limit for declaration merging.

How the changes were checked

Known gaps

  • at-scale/kubernetes.mdx keeps the Odoo walkthrough as a labelled template with no measured output.
  • backends/codeanalyzer-python.mdx keeps my_pkg in its canpy command templates.
  • A second git clone into an existing commons-cli, flask or zod directory fails. The pages do not say to remove the old directory first.
  • The Flask call graph has 786 or 787 nodes between fresh runs, because Jedi resolves two read() calls in different ways. The page says so.

SDK problems that these pages work around

  1. The SYSTEM_PYTHON workaround. codeanalyzer-python reads sys.base_executable, which CPython does not have, so a run from a virtual environment can raise RuntimeError. Present in 1.5.3 through 1.6.2.
  2. Stale caches. Java and TypeScript reuse a cached analysis with no check of the sources. TypeScript also reuses a cache from a lower analysis level.
  3. The 1.x-cache error suggests eager_analysis=True. That keyword raises TypeError. The keyword is eager=True.
  4. CLDK.java(..., target_files=...) always fails on codeanalyzer-java 3.3.3.
  5. The TypeScript Neo4j backend cannot attach to the Zod graph (declaration merging).
  6. cldk 2.0.0 does not install on Python 3.15.

rahlk added 4 commits October 16, 2026 15:23
cldk 2.0.0 is the stable release, so the pages drop --pre and the
release-candidate notes. They quote every extra, add the java extra
where a Java sample runs, and state the supported Python versions
(3.11 to 3.14), SYSTEM_PYTHON for a virtual environment, and the JDK
and Maven that Java call graphs need.

Every output comes from a run on cldk 2.0.0 with Commons CLI 1.7.0,
Flask 3.1.3 or Zod v4.6.7.
…#13)

Most Java outputs did not match cldk 2.0.0 on Commons CLI 1.7.0, and the
Flask and Zod clones followed HEAD, so their outputs drifted. The pages
now clone Flask 3.1.3 and Zod v4.6.7, and each output comes from a run
on cldk 2.0.0. The JavaScript page gives every file of its sample
projects.
Update the CLI flags and output schemas to the analyzers that cldk
2.0.0 pins, state the cache rules that apply through the SDK, quote the
neo4j extra, remove the invented Odoo outputs, and note the TypeScript
Neo4j attach limit for declaration merging.
…ung (#13)

Remove the release-candidate badges and notes, and rerun the outputs on
cldk 2.0.0. cldk 2.0.0 pins codeanalyzer-python 1.5.3, which still has
codeanalyzer-python#220; the pages keep the 1.5.4 workaround and state
the gaps that 1.5.4 still has.

The guides now use "level" for the four analysis levels, never
"rung". The heading "The ladder CLDK builds" is now "The four levels
CLDK builds", and the IaC backend page links to its new anchor.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Guides, examples and install pages still describe CLDK 2.0 as a release candidate

1 participant