Handle Erlang/OTP 28 nominal types in Code.Typespec.fetch_types/1#15562
Merged
Conversation
-nominal type declarations (EEP 69, OTP 28) were silently dropped from
the result. Return them as {:nominal, type} entries, mirroring how
:opaque is reported.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Member
|
💚 💙 💜 💛 ❤️ |
Contributor
Author
|
@josevalim Have you considered exposing |
Member
|
@lukaszsamson yes but we typically only add such features once it is supported by all OTP versions supported by Elixir, otherwise it introduces a hidden version requirement. |
lukaszsamson
added a commit
to lukaszsamson/elixir
that referenced
this pull request
Jul 9, 2026
Two review findings: - :spec_wider_return entries were auto-triaged but only counted in stats, contradicting the comment that says tightening candidates remain discoverable. The JSON output now carries them in a tightening_hints section with full entry detail (not gated). - Prompt mode omitted untranslatable entries and still instructed reviewers to judge spec_wider_return, which no longer appears in its data. It now includes untranslatables and the instructions match the actual verdict set, including the dynamic_args probe. Also drops the Code.fetch_docs/1 exclusion: :erl_anno's nominal types resolve now that Code.Typespec.fetch_types/1 returns them (elixir-lang#15562), and the tool reported the entry as stale -- zero untranslatable specs remain. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
8 tasks
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.
Split out of #15559 as requested.
-nominaltype declarations (EEP 69, Erlang/OTP 28) are silently dropped byCode.Typespec.fetch_types/1. This returns them as{:nominal, type}entries, mirroring how:opaqueis reported, with an OTP >= 28 gated regression test.This is not hypothetical on OTP 28: for example
:erl_annodeclaresline/0andlocation/0as nominal types, so any consumer expanding remote types throughfetch_types/1(such asCode.fetch_docs/1spec tooling) currently cannot resolve them.Assisted-By: Claude Fable 5
🤖 Generated with Claude Code