Closed CodingRays closed 2 years ago
Would you mind telling me the platform/target-triple used to build?
The break
statement you're referring to was added to fix #6 I believe, so we might need to find another solution to the problem.
I tested both on x86_64-pc-windows-msvc and x86_64-unknown-linux-gnu. I have only validated that this causes the issue on linux but everything is looking like the issues i had with windows was due to the same problem.
If another solution is necessary it might also be worth looking at the output file name. I noticed that right now it just uses the first output file. But when a crate has multiple types that might not be the one that is desired. For a concrete example i need my crate to be both "cdylib" and "lib" because otherwise examples dont build. But in the output the rlib file is listed first.
I was originally planning to add that as another issue but i wasnt able to test it yet so im just mentioning it here.
The thing is I don't wanna rely on mapping file extensions for each OS type since it'd be a pain to expand, but I don't think there's a proper way out of this.
Also I didn't really think about the possibility of multiple crate types so I'm gonna create another issue to handle that. (#8)
Currently back at home and trying to fix this, do you have a Discord account/server so that we can investigate the issue further? I don't really have a way to test x86_64-pc-windows-msvc
so that might come in handy.
When building a rust project that uses a build script the wrapper bundles the compiled build script instead of the final library.
During debugging i figured out quiet a bit about this issue and i think the problem is as follows: The wrapper code attempts to find the first compiler artifact in the output log whose manifest file is equal to the crate being built. However when compiling a crate using a build script the compiler will output an artifact message with the crate manifest file for the build script binary before outputting the artifact for the compiled library.
Based on this one fix might be to remove the break statement after finding a potential artifact. But i am not sure if there could be any other artifacts generated after the library.