Bring publisher current with malloy 0.0.403#792
Open
mtoy-googly-moogly wants to merge 1 commit into
Open
Conversation
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.
7270897 to
ec89a05
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 (
Annotation→AnnotationsDef,.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
Annotationsview. The workarounds come out; publisher reads by route.Two visible consequences:
notes/blockNotesarrays, often skipping theinheritschain, and source-file-filtering the rest). An entity's annotations all apply, so the complete set is now surfaced — its ownnotesandblockNotesplus everything inherited (most visibly, imported sources stop showing blank).startsWith("#(")text match, so#<doc>(a non-paren bracket pair) and multi-line#|…|#annotations stop getting dropped.The deprecated RegExp readers (
tagParse/getTaglines) andMalloyConfig.releaseConnections(nowshutdown('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 aname=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. (TheDialect.quoteTablePathhelper 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 localAnnotationsDeftype (Malloy exports theAnnotationsview but not the IR type it wraps) and anisReservedRouteclassifier.