yesodweb / yesod-scaffold

The Yesod scaffolding, with branches for different versions.
MIT License
75 stars 39 forks source link

Update templates to use a newer LTS. #205

Open lowderdev opened 3 years ago

lowderdev commented 3 years ago

I was recently trying to setup a yesod project and ran into this issue with ghc and macOS Big Sur.

The current yesod templates resolve at lts-16.31, which uses ghc 8.8.4, which doesn't include the Big Sur fix. We were able to update to lts-18.10 with these changes.

Are these updates we could make to this repo so that newer yesod projects can benefit from newer versions of ghc and various packages?

I'd be happy to contribute to this, although I'm very much a beginner Haskeller and would likely require a lot of guidance. 😅

snoyberg commented 3 years ago

Definitely updates we could make! Most likely it's just a matter of updating the upper bounds on package requirements. If you'd like to take a crack at it, that would be awesome. Happy to provide guidance, though for personal reasons it may be more sporadic than usual.

lowderdev commented 3 years ago

Awesome! I'll take a stab. :)

StevenXL commented 2 years ago

I too was wondering about updating the LTS to the latest. After using the current template for yesodweb/postgres, I ended up deleting all the bounds in package.yaml and updated stack.yaml to use LTS 19.17. Then I ran stack build and stack exec -- yesod devel and things seem to be working.

Is this not a thing we can do? I thought that the point of a snapshot is that it locks down the packages to specific versions; why (re)state the versions in the package.yaml?

Oh yea - I also had to add some language pragmas to _Models.hs.

snoyberg commented 2 years ago

The scaffold doesn't include the stack.yaml in it, we use package.yaml to guide Stack to choose a compatible resolver.

StevenXL commented 2 years ago

The scaffold doesn't include the stack.yaml in it, we use package.yaml to guide Stack to choose a compatible resolver.

Thanks Michael. I guess I could take a look at my project's 'stack la dependencies', update 'package.yaml', and let Stack do the rest.

I'll give it a shot whenever I can. Right now I have a 5-month old that refuses to nap! 😅

snoyberg commented 2 years ago

Right now I have a 5-month old that refuses to nap!

I can fully relate to this statement :)