Skip to content

Fix RBS::DuplicatedDeclarationError#11

Merged
pboling merged 1 commit into
ruby-oauth:mainfrom
leoarnold:leoarnold/rbs/version
Jun 8, 2026
Merged

Fix RBS::DuplicatedDeclarationError#11
pboling merged 1 commit into
ruby-oauth:mainfrom
leoarnold:leoarnold/rbs/version

Conversation

@leoarnold

Copy link
Copy Markdown

We remove the RBS declaration of SnakyHash::VERSION from sig/snaky_hash.rbs because it's already declared in sig/snakey_hash/version.rbs.

This duplicate declaration causes RBS::DuplicatedDeclarationError in projects using snaky_hash.

We remove the RBS declaration of SnakyHash::VERSION from sig/snaky_hash.rbs
because it's already declared in sig/snakey_hash/version.rbs.

This duplicate declaration causes RBS::DuplicatedDeclarationError
in projects using snaky_hash.
@pboling

pboling commented Jun 8, 2026

Copy link
Copy Markdown
Member

Oh damn, I wonder how many places I accidentally duplicated this... thanks for the report!

@pboling pboling left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pboling pboling merged commit eca4b01 into ruby-oauth:main Jun 8, 2026
29 of 34 checks passed
@leoarnold leoarnold deleted the leoarnold/rbs/version branch June 8, 2026 10:38
@leoarnold

Copy link
Copy Markdown
Author

Oh damn, I wonder how many places I accidentally duplicated this... thanks for the report!

@pboling Just in case you were wondering: I am not going through your repositories trying to nit pick on this one error 😱 . I actually came across these errors while maintaining the cobot_client gem (see their rbs_collection.yaml)

@pboling

pboling commented Jun 10, 2026

Copy link
Copy Markdown
Member

@leoarnold I am glad you found it! NOTE: this was not AI. It was present in others of my repos.

I use a highly structured, deterministic, templating system on all my gems, and it had a flaw that resulted in this. Basically it failed to cleanup the constant from the bundle gem <gem-name> scaffold when adding a more idiomatic (IMO) version.rbs. 😮‍💨

The templating project is based on, and part of, my StructuredMerge.org tools... and I've now added a regression spec and fixed the issue in HEAD.

Happy to know Cobot is using the gems!

@pboling

pboling commented Jun 10, 2026

Copy link
Copy Markdown
Member

I'll have a new release out within a day or so.

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.

2 participants