Skip to content

tera 1.20 → 2.1 (#416): removed public API we use for template AST introspection, not a bump #484

Description

@explosivebit

Scoped while assessing v0.37.0. Not taken into that release.

Why this isn't a version bump

Confirmed by CI on #416:

error[E0432]: unresolved import \`tera::ast\`
  --> crates/forgeplan-core/src/ingest/types.rs:45:11
error[E0425]: cannot find type \`Result\` in crate \`tera\`
error[E0433]: cannot find \`Template\` in \`tera\`

tera 2.x removed ast, Result, and Template from its public surface. crates/forgeplan-core/src/ingest/types.rs:45 does:

use tera::ast::{Expr, ExprVal, Node};

and parses a template's AST for introspection (three more call sites: Template::new at lines 632/658/669, tera::Result type aliases at template.rs:226/238). This is not incidental use of the templating engine — it depends on tera's internal AST representation, which 2.x does not expose anymore.

Scope

Six call sites (ingest/types.rs ×5, ingest/template.rs ×2 for the Result alias — recount before starting, this is from the CI error list, not a full audit). Whoever picks this up needs to answer first: does 2.x expose an equivalent introspection API under a different name, or does the AST-walking need reimplementing against 2.x's actual public surface? That answer decides whether this is a rename or a redesign — worth resolving before estimating the work, not after.

Why not in v0.37.0

Same reasoning as #483 (lancedb/arrow-schema): that release already carries one breaking change (R_eff scoring, PRD-086). This isn't a version bump either — it's an API redesign in a module doing something specific (template AST introspection) that most callers of tera don't do, so upstream migration guides may not cover it well.

Refs: #416

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions