Open sjakobi opened 7 years ago
Yes, I think this is a good idea. It slims down the package a bit.
Do you want to keep hakyll-init
in this repo or should it be moved into a separate repo?
In the first case, hakyll-init's files should be moved into a new top-level directory hakyll-init
, leaving all other files in their current place, right?
I think it is a bit cleaner to do it in a separate repository. I will set up a new empty repository and give you push access.
I think it is a bit cleaner to do it in a separate repository.
The decision is up to you of course, but I think there's a downside to this approach:
Any feature or issue that affects both hakyll-the-library and hakyll-init will have to be tracked across two repos now, requiring i.e. two PRs instead of one. The increased troublesomeness of changing both packages might result in the two packages going out of sync and hakyll-init getting less love than needed.
OTOH I don't have much experience with library maintenance so maybe there's a strong upside to separating the repos too…
Yeah, I realize that, and I've discussed the monorepository approach many times. There's definitely huge wins, but since Hakyll is fairly mature, I don't expect that there will be many PRs that affect both libraries.
https://github.com/jaspervdj/hakyll-init is a complete package now (and has a first bug too!)
TODOs:
stack install hakyll-init
I've decided to put this off for now. It doesn't really have any advantages except for Stack users, where it offers slightly faster install times & less disk space.
However, for Stack users, I believe the templates solution is better anyway, so we should use that instead. It seems like some changes are being made to the hsfiles
format, so we'll see how that goes.
Ok!
It seems like some changes are being made to the hsfiles format, so we'll see how that goes.
Do you have a link for that?
The README for stack-templates says:
There are plans to change the way Stack templates are done in the near future. Therefore, the project is not accepting new templates at this moment.
This doesn't sound to me like they are planning to change the .hsfiles format. I think they simply want to move away from having a single central template repository at https://github.com/commercialhaskell/stack-templates and instead have package maintainers distribute their templates on Hackage (as discussed in https://github.com/commercialhaskell/stack/issues/2681).
EDIT: I now see that they're also discussing a new template format in https://github.com/commercialhaskell/stack/issues/2681#issuecomment-251869389. I'd expect that format to be an alternative to .hsfiles though, not a replacement.
In summary I think we can expect that thestack new MY_PKG TEMPLATE_URL
syntax will still work with the same .hsfiles format in a few months.
Which means that we can move forward with creating a template for hakyll. I'll probably submit a PR to that effect in the next 2 to 3 weeks.
I'm not yet sure what to do about the haskell-logo.png file though. It doesn't seem as if stack templates (or mustache templates in general) support binary files. I have created a StackOverflow question to be sure. Maybe we can replace it with an SVG?
Motivation:
With very dependencies, hakyll-init would be very quick to install
As the installation instructions currently stand, the
stack install hakyll
command to install hakyll-init doesn't necessarily use a similar Stackage snapshot as the stack project that contains the actual site. This means that many dependencies may have to be compiled twice leading to large disk space consumption.With very few dependencies, hakyll-init would be compatible with virtually any Stackage snapshot, making the command
stack install hakyll-init
unlikely to fail for compatibility reasons.Alternatively, hakyll-init could be replaced or supplemented by a stack template. The installation instructions could then look like this: