dlang-community / setup-dlang

Github action for dlang compiler setup
MIT License
46 stars 14 forks source link

README.md: Add v2 changelog #82

Closed the-horo closed 5 months ago

the-horo commented 5 months ago

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: https://github.com/dlang-community/setup-dlang/blob/2979e3ea011f6a234cd3a47dcbeb60f451c9635f/src/main.ts#L50-L58

  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: https://github.com/dlang-community/setup-dlang/blob/2979e3ea011f6a234cd3a47dcbeb60f451c9635f/src/compiler.ts#L289-L313 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.

kinke commented 5 months ago

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 commented 5 months ago

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.