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

Fix Bugzilla 20802 - Link failure with writefln #16200

Merged
merged 1 commit into from
Feb 18, 2024

Conversation

tim-dlang
Copy link
Contributor

@tim-dlang tim-dlang commented Feb 18, 2024

The issue is caused by compiling druntime/phobos and the application with different flags. The template instance for __switch_errorT is not included in the build of druntime/phobos, because they are compiled with -release. DMD will also not include it in an application compiled without -release, because it assumes, that it is already in druntime. See comment https://issues.dlang.org/show_bug.cgi?id=20802#c3 by Spoov.

The template instance for __switch_errorT is now always instantiated in druntime, so it is part of the ABI of druntime.

@dlang-bot
Copy link
Contributor

dlang-bot commented Feb 18, 2024

Thanks for your pull request and interest in making D better, @tim-dlang! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Auto-close Bugzilla Severity Description
20802 regression [REG2.088.0] Link failure with writefln

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 "stable + dmd#16200"

@tim-dlang tim-dlang force-pushed the issue20802 branch 2 times, most recently from 656c626 to 0793a64 Compare February 18, 2024 12:26
@tim-dlang tim-dlang changed the base branch from master to stable February 18, 2024 12:27
@ibuclaw
Copy link
Member

ibuclaw commented Feb 18, 2024

As a workaround the template instance for __switch_errorT is now always instantiated in druntime.

Why is this called a workaround? I think it'd be better to just say that this symbol is part of the druntime ABI (an ABI should be defined) and make it permanent.

The issue is caused by compiling druntime/phobos and the application
with different flags. The template instance for __switch_errorT is not
included in the build of druntime/phobos, because they are compiled
with -release. DMD will also not include it in an application compiled
without -release, because it assumes, that it is already in druntime.
See comment https://issues.dlang.org/show_bug.cgi?id=20802#c3 by Spoov.

The template instance for __switch_errorT is now always instantiated in
druntime, so it is part of the ABI of druntime.
@tim-dlang
Copy link
Contributor Author

Why is this called a workaround? I think it'd be better to just say that this symbol is part of the druntime ABI (an ABI should be defined) and make it permanent.

I changed the commit text.

@thewilsonator thewilsonator merged commit 6a2fe78 into dlang:stable Feb 18, 2024
44 of 46 checks passed
@ibuclaw ibuclaw mentioned this pull request Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants