Skip to content

v1.2.0

Choose a tag to compare

@github-actions github-actions released this 15 Apr 02:18
· 37 commits to main since this release

Coordinated public-API polish. Breaking changes are allowed in the 1.x line while the API stabilizes; no deprecation wrappers are shipped.

Added

  • Workspace.class_graph — lazily-built, cached ClassGraph.
  • InheritanceGraph.from_workspace(ws) classmethod. The existing from_classes(classes) is preserved as the lower-level constructor.
  • ClassInfo.workspace — public back-reference to the owning Workspace. Raises RuntimeError on standalone ClassInfos.
  • ClassInfo.fingerprints — lazy cached list of MethodFingerprint covering every method on the class.
  • MethodInfoResolved.fingerprint — lazy cached fingerprint for a single method. Returns None if the body is missing or can't be decoded.
  • Return-type annotations on every Workspace analysis property (string_index, reference_index, field_access_index, inheritance, call_graph, class_graph).
  • Top-level re-exports: from flashkit import Workspace, ClassInfo.

Changed (breaking)

  • build_class_graph(ws) removed. Use ws.class_graph (cached) or ClassGraph.from_workspace(ws) (uncached).
  • ClassInfo._abc is no longer intended for external reads. Use cls.abc.
  • ClassInfo._workspace is no longer intended for external reads. Use cls.workspace.
  • CallGraph.from_workspace, ReferenceIndex.from_workspace, StringIndex.from_workspace, FieldAccessIndex.from_workspace, and build_all_indexes now declare workspace: Workspace (was workspace: object). Runtime behavior unchanged; type-checker users may see new errors in previously-unchecked code.
  • ClassInfo.references_to / references_from now annotated list[Reference].
  • ClassInfo.field_access_summary now annotated dict[str, dict[str, list[str]]].
  • Empty flashkit.search subpackage removed.

Migration

# Before
from flashkit.analysis import build_class_graph
g = build_class_graph(ws)

# After — cached (recommended)
g = ws.class_graph

# After — uncached / escape hatch
from flashkit.analysis import ClassGraph
g = ClassGraph.from_workspace(ws)
# Before
abc = cls._abc
ws  = cls._workspace

# After
abc = cls.abc
ws  = cls.workspace
# Before — method fingerprints required reaching into analysis helpers
from flashkit.analysis import extract_all_fingerprints, extract_fingerprint
fps = extract_all_fingerprints(cls, cls._abc)
fp  = extract_fingerprint(cls, method, cls._abc)

# After
fps = cls.fingerprints
fp  = method.fingerprint