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 build constraints to the exported file #52

Open
XanderAtBackboneSystems opened this issue Jan 10, 2022 · 1 comment
Open

Add build constraints to the exported file #52

XanderAtBackboneSystems opened this issue Jan 10, 2022 · 1 comment

Comments

@XanderAtBackboneSystems

First of all i'm a happy user of the enumer :) But i've an situation in which i need a bit of help.

When my enum is in code that is only build when certain constraints are met. (See: here) i'd like to have the constraints also in the generated code. If the build constraints not get exported the compile would generated errors as the generate file is build without the source containing the enum base definition.

I wrote a small PR in which i added a command line argument to add the build constraints. This works fine.

I was thinking whether it would be possible to deduct the build tags from the original source file and copy them into the generated one. But could not think of an easy way to that.

Note the comment option does not work as it adds a space between // and the first char of the comment

@dmarkham
Copy link
Owner

It seems I don't really understand the problem, or what you are trying to do. If you have some time to explain it to me, I'm down to do a call to you can walk me though it.

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

No branches or pull requests

2 participants