Skip to content

Improve ambiguous import error message#15335

Merged
josevalim merged 3 commits intoelixir-lang:mainfrom
lukaszsamson:ls-ambiguous-import-msg
May 6, 2026
Merged

Improve ambiguous import error message#15335
josevalim merged 3 commits intoelixir-lang:mainfrom
lukaszsamson:ls-ambiguous-import-msg

Conversation

@lukaszsamson
Copy link
Copy Markdown
Contributor

Before this PR, the message was referring to function even if macro was conflicting

function ~ts/~B imported from both ~ts and ~ts, call is ambiguous

@josevalim
Copy link
Copy Markdown
Member

I think we can simplify the message instead, saying: duplicate foo/e import from modules Foo and Bar, wdyt?

@lukaszsamson
Copy link
Copy Markdown
Contributor Author

I think we can simplify the message instead, saying: duplicate foo/e import from modules Foo and Bar, wdyt?

Less complexity but less precise message. I'd use the word "conflicting"

@josevalim
Copy link
Copy Markdown
Member

I like conflicting!

@lukaszsamson
Copy link
Copy Markdown
Contributor Author

Feedback addressed

Copy link
Copy Markdown
Member

@whatyouhide whatyouhide left a comment

Choose a reason for hiding this comment

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

Lovely

Comment thread lib/elixir/test/elixir/kernel/errors_test.exs Outdated
@josevalim josevalim merged commit 68c413f into elixir-lang:main May 6, 2026
15 checks passed
@josevalim
Copy link
Copy Markdown
Member

💚 💙 💜 💛 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants