Closed miguel-negrao closed 2 years ago
Strange, the pull-request didn't trigger the action in this repo... Perhaps it's a security issue ?
Strange, the pull-request didn't trigger the action in this repo... Perhaps it's a security issue ?
Ok, needed to add "pull_request".
Doesn't build with ghc 9.2, some constraints would have to be relaxed I think. See here: https://github.com/miguel-negrao/essence-of-live-coding/runs/4780786282?check_suite_focus=true
Ok, it builds with cabal with 8.8 . I'll add that.
Does adding GHC 9.0 work?
Does adding GHC 9.0 work?
No. I think the constraints on some packages probably need to be changed. Check the logs here: https://github.com/miguel-negrao/essence-of-live-coding/runs/4780786282?check_suite_focus=true
Ok, I have 8.8.4 and 8.10.7 working: https://github.com/miguel-negrao/essence-of-live-coding/runs/4781303652?check_suite_focus=true
Does adding GHC 9.0 work?
No. I think the constraints on some packages probably need to be changed. Check the logs here: https://github.com/miguel-negrao/essence-of-live-coding/runs/4780786282?check_suite_focus=true
9.0.2 also fails, with problems in eolc code: https://github.com/turion/essence-of-live-coding/runs/4781676336?check_suite_focus=true
I suggest for now start with 8.8 and 8.10.
Added a cabal flag to show the result of the tests
There's an issue with the version of base in the cabal.project.freeze
...
I think the issue is that we need a different cabal.project and cabal.project.freeze file for each version of ghc, similarly to stack. That can be done as explained here (edit: changed the linked, copy-past problem). Will try to look at it tomorrow. Curiously the freeze files can be created from stackage for the required ghc version.
I think the issue is that we need a different cabal.project and cabal.project.freeze file for each version of ghc, similarly to stack.
Maybe I was wrong about the freeze files then. Maybe they simply shouldn't be committed.
I asked that on reddit now: https://www.reddit.com/r/haskell/comments/s4fcoy/should_i_commit_cabal_freeze_files_to_my_repo/?
For now, is it possible to simply overwrite the freeze file by calling cabal freeze
again on CI? (Pretty much reverting to the state it was before I said to remove the cabal freeze
step?)
That can be done as explained here.
Hmm, that issue doesn't seem to talk about cabal freeze
. Sure it's the one you wanted to link?
Sorry, the link was wrong, copy-paste issue, fixed it.
The freeze file will also pin the base version to the exact version used by the solver, therefore it will only work with a specific version of ghc. I've added two project and freeze files for the two ghc versions, and they build correctly. I didn't add a cabal.project.freeze file because then people trying to build the library with cabal build all
in their machine will not be able to do so unless they have the exact same ghc version, and that would be cumbersome I think. Stack doesn't have this problem as it will also fetch the right ghc as needed.
Does this look good ?
Squashed commits and cache seems to be working. The eolc libraries are always rebuilt but the dependencies are not.
The freeze files were created on my machine with
cabal freeze --project-file=cabal.project.8.8.4 -w ghc-8.8.4
cabal freeze --project-file=cabal.project.8.10.7 -w ghc-8.10.7
Removed stack.yaml.lock
file, not needed anymore.
Currently the CI doesn't build on windows or macos as we would need to conditionally build essence-of-live-coding-pulse
related packages. I think this would require a different cabal.project file for each OS too. See the log here. Good enough linux only for now ?
Good enough linux only for now ?
Yes, definitely!
Ideally, there would only be one cabal.project
text file, and the others should be symbolic links to that one. Is that possible?
Ideally, there would only be one
cabal.project
text file, and the others should be symbolic links to that one. Is that possible?
Done.
Awesome!
Solves #87