Skip to content

Bring publisher current with malloy 0.0.403#792

Open
mtoy-googly-moogly wants to merge 1 commit into
mainfrom
mtoy/current-malloy
Open

Bring publisher current with malloy 0.0.403#792
mtoy-googly-moogly wants to merge 1 commit into
mainfrom
mtoy/current-malloy

Conversation

@mtoy-googly-moogly
Copy link
Copy Markdown
Contributor

Publisher had drifted behind Malloy, and upgrading to 0.0.403 is a breaking bump. Two substantive shifts to absorb, plus the mechanical renames that ride along (AnnotationAnnotationsDef, .annotation.annotations).

Use core's routing instead of working around it

Publisher's annotation reading was a stack of workarounds for routing that Malloy core didn't yet support — prefixes matched as text and parsed ad hoc by each reader. Core now ships routing as a defined feature: a prefix resolves to a route, read through the Annotations view. The workarounds come out; publisher reads by route.

Two visible consequences:

  • Source / query / view / notebook annotation lists didn't collect an entity's full annotation set — the hand-rolled readers each saw only part of the IR (one of the notes / blockNotes arrays, often skipping the inherits chain, and source-file-filtering the rest). An entity's annotations all apply, so the complete set is now surfaced — its own notes and blockNotes plus everything inherited (most visibly, imported sources stop showing blank).
  • A given's annotations are selected by route — anything that isn't a Malloy-reserved route — instead of a startsWith("#(") text match, so #<doc> (a non-paren bracket pair) and multi-line #|…|# annotations stop getting dropped.

The deprecated RegExp readers (tagParse / getTaglines) and MalloyConfig.releaseConnections (now shutdown('close')) fall away in the same move.

Table names are the writer's to quote

Malloy got out of the table-name-quoting business: a name — whether dialect.table('some-name') in a Malloy file or a name= in a build manifest — is the writer's responsibility to quote for the dialect, and Malloy substitutes it verbatim. Publisher's materialization DDL had been quoting it itself; now it emits the name as written, matching Malloy's read side. (The Dialect.quoteTablePath helper that did the quoting is gone with it.)

Scope and follow-ups

#(filter) parsing is left as-is — it predates routing and reworking it is its own change (issue to follow). Two small "belongs in Malloy core" shims carry TODOs: a local AnnotationsDef type (Malloy exports the Annotations view but not the IR type it wraps) and an isReservedRoute classifier.

Move annotation reads onto core's routing (the Annotations view) instead of
hand-rolled prefix matching, drop table-name quoting to match malloy's
verbatim substitution, and migrate the deprecated tagParse / getTaglines /
releaseConnections APIs.
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.

1 participant