gelisam / hawk

Haskell text processor for the command-line
Apache License 2.0
361 stars 20 forks source link

build with lts-16+ using MonadFail.fail #250

Closed juhp closed 3 years ago

juhp commented 3 years ago

This basically replaces/updates #227

juhp commented 3 years ago

(I removed a couple of redundant imports that were giving warnings)

juhp commented 3 years ago

So newest is failing because hint doesn't build yet with 9.0.1 (known issue). Not sure why oldest doesn't install the binary into ~/.local/bin. Otherwise the CI looks good to me.

(Strictly speaking the oldest supported LTS could be lts-15, though personally I don't really need ghc<8.8.4 on Fedora, but Ubuntu 20.10 is still shipping 8.8.3 (the coming release should support 8.8.4 apparently).)

gelisam commented 3 years ago

Thanks! By the way, I thought about our conversation yesterday about keeping the lower bounds as low as possible vs making sure those bounds are correct by building using those bounds in CI, and I think we can achieve both. Let's find the lowest version of our dependencies with which hawk still builds, and let's simply specify those versions in the extra-deps section of oldest-supported-lts.yaml!

gelisam commented 3 years ago

hint doesn't build yet with 9.0.1 (known issue)

I guess we'll just have to wait until the maintainers of hint fix that. oh wait, that's me ;) perhaps we could try to tackle that together next time?

gelisam commented 3 years ago

actually, now that I'm thinking about it some more, hint does support ghc-9.0.1!

I had to tweak hint's CI so it doesn't try to build with ghc-9.0.1 because one of its dependencies, ghc-paths, had a restrictive upper bound which was preventing a build plan from being found. That has since been fixed, so I'll re-enable ghc-9.0.1 in hint's CI. And then we should investigate why hawk is not working with ghc-9.0.1, because it shouldn't be hint's fault!

gelisam commented 3 years ago

Not sure why oldest doesn't install the binary into ~/.local/bin

Because the Build step (which runs stack install) is skipped! The code is only being build as a side-effect of stack test.

The reason the Build step is being skipped is that there used to be two steps, one with a hack for oldest, and one without a hack for stable. We deleted the step with the hack, but we forgot to modify the non-hack step so that it would also run with oldest: https://github.com/gelisam/hawk/pull/250/files#diff-b803fcb7f17ed9235f1e5cb1fcd2f5d3b2838429d4368ae4c57ce4436577f03fR62

gelisam commented 3 years ago

Turns out the version of hint which works with ghc-9.0.1 was not published on hackage yet. Now that I have published it, I believe newest should pass.

gelisam commented 3 years ago

github is making it needlessly-difficult to collaborate on a PR: I was not able to push commits on top of juhp:master so I created gelisam:monad-fail, and you were not able to push commits on top of gelisam:monad-fail so you created juhp:patch-4, and now I am not able to push ocmmits on top of juhp:patch-4 so I am forced to create yet another branch!

I have given you write access to gelisam/hawk, so you should now be able to push on top of gelisam:monad-fail.

gelisam commented 3 years ago

Closing in favour of #251.

juhp commented 3 years ago

Okay - you could also just have merged this and then fix up the remaining issues next :)

(I did check the "allow maintainer to make changes" box in this PR (also for the original PR I think), though I am not sure what that does exactly.)

gelisam commented 3 years ago

I did check the "allow maintainer to make changes" box in this PR (also for the original PR I think), though I am not sure what that does exactly.

I don't know either. Maybe I was allowed to push to juhp:patch-4 after all? I didn't try because I thought it was obvious that I would not be allowed, but maybe that was an incorrect assumption!