You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Embeds data files so the hlint executable is self contained.
This allows for easy packaging with stack and cabal.
And enables hlint to be used as a library without shipping data files.
It's not just nicer for using hlint as a library it's nicer when using the executable too. I'm on a 256G laptop and I delete ~/.stack when ever it gets past 10G. I install hlint using stack install, so when I delete ~/.stackhlint has to be rebuilt, just to get 3 data files.
Here's a commit using file-embed. The TH is relegated to one file. The executable actually gets slightly smaller 48117184 to 48020968 (GHC 8.8).
TemplateHaskell is confined to src/EmbedData.hs. If it causes a problem on a particular platform, an alternative module could be conditionally compiled with the old readFile $ cmdDataDir </> "default.yaml" method.
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! Given what you've said, and the obvious benefits, it does seem like this is the right way to go to simplify everything. Let's address the remarks in the PR and then I'll merge.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes:#699
Embeds data files so the hlint executable is self contained.
This allows for easy packaging with stack and cabal.
And enables hlint to be used as a library without shipping data files.
From #620 (comment)