Skip to content

Conversation

@stevapple
Copy link
Contributor

The arguments is modified by Driver.invocationRunMode, so the first element is no longer the driver itself.

I’m surprised that no one has discovered this so far👀

The `arguments` is modified by `Driver.invocationRunMode`, so the first
element is no longer the driver itself.
@stevapple
Copy link
Contributor Author

Question: Why were we replacing the arguments here?

The subsequence is that after replacing /path/to/swift build with swift-build, SwiftPM cannot know its real path, causing tools to be not found.

This should fix the problem of SwiftPM and other tools not knowing
where themselves are.
@stevapple
Copy link
Contributor Author

cc @artemcm

@stevapple
Copy link
Contributor Author

Ping

@artemcm
Copy link
Contributor

artemcm commented Aug 15, 2022

@swift-ci please test

Copy link
Contributor

@artemcm artemcm left a comment

Choose a reason for hiding this comment

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

This looks correct to me, thank you.

@stevapple
Copy link
Contributor Author

Anyone to merge now?

@stevapple
Copy link
Contributor Author

Ping again for anyone with access to merge:)

@stevapple stevapple changed the title Fix looking up for self (the driver executable) Fix up self-discovery of Swift Driver and tools Sep 11, 2022
@stevapple
Copy link
Contributor Author

@artemcm It seems ready for merge now?

@artemcm
Copy link
Contributor

artemcm commented Sep 16, 2022

@swift-ci please test

@artemcm
Copy link
Contributor

artemcm commented Sep 16, 2022

@swift-ci please test Windows platform

1 similar comment
@artemcm
Copy link
Contributor

artemcm commented Sep 19, 2022

@swift-ci please test Windows platform

@artemcm
Copy link
Contributor

artemcm commented Sep 19, 2022

C:\Users\swift-ci\jenkins\workspace\swift-driver-PR-windows\swift\include\swift/Demangling/Errors.h(23): fatal error C1083: Cannot open include file: 'swift/shims/Visibility.h': No such file or directory

@compnerd does this look familiar?

@compnerd
Copy link
Member

Yes that seems familiar. swiftlang/llvm-project#5321 should have addressed that. https://ci-external.swift.org/job/oss-swift-windows-toolchain-x86_64-vs2019/ is also green currently.

@artemcm artemcm merged commit 4e924da into swiftlang:main Sep 19, 2022
@artemcm
Copy link
Contributor

artemcm commented Sep 19, 2022

A subsequent build passed. 👍🏼

@stevapple stevapple deleted the find-subcommand branch September 20, 2022 01:13
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