Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the Phobos v3 unit tests to the regular unittest build. #8972

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jmdavis
Copy link
Member

@jmdavis jmdavis commented Apr 6, 2024

This probably isn't the best way to do this, and presumably, it'll need to be reworked at some point (just like the Phobos v3 build in general likely will need to be reworked), but this should at least make it so that the Phobos v3 tests get run as part of the CI.

@jmdavis jmdavis added the Phobos 3 The PR is for Phobos V3. label Apr 6, 2024
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @jmdavis!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + phobos#8972"

@jmdavis
Copy link
Member Author

jmdavis commented Apr 6, 2024

Hmmm. It looks like the Linux, Mac, and FreeBSD VMs are all missing dub, and for better or worse, the Phobos v3 build uses dub, so those VMs don't work work with this. And the Windows x64 one is failing with an error that I don't understand

/usr/bin/link: extra operand '/OPT:ICF'
Try '/usr/bin/link --help' for more information.
Error: C:\Program Files\Git\usr\bin\link.exe failed with status: 1
Error C:\hostedtoolcache\windows\dc\ldc2-1.37.0\x64\ldc2-1.37.0-windows-multilib\bin\ldc2.exe failed with exit code 1.

And then buildkite is failing with

Error Package with target type "none" must have dependencies to build.

implying that there's probably something about the dub.sdl file that doesn't work with the version of dub that it's running, but I don't know.

So, I'm not quite sure what to do here. Obviously, the test runners in general are not set up to use dub.

@thewilsonator
Copy link
Contributor

#8992 should fix the lack of dub problems, the windows failure I have no idea.

This probably isn't the best way to do this, and presumably, it'll need
to be reworked at some point (just like the Phobos v3 build in general
likely will need to be reworked), but this should at least make it so
that the Phobos v3 tests get run as part of the CI.
@kinke
Copy link
Contributor

kinke commented May 3, 2024

The host compiler needs to be activated first, see e.g. https://github.com/dlang/dmd/blob/e5d7779794a1df4aa607e1ca989b3adf1f14073c/ci/run.sh#L130-L158. Then when using dub naively like this, it will most likely use the host compiler to compile Phobos, not fresh DMD master/stable.

The Windows issue is actually an LDC problem, which assumes link.exe in PATH is the MS one, not the GNU one. But when using DMD as compiler, not the LDC host compiler, that problem vanishes too.

@kinke
Copy link
Contributor

kinke commented May 3, 2024

Extra care might also be required to make sure that Phobos v2 isn't importable and linked-in by default, only depending on druntime alone. As DMD doesn't have separate druntime and Phobos libs, but merges both to a single lib, that might be more difficult than it sounds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Phobos 3 The PR is for Phobos V3.
Projects
None yet
6 participants