Skip to content

Backport fix for dropExeExtension to 3.0 branch #6300

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

Closed
wants to merge 1 commit into from

Conversation

DanielG
Copy link
Collaborator

@DanielG DanielG commented Oct 18, 2019

Backport of #6287 onto 3.0.

I would appreciate it if we could get a lib:Cabal point release for this out. I depend on it over in cabal-helper.

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.
@hvr
Copy link
Member

hvr commented Oct 18, 2019

@DanielG are you aware of a0d7bc8 ? I.e. are we sure this doesn't regress the thing I workarounded with said commit?

@DanielG
Copy link
Collaborator Author

DanielG commented Oct 18, 2019

I did not know about that commit. I don't see why this fix would regress it though? Doesn't look like it's even using dropExeExtension anywhere. You might be thinking of one of the earlier revisions of my fix where I modify exeExtensions, I didn't end up doing that in the end.

It looks like unlike my fix you didn't include a regression test so who can say. If you want your fixes to stay fixed that might well be a thing to do ;)

@DanielG
Copy link
Collaborator Author

DanielG commented Nov 15, 2019

Ping. CI Looks green apart from a windows failure which exists on 3.0 as well and some OSX timeouts.

Windows:

cabal.exe: filepath wildcard 'tests/README.md' does not match any files.
Command exited with code 1

@DanielG DanielG requested a review from 23Skidoo November 15, 2019 03:30
@phadej
Copy link
Collaborator

phadej commented Nov 15, 2019

cabal.exe: filepath wildcard 'tests/README.md' does not match any files.

looks like a failure in master we have atm, weird.

@phadej
Copy link
Collaborator

phadej commented Dec 15, 2019

Backported as in bf862b8

@phadej phadej closed this Dec 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants