PetarKirov / dlang.nix

Nix expressions for building D compilers
MIT License
6 stars 2 forks source link

refactor(pkgs): Remove obsolete code and streamline the implementation' #53

Closed PetarKirov closed 5 months ago

PetarKirov commented 7 months ago
dukc commented 6 months ago

ping @PetarKirov what's the status on this?

github-actions[bot] commented 5 months ago

Thanks for your Pull Request!

Below you will find a summary of the cachix status of each package, for each supported platform.

package x86_64-linux x86_64-darwin aarch64-darwin
dmd ✅ cached ✅ cached 🚫 not supported
dmd-2_092_1 ✅ cached ✅ cached 🚫 not supported
dmd-2_096_1 ✅ cached ✅ cached 🚫 not supported
dmd-2_098_1 ✅ cached ✅ cached 🚫 not supported
dmd-2_100_2 ✅ cached ✅ cached 🚫 not supported
dmd-2_102_2 ✅ cached ✅ cached 🚫 not supported
dmd-2_103_1 ✅ cached ✅ cached 🚫 not supported
dmd-2_104_2 ✅ cached ✅ cached 🚫 not supported
dmd-2_105_2 ✅ cached ✅ cached 🚫 not supported
dmd-binary-2_079_1 ✅ cached ✅ cached 🚫 not supported
dmd-binary-2_080_1 ✅ cached ✅ cached 🚫 not supported
dmd-binary-2_081_2 ✅ cached ✅ cached 🚫 not supported
dmd-binary-2_082_1 ✅ cached ✅ cached 🚫 not supported
dmd-binary-2_083_1 ✅ cached ✅ cached 🚫 not supported
dmd-binary-2_084_1 ✅ cached ✅ cached 🚫 not supported
dmd-binary-2_085_1 ✅ cached ✅ cached 🚫 not supported
dmd-binary-2_086_1 ✅ cached ✅ cached 🚫 not supported
dmd-binary-2_087_1 ✅ cached ✅ cached 🚫 not supported
dmd-binary-2_088_1 ✅ cached ✅ cached 🚫 not supported
dmd-binary-2_089_1 ✅ cached ✅ cached 🚫 not supported
dmd-binary-2_090_1 ✅ cached ✅ cached 🚫 not supported
dmd-binary-2_098_0 ✅ cached ✅ cached 🚫 not supported
dmd-bootstrap ✅ cached ✅ cached 🚫 not supported
dub ✅ cached ✅ cached ✅ cached
dub-1_30_0 ✅ cached ✅ cached ✅ cached
ldc ✅ cached 🚧 known to fail (disabled) 🚧 known to fail (disabled)
ldc-1_30_0 ✅ cached 🚧 known to fail (disabled) 🚧 known to fail (disabled)
ldc-binary-1_19_0 ✅ cached ✅ cached 🚫 not supported
ldc-binary-1_25_0 ✅ cached ✅ cached ✅ cached
ldc-binary-1_28_0 ✅ cached ✅ cached ✅ cached
ldc-binary-1_32_1 ✅ cached ✅ cached ✅ cached
ldc-binary-1_34_0 ✅ cached ✅ cached ✅ cached
ldc-bootstrap ✅ cached ✅ cached ✅ cached
PetarKirov commented 5 months ago

ping @PetarKirov what's the status on this?

@dukc

It turns out that using a newer version of LDC to compile older versions of DMD is way harder than I imagined. There were some things that are expected, like older DMD versions using deprecated features (classes + alias this, warnings for unreachable code or delegates returning static arrays in extern (C++): blocks), which I was able to fix by:

With these changes, I was able to successfully build with LDC 1.34.0 binary the following versions:

However dmd-2_092_1, dmd-2_096_1, dmd-2_098_1 fail to build with some extremely cryptic errors... dmd does compile, however druntime fails to build with errors like

src/core/time.d(1882): Error: incompatible types for array comparison: string and string

CI link.

In the end, I got tired of making LDC 1.34.0 work as bootstrap compiler and reverter to 1.25.0, which is what your PR used.

I also tried using other LDC version I got the following results:

PetarKirov commented 5 months ago

I'm going ahead with merging this PR as I'd also like to take care of #66 and #55. That said, I'd appreciate if you have time to review this PR after that - I'll try to address your comments in a future PR.