Skip to content

ruby-rbs crate: Detect duplicated interface declarations in Environment - #3174

Draft
dak2 wants to merge 1 commit into
ruby:masterfrom
dak2:rust-environment-duplicate-decl-detection
Draft

dak2 wants to merge 1 commit into
ruby:masterfrom
dak2:rust-environment-duplicate-decl-detection

Conversation

@dak2

@dak2 dak2 commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Part of #2954. First slice of the Environment declaration-table layer (Ruby's insert_rbs_decl): registers interface declarations and reports duplicates as load errors, matching RBS::DuplicatedDeclarationError.

Porting all of environment.rb at once (class/module reopening, constants, aliases, normalization) would mix several independent quirks into one review. This PR is scoped to interface only, top level only; class/module nesting, Context, and the other tables are follow-up PRs of similar size.

🤖 Generated with Claude Code

Add DeclId, SingleEntry, and DuplicatedDeclarationError types, and
insert.rs to track interface declarations per source and report
duplicates as load errors instead of silently overwriting.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dak2 dak2 changed the title Detect duplicated interface declarations in Environment (Rust) ruby-rbs crate: Detect duplicated interface declarations in Environment Sep 27, 2026
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