kowainik / kowainik/extensions
Expect to be run at project root
- Dominant language
- Haskell
- Stars
- 48
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
I hit this problem when trying to use the `getPackageExtentions` function pointing to a cabal file that is not my current directory, but I can also exhibit it using the CLI:
```
…/ext-stats $ extensions --cabal-file-path hackage/3dmodels-0.3.0/*.cabal
ⓘ Extensions for each module combined with 'default-extensions'
…/ext-stats $ cd hackage/3dmodels-0.3.0
…/hackage/3dmodels-0.3.0 $ extensions --cabal-file-path *.cabal
ⓘ Extensions for each module combined with 'default-extensions'
Graphics/Model/DirectX.hs
OverloadedStrings
RecordWildCards
Graphics/Model/MikuMikuDance.hs
Graphics/Model/MikuMikuDance/Loader.hs
OverloadedStrings
Graphics/Model/MikuMikuDance/Types.hs
Graphics/Model/Obj.hs
OverloadedStrings
TupleSections
```
I would expect it to find the source code relative to the given cabal file.
Also, as a feature request, it might be nice if I can just pass a path to a directory, and it will use the (existing) logic to find the `.cabal` file therein.
Contributor guide
Research direction
Start by tracing the CLI's --cabal-file-path handling and the getPackageExtentions function, then reproduce the command from the project root with a Cabal file in another directory. Compare it with running inside the package directory. Done means source files are found relative to the supplied Cabal file, with the directory-path request considered separately.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100