cabal new-install brittany fails #162
Labels
No Label
blocked: dependency
blocked: info-needed
bug
duplicate
enhancement
fixed in HEAD
help wanted
hs:arrows
hs:brackets
hs:classes
hs:comments
hs:do-notation
hs:guards
hs:lists
hs:operators
hs:patterns
hs:records
hs:types
invalid
language extension support
layouting
needs confirmation
priority: high
priority: low
question
revisit before next release
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: hexagoxel/brittany#162
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
The README suggests the following procedure
I wondered why
cabal new-install
would not work and indeed it doesn'tVery verbose output available in https://gist.github.com/gwils/918a8c5cf169716e9c5c502c0bb7f7f6
I am not sure if this is a problem in brittany or in cabal but hexagoxel on #hackage suggested I'd open the issue here. I might open it on cabal too.
@andreabedini
Could you try the following fix: In
brittany.cabal
, addto the executable component. Those lines are already present in the library component, but it looks like new-install needs it on all components. Which makes sense, all of them use the include. Kind of curious that this oversight was not noticed sooner :-)
Thanks @lspitzner. I did have a go but the problem seems more complex.
¯_(ツ)_/¯
Right, that was an uninformed suggestion. Presuming that it does not noticeably make anything worse I will include the potential fix in the next release (which is not too far away, ghc-8.6 compat). I don't see a need to make a release sooner just for testing this.
Fortunately I think that 4120 is not relevant as brittany does not use data-files.
We can leave this issue open as a reminder to test things after the next release.
@lspitzner btw, adding
include-dirs: srcinc
to the exe stanza is imo not the proper way to fix this!The problem is rather that
specifies the
install-includes
with an explicit path, instead ofthen things should work, and there'd be no need to change anything in the exe component.
@hvr oh, good point. thanks for the correction!
although.. i don't really see the need to expose
prelude.inc
outside of the package. So I guess removing "install-includes" entirely plus per-component "include-dirs" is the way to go?@lspitzner
Sorry for the late response. Yes, that sounds even better!
Should be fixed on master. At least I managed to get new-install to work once with the change in 784e4d0; it still does not like to overwrite existing symlinks it seems, and generally creates symlinks regardless of whether the build succeeded. When in doubt, delete existing symlink and look at verbose build output.
If this is confirmed to work we probably want a note in the README for this, too.
@lspitzner Have you tried w/ the latest cabal 2.4.1.0 release? that one shouldn't create symlinks on failure and be less silent about the failure, e.g.:
I just tested with cabal-install 3.0.0.0 (compiled using the same version of the cabal library)
passing
installdir
works correctly.Good work everyone! ❤️
I just realised
installdir is not defined
is because I didn't update.cabal/config
to version 3 (not that I was told to :P)Thanks for confirming @andreabedini
The README was very recently updated to mention that flag. Will be in the next release.