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

0020-macro-sensitive-imports #113

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

0b1kn00b
Copy link

@0b1kn00b 0b1kn00b commented Oct 5, 2023

Thinking about macro errors and how to have less of them.

@Simn
Copy link
Member

Simn commented Oct 5, 2023

I acknowledge the problem but I don't think this is the solution. Imports are just tools to simplify type paths, so whatever problem you can create with imports you can also create without them. As soon as you have one macro function in your file, there's a risk of running into the problems outlined here.

@0b1kn00b
Copy link
Author

0b1kn00b commented Oct 5, 2023 via email

@Simn
Copy link
Member

Simn commented Oct 5, 2023

I don't see how that argument (which I generally agree with) relates to the proposal. It's not like imports are inherited by the users of a library.

@kLabz
Copy link

kLabz commented Oct 5, 2023

MyModule.hx vs MyModule.macro.hx is the safe way to separate macro and non macro code, without #if macro rendering code hard to read.

As Simn said, those imports you want to mark are not the only way to trigger problems so your proposal doesn't fix much.

@nadako
Copy link
Member

nadako commented Oct 5, 2023

MyModule.hx vs MyModule.macro.hx is the safe way to separate macro and non macro code

Can confirm, this kind of fixed all my issues with macro module dependencies.

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

4 participants