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
Hi again. Sorry for bothering so much all of a sudden, it's just that I've found this project and really wanted to be able to use it for one of my projects.
Regarding the issue, I don't know if you've thought about this before, but since we are importing the file during build, any configurations specified in the build steps do not apply. For example, in my build file I have this line:
But when using @import in the build phase, the code will not be able to find the package. Not only that, but if any library needs to be linked against, the current solution does not work.
So my question is, have you though about any possible solutions for this problem? Ideally, the build system would offer a way to inspect any symbols that were compiled in a build step, and allow the users to hook into that somehow.
Right now, I'm not entirely sure what the best solution would be honestly. If we could somehow use comptime in the actual source files to use reflection and generate some sort of type definition files (in JSON or something else), we could then read it in the build file instead of importing and using reflection there. Don't really know, I'm just spitballing ideas here.
The text was updated successfully, but these errors were encountered:
Yea the "real-fix" for this would be to actually parse .zig files looking for the exports, rather than doing comptime reflection. I would say that a work around for this would be to have a defined file for library exports. It could use some work.
The user could then run zig build headergen and it would generate the headers, and respect the compilation options set by the user. We could probably even include a utility function to setup this build steps automatically, for convenience.
Hi again. Sorry for bothering so much all of a sudden, it's just that I've found this project and really wanted to be able to use it for one of my projects.
Regarding the issue, I don't know if you've thought about this before, but since we are importing the file during build, any configurations specified in the build steps do not apply. For example, in my build file I have this line:
But when using
@import
in the build phase, the code will not be able to find the package. Not only that, but if any library needs to be linked against, the current solution does not work.So my question is, have you though about any possible solutions for this problem? Ideally, the build system would offer a way to inspect any symbols that were compiled in a build step, and allow the users to hook into that somehow.
Right now, I'm not entirely sure what the best solution would be honestly. If we could somehow use
comptime
in the actual source files to use reflection and generate some sort of type definition files (in JSON or something else), we could then read it in the build file instead of importing and using reflection there. Don't really know, I'm just spitballing ideas here.The text was updated successfully, but these errors were encountered: