Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
file-embed makes building more fragile ? #18
I love file-embed, but I'm not sure how to avoid file path-related breakage if I use it. I've embedded some docs in hledger. I'm seeing two problems:
I also don't know what's going on with the Travis failure, I haven't seen that kind of thing before, and I've used file-embed extensively in Travis and other CI-built projects.
As to point 1: I've actually given this some thought over the past few months for the same reasons you raise. My thought is that we could add functions that would make the embedded paths relative to the base of the package. The way this would work is:
That shouldn't be hard to implement, and I think will be reliable for most use cases. Thoughts?
Awesome, released to Hackage. I'm probably going to be rolling out similar
On Thu, Apr 21, 2016 at 5:33 PM, Simon Michael firstname.lastname@example.org
added a commit
Apr 21, 2016
I thought about that. However, that will:
I'm not feeling great about any of it TBH
I had a similar problem with
allFiles :: [(FilePath, B.ByteString)] allFiles = $(embedDir "test/BurntSushi")
allFiles :: [(FilePath, B.ByteString)] allFiles = $(makeRelativeToProject "test/BurntSushi" >>= embedDir)