You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need some generated files to be compiled only on Linux. Usually I'd drop a "// +build linux" line on top of such file. Obviously I don't want to manually add that on generated files. I could automate that with a Makefile, but Makefiles come with their own problem when you want to support both Linux and Macos (different make command, different sed command).
So maybe goderive could copy build comment lines from the source file to the generated file, when such comment line is present ? Or another more clever mechanism you could imagine...
The text was updated successfully, but these errors were encountered:
I think this sounds like a good feature.
Basically I don't want goderive to generate code that is not used.
This means that if code is generated from a file that will only be used in linux then the generated functions should only be available to the linux code.
This means that goderive should be able to generate multiple files for a single package and add the appropriate build tags to each, if they are necessary.
I don't know if I'll have time to build this feature, but I will provide support for a pull request.
Hi,
thank you for this great project!
I need some generated files to be compiled only on Linux. Usually I'd drop a "// +build linux" line on top of such file. Obviously I don't want to manually add that on generated files. I could automate that with a Makefile, but Makefiles come with their own problem when you want to support both Linux and Macos (different make command, different sed command).
So maybe goderive could copy build comment lines from the source file to the generated file, when such comment line is present ? Or another more clever mechanism you could imagine...
The text was updated successfully, but these errors were encountered: