Skip to content

Allow .exe executables on Windows #172

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 2 commits into from
Jun 20, 2022
Merged

Allow .exe executables on Windows #172

merged 2 commits into from
Jun 20, 2022

Conversation

shivjm
Copy link
Contributor

@shivjm shivjm commented Jun 20, 2022

This resolves the issue I mentioned in #110 (comment)—I have dart.exe, the library expects only dart.bat—and makes the failing tests pass on Windows.

Part of why the tests were failing is that (f-join (f-root) "/flutter") ⇒ "/flutter" even on Windows, where it should be "c:/flutter", because (f-absolute-p "/flutter") ⇒ t. I solved this by removing the leading slashes on the directories being joined to (f-root), which I believe will produce the correct result on all platforms.

Copy link
Member

@ericdallo ericdallo left a comment

Choose a reason for hiding this comment

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

Looks good, thank you for looking at the tests too

@ericdallo
Copy link
Member

Could you fix the tests please @shivjm ?

@shivjm
Copy link
Contributor Author

shivjm commented Jun 20, 2022

Ah, blast, I thought this would work no matter the platform. It’s tricky because I don’t have a Linux-based Emacs, but let me see if I can figure it out.

@shivjm
Copy link
Contributor Author

shivjm commented Jun 20, 2022

I tried this with Emacs under WSL and all the tests passed. Let me try creating an Ubuntu VM and repeating the tests.

EDIT:
That let me reproduce the issue. Let’s see what I can do.

@shivjm
Copy link
Contributor Author

shivjm commented Jun 20, 2022

I found the issue. My changes replaced file-regular-p with file-executable-p, but the files in the fixtures/ directory aren’t executable. I’ve reverted to file-regular-p, which makes the tests pass on all platforms.

My apologies for having introduced new issues!

@shivjm
Copy link
Contributor Author

shivjm commented Jun 20, 2022

The two three failed runs look to be the result of network issues.

@jcs090218
Copy link
Member

nix isn't very stable recently. It should be good once @ericdallo has re-run the failed jobs!

@ericdallo
Copy link
Member

Thanks for fixing windows issues as well @shivjm!

@ericdallo ericdallo merged commit 7868b87 into emacs-lsp:master Jun 20, 2022
@shivjm shivjm deleted the improve-windows-support branch June 20, 2022 16:14
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