-
Notifications
You must be signed in to change notification settings - Fork 704
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
Fix dropExeExtension on Windows #6287
Conversation
8a2393d
to
38db5ce
Compare
Cabal/Distribution/Simple/Utils.hs
Outdated
Windows -> ["", "exe"] | ||
Ghcjs -> ["", "exe"] | ||
Windows -> ["", ".exe"] | ||
Ghcjs -> ["", ".exe"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So technically this is breaking API compatibility since this is exported, but there don't seem to be any usages outside of Cabal oh hackage: https://codesearch.aelve.com/haskell/search?query=exeExtensions&insensitive=off&space=off&precise=on&sources=on
Furthermore <.>
doesn't care about the leading dot in the extension, so "foo" <.> "bar" == "foo" <.> ".bar" == "foo.bar"
.
on old GHCs. There's EDIT: which returns just |
|
38db5ce
to
78c4c18
Compare
How many revisions can a PR that essentially adds a |
Cabal codebase has the following property: if something is not fixed immediately as spotted, it will take years to be spotted again (and this fixed).
… On 7 Oct 2019, at 11.25, Daniel Gröber (dxld) ***@***.***> wrote:
How many revisions can a PR that essentially adds a "." possibly need!? ;-)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Well pretty much any codebase has that property ;) That's why I try to shoot patches as soon as I find issues. |
|
fa1caba
to
4527ed5
Compare
aef8a25
to
32e651d
Compare
Travis is green except for Mac, with one timeout and one network error :) |
32e651d
to
c9a447e
Compare
On Windows dropExeExtension doesn't actually drop the exe extension. We have splitExtension "foo.exe" == ("foo", ".exe") but the code is expecting just "exe" for the extension field. Among other things this makes guessToolFromGhcPath behave unexpectedly. Since takeVersionSuffix can't see past the extension the `null suf` case in mkGuesses will trigger which causes the versioned program path candidates to not be looked for.
c9a447e
to
22d5c84
Compare
On Windows dropExeExtension doesn't actually drop the exe extension. We have splitExtension "foo.exe" == ("foo", ".exe") but the code is expecting just "exe" for the extension field. Among other things this makes guessToolFromGhcPath behave unexpectedly. Since takeVersionSuffix can't see past the extension the `null suf` case in mkGuesses will trigger which causes the versioned program path candidates to not be looked for.
On Windows dropExeExtension doesn't actually drop the exe extension. We have splitExtension "foo.exe" == ("foo", ".exe") but the code is expecting just "exe" for the extension field. Among other things this makes guessToolFromGhcPath behave unexpectedly. Since takeVersionSuffix can't see past the extension the `null suf` case in mkGuesses will trigger which causes the versioned program path candidates to not be looked for.
On Windows dropExeExtension doesn't actually drop the exe extension.
We have
but the code is expecting just
"exe"
for the extension field.Among other things this makes
guessToolFromGhcPath
behaveunexpectedly. Since
takeVersionSuffix
can't see past the extension thenull suf
case inmkGuesses
will trigger which causes the versionedprogram path candidates to not be looked for.