Skip to content

docs(compilers/openapi): document the lowerer and the senses of lowering - #93

Merged
OmarAlJarrah merged 1 commit into
mainfrom
docs/openapi-lowerer-docstring
Jul 23, 2026
Merged

docs(compilers/openapi): document the lowerer and the senses of lowering#93
OmarAlJarrah merged 1 commit into
mainfrom
docs/openapi-lowerer-docstring

Conversation

@OmarAlJarrah

Copy link
Copy Markdown
Member

Summary

The lowerer struct comment explained the struct's mechanics (the interning
table, diagnostics, and depth counter it threads) but never said what a lowerer
is or why it is named for "lowering". This expands the doc comment to:

  • state that lowering is the compiler-standard translation of one source-shaped
    OpenAPI document into Morphic's spec-agnostic IR, with each lower* method one
    step of that descent; and
  • disambiguate the two senses the word carries in this repo — this faithful,
    lossless source-to-IR pass, versus the lossy, target-shaped "lowered late" of
    invariant docs: add repo and commit/PR conventions to CLAUDE.md #2 that emitter refiners perform downstream — so the name does not
    read as if the compiler is flattening anything.

Documentation only; no behavior change.

Test plan

  • gofmt -l, go build ./..., and go vet ./... clean. No code paths touched.

The lowerer struct comment described the struct's mechanics but not what a
lowerer is or why it is named for "lowering". Expand it to explain that lowering
is the compiler-standard translation of a source-shaped OpenAPI document into the
spec-agnostic IR, and to disambiguate the two senses the word carries here: this
faithful, lossless source-to-IR pass, versus the lossy, target-shaped lowering
that emitter refiners perform late. Doc-only; no behavior change.
@OmarAlJarrah
OmarAlJarrah merged commit c918aa3 into main Jul 23, 2026
1 check passed
@OmarAlJarrah
OmarAlJarrah deleted the docs/openapi-lowerer-docstring branch July 23, 2026 14:03
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