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

Commits on Feb 3, 2024

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

    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.
    ibuclaw committed Feb 3, 2024
    Configuration menu
    Copy the full SHA
    af7bc99 View commit details
    Browse the repository at this point in the history