Skip to content

Fix line-directive-tool not being able to invoke swiftc.exe on Windows #6824

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
Jan 15, 2017
Merged

Fix line-directive-tool not being able to invoke swiftc.exe on Windows #6824

merged 1 commit into from
Jan 15, 2017

Conversation

hughbe
Copy link
Contributor

@hughbe hughbe commented Jan 14, 2017

  • The first argument of command_args is the process to open.
  • subprocess.Popen doesn't normalise arguments.
  • This means that trying to open a non-normalised file (e.g. C:/swift/./bin/swiftc.exe) on Windows results in file/directory not found errors, as Popen delegates to the Win32 CreateProcess API.
  • Unix systems handle non-normalised paths, so don't have this problem.
  • Arguments passed to the process are normalised by the process, so are not affected.

@slavapestov
Copy link
Contributor

@swift-ci Please smoke test

@compnerd
Copy link
Member

This seems pretty reasonable, unfortunate, but reasonable.

@compnerd compnerd merged commit 6a06436 into swiftlang:master Jan 15, 2017
@hughbe hughbe deleted the line-directive-invoke branch January 15, 2017 19:18
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