hakyll icon indicating copy to clipboard operation
hakyll copied to clipboard

The latest Hakyll.Web.Feed can not be compiled on Windows.

Open Hexirp opened this issue 6 years ago • 1 comments

Where there is a problem:

https://github.com/jaspervdj/hakyll/blob/1abdeee743d65d96c6f469213ca6e7ea823340a7/lib/Hakyll/Web/Feed.hs#L44-L58

Problem:

    C:\(private info)\hakyll\lib\Hakyll\Web\Feed.hs:46:18: error:
        ? Exception when trying to run compile-time code:
            C:\(private info)\hakyll\data/templates/rss.xml: openBinaryFile: does not exist (No such file or directory)
          Code: makeRelativeToProject "data/templates/rss.xml" >>= embedFile
        ? In the untyped splice:
            $(makeRelativeToProject "data/templates/rss.xml" >>= embedFile)
       |
    46 |     T.decodeUtf8 $(makeRelativeToProject "data/templates/rss.xml" >>= embedFile)
       |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This line causes this kind of error in Windows. I want to do a workaround: change the path with CPP. If you do not mind, I will send a pull request.

Hexirp avatar Jun 28 '18 09:06 Hexirp

I would happy to get a PR for this, thank you!

jaspervdj avatar Jun 28 '18 09:06 jaspervdj