Skip to content

build-script: always use the just-built swift compiler to build SwiftSyntax. #21

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

nkcsgexi
Copy link
Contributor

@nkcsgexi nkcsgexi commented Nov 2, 2018

Since we can now use SwiftPM from the build environment to build SwiftSyntax,
we need to teach SwiftPM to always use the just-built swift compiler instead
of the one from the environment. This ensures the binary compatibility of the
SwiftSyntax dylib and the rest part of the stdlib.

…Syntax.

Since we can now use SwiftPM from the build environment to build SwiftSyntax,
we need to teach SwiftPM to always use the just-built swift compiler instead
of the one from the environment. This ensures the binary compatibility of the
SwiftSyntax dylib and the rest part of the stdlib.
@nkcsgexi
Copy link
Contributor Author

nkcsgexi commented Nov 2, 2018

@swift-ci please test

@@ -364,6 +364,8 @@ def main():
sys.exit(1)

try:
_environ = dict(os.environ)
os.environ['SWIFT_EXEC'] = args.swiftc_exec
Copy link
Member

@rintaro rintaro Nov 2, 2018

Choose a reason for hiding this comment

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

Instead of mutating os.environ, you should use env= argument for subprocess.check_call().

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point! I'll make another PR.

@nkcsgexi nkcsgexi closed this Nov 2, 2018
adevress pushed a commit to adevress/swift-syntax that referenced this pull request Jan 14, 2024
Improve method chaining, especially involving trailing closures.
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.

2 participants