Repository navigation
defk-rt2.11: the rest of the typing stays twice (ADR-0008 extended); drop Elixir mode's dead ctx write - #67
Merged
Conversation
…drop Elixir mode's dead ctx write The spike found the seam (a node id stamped after desugar keys 99.2% of Elixir mode's typings to the compiler's, C unchanged) but not the case for it: the u64 accumulator inference decides results, so sharing it retires the oracle's check, and the rest gains about 20 lines. ADR-0008 records this and how to revisit it. ElixirMode.definitions/3 set the compiler ctx's file, which nothing on its path reads: it is definitions/2 now.
DanielLuning
pushed a commit
that referenced
this pull request
Oct 20, 2026
… removal (definitions/2). Closes after the merge."
DanielLuning
pushed a commit
that referenced
this pull request
Oct 20, 2026
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.
What changed
The spike
defk-rt2.11asked whether the compiler can hand Elixir mode its node types, so that Elixir mode only emits. The owner decided to close it and keep the typing twice. This PR records that decision and removes a dead write.ADR-0008: a dated extension, "the rest of the typing also stays twice". It records:
The status line names the extension.
The dead write:
Defk.ElixirMode.definitions/3set the compiler ctx's:file"so err! reads it". Nothing on Elixir mode's path reads the ctx: a rejection there raises a plainArgumentError(raise_form!/4), and none of the helpers it calls touches the ctx. The write and the unusedfileargument are gone, so the function is nowdefinitions/2. Its body uses an implicittry.Arity references: updated in the caller (
lib/defk.ex),test/compiler_ctx_test.exs, the compiler map and the inventory row of ADR-0006. No file undertest/stability/ortest/contracts/names the function.Results
The spike, measured on every test and example module with a throwaway probe (
lower_expr/2againstexpr/2, throughmix dump_c; the full numbers are in the ticket comment):[u8]againstbitstringnaming.u64retries, theinguard ofcase).lower_expr.u64accumulator inference decides results (3 - 5raises asu64, gives-2asi64), so sharing it removes the agreement tests' check of that decision. Without it, about 20 lines remain to gain.How it was checked
mix cion the laptop (macOS) passed: 2300 tests, Credo found no issues, Dialyzer reported 0 errors.Touches a promised surface? No:
definitionsis@doc falseand hidden (ADR-0006). NoCHANGELOG.mdentry.Touches
test/stability/? No.