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

[REG master] Explicitly instantiate StringValue!Type in dmd.mtype #16138

Merged
merged 1 commit into from Feb 4, 2024

Conversation

ibuclaw
Copy link
Member

@ibuclaw ibuclaw commented Feb 3, 2024

Previous history: #11827 #11838 #15854 #15872 #15873

Issue 21299 has reared its ugly head again, this time the revert needed to resolve it is:

--- a/compiler/src/dmd/dsymbolsem.d
+++ b/compiler/src/dmd/dsymbolsem.d
@@ -21,6 +21,7 @@ import dmd.arraytypes;
 import dmd.astcodegen;
 import dmd.astenums;
 import dmd.attrib;
+import dmd.blockexit;
 import dmd.clone;
 import dmd.cond;
 import dmd.dcast;

These code migrations between modules are making the import graph extremely brittle for compilers with the known template emission bug, and the relation between the bug and the change that triggered it is becoming less obvious.

In order to inure ourselves against these linker errors then, the String!Value type is now explicitly instantiated inside dmd.mtype. This is safe for compilers with and without the template issue, but it is put inside a static if block anyway to make it clear that it shouldn't be removed.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @ibuclaw!

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.

⚠️⚠️⚠️ Warnings ⚠️⚠️⚠️

  • In preparation for migrating from Bugzilla to GitHub Issues, the issue reference syntax has changed. Please add the word "Bugzilla" to issue references. For example, Fix Bugzilla Issue 12345 or Fix Bugzilla 12345.(Reminder: the edit needs to be done in the Git commit message, not the GitHub pull request.)

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

@ibuclaw ibuclaw added Regression PRs that fix regressions GDC Gnu D Compiler Blocking Other Work review and pulling should be a priority labels Feb 3, 2024
Issue 21299 has reared its ugly head again, this time the revert needed
to resolve it is:
```diff
--- a/compiler/src/dmd/dsymbolsem.d
+++ b/compiler/src/dmd/dsymbolsem.d
@@ -21,6 +21,7 @@ import dmd.arraytypes;
 import dmd.astcodegen;
 import dmd.astenums;
 import dmd.attrib;
+import dmd.blockexit;
 import dmd.clone;
 import dmd.cond;
 import dmd.dcast;
```

These code migrations between modules are making the import graph
extremely brittle for compilers with the known template emission bug,
and the relation between the bug and the change that triggered it is
becoming less obvious.

In order to inure ourselves against these linker errors then, the
`String!Value` type is now explicitly instantiated inside `dmd.mtype`.
This is safe for compilers with and without the template issue, but it
is put inside a `static if` block anyway to make it clear that it
shouldn't be removed.
@thewilsonator thewilsonator merged commit 1ff08ac into dlang:master Feb 4, 2024
46 of 48 checks passed
@ibuclaw ibuclaw deleted the fix_build_reg branch February 4, 2024 01:08
@ibuclaw ibuclaw mentioned this pull request Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge Blocking Other Work review and pulling should be a priority GDC Gnu D Compiler Regression PRs that fix regressions
Projects
None yet
3 participants