Skip to content

Add ability to detect name clashes on includes in wit-smith #2193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

jsturtevant
Copy link
Contributor

fixes: #2191

This PR adds the ability to detect name clashes on includes by tracking names in each world/package combination. It doesn't catch every edge case but I found that it is successful more often than without some type of tracking of the world names for includes. As mentioned in the linked issue not catching every edge case in generation is fine.

Signed-off-by: James Sturtevant <jstur@microsoft.com>
@jsturtevant jsturtevant changed the title Add ability to detect name clashes on includes Add ability to detect name clashes on includes in wit-smith May 17, 2025
Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

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

Nice, thanks for this!

@alexcrichton alexcrichton added this pull request to the merge queue May 19, 2025
Merged via the queue into bytecodealliance:main with commit 163a6af May 19, 2025
32 checks passed
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.

wit-smith generates wit with the same name on includes
2 participants