ndmitchell / ndmitchell/hlint

Binaries using hlint have hlint_datadir hardcoded to build directory, not destroot

Open
#699 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Haskell
Stars
1.6k
Forks
210
PR merge metrics
No merged PRs in 30d

Description

I’m trying to port IHaskell to MacPorts. IHaskell uses hlint.

The issue is that both stack and cabal builds create binaries that point to the build directory in .stack or .cabal-sandbox, not the install directory with prefix, say, /opt/local/bin. After the build, these temporary build directories are discarded, and neither ihaskell nor hlint binaries work.

I see that there is an hlint --datadir option:

https://github.com/ndmitchell/hlint/blob/c62b61696621cd5ebba408ec5bcc2fcdadb603cc/cc/Engine.hs#L65-L70

It seems like it should be straightforward, but I’m not sure how to build projects that use hlint to set its data directory to have prefix /opt/local so that destrooting the build will work.

Any pointers would be appreciated.

Related:

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with cc/Engine.hs at the linked datadir handling and reproduce a stack or cabal build that installs outside its temporary build directory. Determine how the installed binary should locate its data directory; done means hlint and dependent IHaskell binaries continue working after .stack or .cabal-sandbox are removed and use the destroot prefix.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.