Skip to content
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

Add leading colon to ts_rs path in macro expansion #267

Merged
merged 1 commit into from
Mar 13, 2024

Conversation

escritorio-gustavo
Copy link
Contributor

@escritorio-gustavo escritorio-gustavo commented Mar 13, 2024

Goal

If, for some (very bespoke and cursed) reason, a user creates a mod called ts_rs and has it in scope, it becomes impossible to
derive TS, all the ts_rs::<something> paths will look inside that mod instead of our library.
This PR aims to make such (cursed) code compile

Changes

All paths to ts_rs generated by ts_rs_macros now have two leading colons, e.g.: ::ts_rs::TS

Checklist

  • I have followed the steps listed in the Contributing guide.
  • I have added or updated the tests related to the changes made.

@escritorio-gustavo escritorio-gustavo changed the title Add leading colon to ts_rs path in macro expansion Add leading colon to ts_rs path in macro expansion Mar 13, 2024
Copy link
Collaborator

@NyxCode NyxCode left a comment

Choose a reason for hiding this comment

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

LGTM!

@escritorio-gustavo escritorio-gustavo merged commit 6171723 into main Mar 13, 2024
14 checks passed
@escritorio-gustavo escritorio-gustavo deleted the add_leading_colon_to_macro branch March 13, 2024 18:59
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.

None yet

2 participants