enumer icon indicating copy to clipboard operation
enumer copied to clipboard

Add build constraints to the exported file

Open XanderAtBackboneSystems opened this issue 3 years ago • 1 comments

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

XanderAtBackboneSystems avatar Jan 10 '22 13:01 XanderAtBackboneSystems

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.

dmarkham avatar Apr 12 '22 14:04 dmarkham