cabal init will relocate and rename project structure
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
**Describe the bug**
cabal init MOVEs preexisting data
**To Reproduce**
1) cabal fetch `$anything on hackage`
2) cabal init
**Expected behavior**
i expect (as in previous to cabal-install 3.8 or perhaps even much longer ago), that cabal init uses the preexisting project structure as hinting to suggest directory convention and what not. And not touch code if something already exists.
I do not expect that cabal init to MOVE/RENAME preexisting directories.
I expect cabal init to only clobber a preexisting `.cabal` file, and maybe LICENSE file. I'm not sure honestly. But i was definitely surprised by the moving.
**why did i do cabal init on a preexisting code base**
I wanted to generate a more modern `.cabal` file for a project!
Contributor guide
Research direction
Start by reproducing the issue with `cabal fetch` followed by `cabal init` on a project containing preexisting directories. Trace the `cabal init` entry point to identify where existing project data is moved or renamed. Done means existing code and directories remain untouched while a modern `.cabal` file is generated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- build-system, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100