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

README.md: Add v2 changelog #82

Merged
merged 1 commit into from
May 31, 2024
Merged

Conversation

the-horo
Copy link
Collaborator

I've tried to document all the meaningful changes from v2 to v1. I have skipped some as I am uncertain of their merit:

  1. On windows the dub binary that comes with the compiler is no longer deleted when the user specifies the dub: parameter. I don't know why the old code was doing it but CI does pass without it. The relevant snippet of the old code:

    setup-dlang/src/main.ts

    Lines 50 to 58 in 2979e3e

    if (process.platform === "win32") {
    console.log("Removing: " + dc_path + descr.binpath + "\\dub.exe");
    await rmRF(dc_path + descr.binpath + "\\dub.exe");
    await descr.libpath.forEach(function(libpath) {
    const path = dc_path + libpath;
    console.log("Removing: " + path + "\\dub.exe");
    return rmRF(path + "\\dub.exe");
    });
    }

  2. On arm64 macos, with ldc older then 1.30.0_beta1 (the first universal release) the only library directory that is added to LD_LIBRARY_PATH is lib, not lib-x86_64 or lib-arm64. The old code is:

    setup-dlang/src/compiler.ts

    Lines 289 to 313 in 2979e3e

    case "darwin":
    var arch: string = "";
    switch (process.arch) {
    case "ia32":
    case "x64": arch = "x86_64"; break;
    case "arm":
    case "arm64": arch = "aarch64"; break;
    }
    return cmpSemver(parseSimpleSemver(version),
    [1, 30, 0, ["beta1"]]) >= 0 ?
    {
    name: "ldc2",
    version: version,
    url: `${base_url}-osx-universal.tar.xz`,
    binpath: `/ldc2-${version}-osx-universal/bin`,
    libpath: [`/ldc2-${version}-osx-universal/lib-arm64`, `/ldc2-${version}-osx-universal/lib-x86_64`],
    dub: await dub(dub_vers, gh_token, false)
    } : {
    name: "ldc2",
    version: version,
    url: `${base_url}-osx-${arch}.tar.xz`,
    binpath: `/ldc2-${version}-osx-${arch}/bin`,
    libpath: [`/ldc2-${version}-osx-${arch}/lib-arm64`, `/ldc2-${version}-osx-${arch}/lib`],
    dub: await dub(dub_vers, gh_token, false)
    };
    The difference is that ldc2 on x86_64 will no longer have lib-arm64 added to LD_LIBRARY_PATH. Now I think that this is a mistake and that directory should be added but I want to confirm this first. ldc2 is configured to use that directory but since the actions says that it will be added to LD_LIBRARY_PATH I want to be certain that this is the right thing to do.

Signed-off-by: Andrei Horodniceanu <[email protected]>
@kinke
Copy link
Contributor

kinke commented May 31, 2024

No idea if anyone relies on LD_LIBRARY_PATH for something else, but AFAIK that's only needed for DMD, when linking with -defaultlib=libphobos2.so, as it doesn't include any rpath. LDC does by default when linking with -link-defaultlib-shared (the rpath setting in etc/ldc2.conf). Edit: Oh and no idea about GDC.

@the-horo
Copy link
Collaborator Author

Sometimes I forget that what Gentoo does is not the same as everyone else. I though dmd also included the rpath in its config file by default which it apparently doesn't. I was thinking that LD_LIBRARY_PATH was just a niche addition the action provided, not that dmd depended on it. Thanks for pointing that out.

If this is the case and the release already has breaking changes is it good to only add it for dmd?

Oh and no idea about GDC.

Well, on linux distros, gdc is a part of gcc so it will probably respect whatever the distro sets up for gcc so it shouldn't need us to specify anything to it. + we only support gdc on ubuntu so there are a small number of configurations we need to account for.

@WebFreak001 WebFreak001 merged commit ff37cc1 into dlang-community:v2 May 31, 2024
86 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants