-
Notifications
You must be signed in to change notification settings - Fork 697
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
cabal-install HEAD trips assert in XDG paths mode #8533
Comments
Github won't let me attach the typescript, even as a tar.gz. It is available as https://www.dropbox.com/s/qd2zk9p3omj6lbc/typescript.txt.tar.gz?dl=0. |
Thank you for the report. Does it fail the same with @athas: the error message seems similar to what we are already getting in other tickets unrelated to XDG. Still, if you could have a look, experiment, diagnose a bit, that would be awesome. |
Same failure with Interestingly, I get a different failure mode if I start out with an unpopulated |
That's scary. Does I'm guessing blindly, but perhaps cabal compiled using ~./cabal, which got removed, so it created the XDG dirs and tried to continue (recompile), perhaps not noticing anything has changed. It certainly should not crash. |
It works if I use my existing There are no environment files anywhere except in a testbed that is sandboxed so it's not visible unless I use my sandbox script that alters I got this cabal binary from https://mail.haskell.org/pipermail/haskell-cafe/2022-October/135590.html (more specifically https://github.com/haskell/cabal/suites/8566596132/artifacts/383133509) so it should have no links to anything on my system, although I can't promise that it didn't get them from CI. I haven't tried clearing out the XDG locations with a cleared |
Please try The more bugs you find, the better. :) But if a smaller repro can be distilled, even exhibiting only one of the bugs, that's surely going to help. |
If a |
Were I doing it, I'd've probably looked for I mention this in part because at some point I'll want to test to see if https://github.com/phadej/cabal-extras works with the new cabal. |
Is there a public project that reproduces this behaviour? |
None that I know of. I may test it with a smaller project later, but as I have to knock the window manager down to make |
Sorry for the delay. I have reproduced the behavior after a |
In a checkout of https://github.com/geekosaur/xmonad.hs/tree/skkukuk I am trying the command
but that gives me another internal error:
Using the command
gives me the following non-internal error:
|
I hadn't noticed that it was using a non-master branch. Something is happening now. I'll see if I can reproduce the issue. |
Sorry, yes, |
Well, the repository builds for me, although I'm not using exactly the same binary you are. The binary linked from the mailing list post is produced from essentially a random commit (I think the newest |
Building now (with cabal 3.8.1.0 just in case). |
Well, it got significantly further but eventually failed with the same assertion. It also complained about the haddock documentation for |
@geekosaur would it be possible to post listings of output in a more accessible format? Like github gists or something. GitHub itself has a spoiler tag… I prefer to browse this bug tracker from mobile devices, and I see no way to access your links there. |
Github keeps insisting it doesn't support the file type I'm attaching, even if I change the extension etc. I'm still trying to figure out what it will actually let me attach. Also it's 4MB of output in the latest one (so after editing out control characters and renaming I now get "Something went really wrong"). I don'[t see a reasonable way to do it as a gist, either. |
I know the attaching problem: I hit it myself regularly. But I'm asking to avoid attaching in the first place, and simply to copy and paste plain text. Is this too painful? |
Have you tried to copy-paste 4MB of text before? (I think I just broke paste.tomsmeding.com.) Granting that's the most recent one, but earlier ones had other files along. In any case, yes I am trying to copy-paste if something will actually let me do it. |
Okay, gist seems to have taken after paste.comsmeding.com wedged on it: https://gist.github.com/geekosaur/c8d999ec2106bf88298b68ba94005031 |
I'm sorry I didn't know that it's that much text. I'm happy gist worked. |
I'm a bit stumped on this one as I cannot reproduce it. The assert that fires is this, but I don't have a real clear grasp of what it's checking or or when it might fail (or what it could possibly have to do with XDG). It's using this complex-looking function, but these are parts of cabal I've never had to touch. If the hash of a package (or its inputs) changes during compilation, I really wonder what could cause that. What does the generated |
I used the originally generated config, with one change: I set |
Fascinating thread... @geekosaur, one curious experiment that you may try is to build cabal master in the release mode, where asserts are no-ops (there's a project file for that on the root). Also, note that |
I used that project file to build, per the instructions in |
Are you sure you used the release project file? because that way built cabal wouldn't ever fail with an assertion, because assertions are disabled in the release mode. Documentation option shouldn't matter much when you build cabal itself. It can matter when you build something else. At least, that's what I saw in practice. |
I can reproduce the issue when I set |
It fails even without using XDG paths as soon as I set |
Note for anyone wanting to try this out at home: if you install a new |
It seems to also fail with 67b3c8d, which is the last commit before XDG was merged. I'll try a bisection to find the error. |
It fails with 3.8.1.0 in debug mode. I'm having trouble compiling 3.6.3.0, so I don't know how much further back I can go. |
From my shell history: |
That's probably because |
This means the "from git" build instructions in https://github.com/haskell/cabal/README.md are incorrect, since they say to use |
Oh, they do? That would indicate README is not aimed at devs ( |
That wasn't the thing I was pointing to, but instead that it explicitly specifies |
I thought if you are in a repo directory, the package is taken from the repo, not from Hackage. I thought that's the case always: both with single package repos when you specify the component and with multi-package repos, where you specify a package (or a package and component). Am I wrong? |
I have managed to build using a recent HEAD and |
Describe the bug
When attempting to use the new support for XDG paths, I got the following assertion fail:
To Reproduce
Move
~/.cabal
out of the way and attempt to build a project with a significant number of transitive dependencies.Expected behavior
Successful build and install, as with
~/.cabal
instead of XDG paths. (I forced a full build/install of that as well; I had been using ghc 8.10.7 so I upgraded it to match the version used withcabal
HEAD as of last week.)System information
The Glorious Glasgow Haskell Compilation System, version 9.2.4
Additional context
See the attached
typescript
taken withcabal -v3
as shown above.The text was updated successfully, but these errors were encountered: