Skip to content

Don't add extra-prog-path to ~/.config/cabal/config (#8951) #8952

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions cabal-install/src/Distribution/Client/Config.hs
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,6 @@ initialSavedConfig :: IO SavedConfig
initialSavedConfig = do
cacheDir <- defaultCacheDir
logsDir <- defaultLogsDir
extraPath <- defaultExtraPath
installPath <- defaultInstallPath
return
mempty
Expand All @@ -708,10 +707,6 @@ initialSavedConfig = do
{ globalCacheDir = toFlag cacheDir
, globalRemoteRepos = toNubList [defaultRemoteRepo]
}
, savedConfigureFlags =
mempty
{ configProgramPathExtra = toNubList extraPath
}
, savedInstallFlags =
mempty
{ installSummaryFile = toNubList [toPathTemplate (logsDir </> "build.log")]
Expand Down Expand Up @@ -810,16 +805,6 @@ defaultReportsDir :: IO FilePath
defaultReportsDir =
getDefaultDir XdgCache "reports"

defaultExtraPath :: IO [FilePath]
defaultExtraPath = do
mDir <- maybeGetCabalDir
case mDir of
Just dir ->
return [dir </> "bin"]
Nothing -> do
dir <- getHomeDirectory
return [dir </> ".local" </> "bin"]

defaultInstallPath :: IO FilePath
defaultInstallPath = do
mDir <- maybeGetCabalDir
Expand Down
2 changes: 1 addition & 1 deletion cabal-install/tests/IntegrationTests2.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2012,7 +2012,7 @@ testConfigOptionComments = do
"-- extra-lib-dirs" @=? findLineWith True "extra-lib-dirs" defaultConfigFile
"-- extra-lib-dirs-static" @=? findLineWith True "extra-lib-dirs-static" defaultConfigFile
"-- extra-framework-dirs" @=? findLineWith True "extra-framework-dirs" defaultConfigFile
"extra-prog-path" @=? findLineWith False "extra-prog-path" defaultConfigFile
"-- extra-prog-path" @=? findLineWith False "extra-prog-path" defaultConfigFile
"-- instantiate-with" @=? findLineWith True "instantiate-with" defaultConfigFile
"-- tests" @=? findLineWith True "tests" defaultConfigFile
"-- coverage" @=? findLineWith True "coverage" defaultConfigFile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ remote-repo-cache: /home/colton/.cabal/packages
-- extra-lib-dirs:
-- extra-lib-dirs-static:
-- extra-framework-dirs:
extra-prog-path: /home/colton/.cabal/bin
-- extra-prog-path:
-- instantiate-with:
-- tests: False
-- coverage: False
Expand Down
3 changes: 3 additions & 0 deletions changelog.d/issue-8951
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
synopsis: Don't add `extra-prog-path: ~/.local/bin` when initially creating `~/.config/cabal/config`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: I'd love a short description that would explain the benefit (which we all know, but that would save some pointer chasing for the casual reader in the changelog interface of the package index.)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sol: how about this extra explanation?

packages: cabal-install
issues: #8951