Closed ghost91- closed 6 years ago
Oh, just lovely. It looks like it's probably trying to pull in stuff from dxml.internal for the unit tests but failing for some reason. I really wish that the unit tests for libraries wouldn't get built like this. I'll probably have to do something ugly like version them all out with a different version identifier like is currently being discussed for Phobos. :|
Either way, I'll look into it, and hopefully, I can fix it today. Thanks for the bug report.
Great. It looks like dub builds dependencies with the unittest build if you build your project with the unittest build, which means that any versions I declare just for the unittest build for dxml end up being around for any project depending on it as well. That's going to make this a bit more interesting to fix... :|
Okay. I ended up creating a separate unit test build to fix the problem, which is annoying, but stupidly, it's the only way to not have dxml's unit tests built whenever a project depends on it and builds its own unit tests, and dxml's unit tests should only be built for dxml, regardless of linker errors.
the following program results in linker errors:
compile it with
dub run --single --build=unittest bug.d
wherebug.d
is a file containing the above code. The problem does not only appear with single file dub projects, but with regular projects, too. This is just a minimal example.I am using Arch Linux (kernel 4.15.2-2-ARCH) and dmd v2.078.2.
Here are the error messages: