-
Notifications
You must be signed in to change notification settings - Fork 2
refactor(pkgs): Remove obsolete code and streamline the implementation' #53
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
Conversation
PetarKirov
commented
Mar 4, 2024
- config(git): Ignore ci-matrix artifacts
- refactor(pkgs/*/): Delete obsolete files
c6fd4df
to
3c78daa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good refactoring, although it unfortunately will have some merge conflicts with my LDC bootstrap PR. Apart from the question of merge conflicts, LGTM.
ping @PetarKirov what's the status on this? |
d69e238
to
24d1ed4
Compare
…json` in `.result`
24d1ed4
to
7f68e64
Compare
Given a D compiler derivation it returns attrset with information about it: ```nix getDCInfo flake.packages.x86_64-linux.ldc-binary-1_19_0 => { dmdWrapper = "/nix/store/r5lgfqaizak29kqdyqm0xswwh4v6c5pi-ldc-binary-1.19.0/bin/ldmd2"; dmdWrapperName = "ldmd2"; frontendVersion = "2.089.1"; name = "ldc"; } getDCInfo flake.packages.x86_64-linux.ldc-binary-1_34_0 => { dmdWrapper = "/nix/store/5yzmbwpcp3pdyjpixa4bf6m19xwqr22i-ldc-binary-1.34.0/bin/ldmd2"; dmdWrapperName = "ldmd2"; frontendVersion = "2.104.1"; name = "ldc"; } ```
The repl command starts `nix repl` with some variable bindings pre-loaded: * `flake` - this repo's flake * `pkgs` - the Nixpkgs instance used by the `flake` * `lib` - `pkgs.lib` * `utils` - this `flake`'s `lib` output Example usage: ``` $ repl 23.3s 15:20:19 2024-04-21 (Sun) Welcome to Nix 2.18.1. Type :? for help. Loading installable ''... Added 4 variables. utils.dc.getDCInfo p.dmd-binary-2_081_2 { name = "dmd"; dmdWrapperName = "dmd"; frontendVersion = "2.081.2"; dmdWrapper = "/nix/store/0by13q5vp3gzahksy49f0ig3l0pphm0m-dmd-binary-2.081.2/bin/dmd"; frontendVersionBetween = «lambda @ /nix/store/xpkyz8lw4wd7463jaqslz5lklga5y858-source/lib/dc.nix:136:9»; } nix-repl> utils.dc.getDCInfo p.ldc-binary-1_19_0 { name = "ldc"; dmdWrapperName = "ldmd2"; frontendVersion = "2.089.1"; dmdWrapper = "/nix/store/r5lgfqaizak29kqdyqm0xswwh4v6c5pi-ldc-binary-1.19.0/bin/ldmd2"; frontendVersionBetween = «lambda @ /nix/store/shpq48gdw7aadf0cz76vd8zi32dhsmj9-source/lib/dc.nix:136:9»; } nix-repl> utils.dc.getDCInfo p.ldc-binary-1_34_0 { name = "ldc"; dmdWrapperName = "ldmd2"; frontendVersion = "2.104.1"; dmdWrapper = "/nix/store/5yzmbwpcp3pdyjpixa4bf6m19xwqr22i-ldc-binary-1.34.0/bin/ldmd2"; frontendVersionBetween = «lambda @ /nix/store/qdxyn4gasfwh5i6fhi9pr8z4i8h1kg8l-source/lib/dc.nix:136:9»; } ```
bccb5f7
to
8922054
Compare
…allow building with newer host compilers
… versions Fixes the following errors: dmd> src/dmd/backend/cg.d(58): Error: delegate `dmd.backend.cg.__lambda20` cannot return type `bool[37]` because its linkage is `extern(C++)` dmd> src/dmd/backend/cg.d(74): Error: delegate `dmd.backend.cg.__lambda21` cannot return type `bool[37]` because its linkage is `extern(C++)` dmd> src/dmd/backend/cg.d(88): Error: delegate `dmd.backend.cg.__lambda22` cannot return type `ubyte[37]` because its linkage is `extern(C++)` dmd> src/dmd/backend/cg.d(150): Error: delegate `dmd.backend.cg.__lambda23` cannot return type `bool[37]` because its linkage is `extern(C++)` dmd> src/dmd/backend/var.d(269): Error: delegate `dmd.backend.var.__lambda92` cannot return type `uint[256]` because its linkage is `extern(C++)` dmd> src/dmd/backend/var.d(471): Error: delegate `dmd.backend.var.__lambda94` cannot return type `uint[256]` because its linkage is `extern(C++)` dmd> src/dmd/backend/var.d(514): Error: delegate `dmd.backend.var.__lambda95` cannot return type `ubyte[97]` because its linkage is `extern(C++)` dmd> src/dmd/backend/var.d(550): Error: delegate `dmd.backend.var.__lambda96` cannot return type `ubyte[97]` because its linkage is `extern(C++)`
LDC 1.32.1 and 1.34.0 fail to build dmd 2.098, 2.096 and 2.092.
Thanks for your Pull Request! Below you will find a summary of the cachix status of each package, for each supported platform.
|
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
With these changes, I was able to successfully build with LDC 1.34.0 binary the following versions:
However
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:
|