Skip to content

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.

4 participants