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
idris: fix modules #33069
idris: fix modules #33069
Conversation
cc @mpickering |
@brainrape Perhaps you can try the heavily refactored infrastructure I have submitted in #31327 ? I think this problem is fixed there. |
@mpickering Looks like #31327 is stalled, in the mean time can we merge this one line change that fixes all the Idris libraries? |
@brainrape It worked properly last time I tried it? In what sense do you mean it is stalled? I don't have merge access to merge this change anyway sorry. |
@mpickering I support #31327, appreciate the work done there, and would like to see it merged. However, I got the impression that it is not making progress towards being merged (changes requested, possibly further review required, conflict with |
OK, I can't merge this but #31327 is finished from my perspective. I'll try to rebase it now. |
Thank you! Here's hoping it will make it all the way in this time. I'll close this when it does. |
Your change was already merged. |
@mpickering I'm not sure what you mean, the above commit seems unrelated to this. But lightyear and other idris libraries are broken in current master and need this PR to be fixed. Build output below:
|
Yes sorry, my comment was wrong. |
I rebased my other branch now if you want to try that for your use case. |
@mpickering I checked out your branch and the Idris modules are still broken, and fixed by this PR in the same way. In conclusion, the two PRs are unrelated and this should definitely be merged in any case. |
How are you building the packages? Are you using |
I included the build command and output, two comments up. |
Yes, eventually, I would use the lightyear derivation as an argument to |
Your command doesn't work for me. I then tried 87636ac3115920c71415f47ba6390031b01884d8git You can see that the platforms attribute is set in |
To actually try to build the lightyear package (and not just start a shell in the build env as above), I'd use |
yes, that works fine for me.
You can see the platforms attribute is set in the lightyear deviation? |
You have to add |
My
You can look in the lightyear derivation and see that it sets platforms! I don't know what else to suggest sorry. |
@mpickering yes, |
Not sure why you can't reproduce. The commit you mentioned above is broken for me, and works if I add the line in this PR. |
Which platform are you on? |
I can't find anther use of |
My platform is NixOS, as stated in the PR description. x86_64. I don't get it.. that attribute is really missing, and any package that uses Here's the story again, if it wasn't clear from the description. There's an I suspect you're somehow not building the right nixpkgs. I don't see how anything else (eg. sandbox) could affect this, I traced the evaluation and couldn't find any way to divine This discussion is getting a bit out of hand for a straightforward one-line change, and I'm sorry to mention this but a lot of the above comments didn't check out. I'm convinced though that we're both acting in good faith and want the same thing (working nixpkgs) so maybe we need a fresh perspective. Let's let someone else take a look. @joachifm could you check this out please? Basically:
On current master, It should fail with |
@infinisil tried it on IRC and got the same error message as you. I really wish I could reproduce this.. I have tried on master and my branch. |
@GrahamcOfBorg build idrisPackages.lightyear |
I am worried we're having some problems with non-reproducibility, reported by @FRidh earlier today: #33362 (comment) |
@GrahamcOfBorg build idrisPackages.lightyear |
Failure on aarch64-linux (full log) Partial log (click to expand)
|
Success on x86_64-linux (full log) Partial log (click to expand)
|
^ is this on this branch or master? |
Failure on x86_64-darwin (full log) Partial log (click to expand)
|
On this branch |
@brainrape on this branch. I think I can't reproduce this because I have "allowBroken" in my config but I can't work out how to properly disable it. |
Interesting… I don't know enough about Idris to understand why the error from Darwin failure doesn't occur on Linux. |
@brainrape Thank you very much for your patience. I can now reproduce this after unsetting @7c6f434c I think the failure is not to do with this patch but an already existing issue. |
Yes, but you may want to set a more narrow |
The right place would be on the haskell packages which are failing to build. I can't work out why they are though. Merging this is the right thing to do for now I think, however in future I think it would be better to set meta.platforms on a per idris module level as idris modules can call C FFI like haskell modules. |
Thank you for all your help in elucidating this issue. |
Motivation for this change
Some Idris modules (eg.
lightyear
, the non-builtin ones) were broken because they tried to use themeta.platforms
attribute from theidris
they were called with, but that was changed to a wrapper that didn't include the meta attribute, so the modules would not build with a missing attribute error.This PR reuses Idris'
meta.platforms
variable in the wrapper, so the modules build successfully.Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)