Skip to content
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

[SwiftScan] Add APIs to load/check libSwiftScan directly #1529

Merged

Conversation

cachemeifyoucan
Copy link
Contributor

Add APIs for SwiftDriver library users to directly load/check the libSwiftScan directly before calling into its function.

  • Add APIs to query Driver for libSwiftScan location
  • Make verifyOrCreateScannerInstance to be public APIs to load or check the libSwiftScan.
  • Update verifyOrCreateScannerInstance to be more ergonomic to use. The function only returns true if the given path to libSwiftScan does not exist while most of the time caller actually errors out in those cases. Make throwing error the default behavior and caller can check for file existance before calling the function to perserve old behavior.

@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please test

@cachemeifyoucan
Copy link
Contributor Author

ping

Add APIs for SwiftDriver library users to directly load/check the
libSwiftScan directly before calling into its function.

* Add APIs to query Driver for libSwiftScan location
* Make `verifyOrCreateScannerInstance` to be public APIs to load or
  check the libSwiftScan.
* Update `verifyOrCreateScannerInstance` to be more ergonomic to use.
  The function only returns true if the given path to libSwiftScan does not
  exist while most of the time caller actually errors out in those
  cases. Make throwing error the default behavior and caller can check
  for file existance before calling the function to perserve old
  behavior.
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please test

@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please test windows platform

@cachemeifyoucan
Copy link
Contributor Author

@artemcm @owenv Does those new APIs look ok to you?

Copy link
Contributor

@owenv owenv 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 ok to me, but I think @artemcm should review too

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.

Looks good to me!

@cachemeifyoucan cachemeifyoucan merged commit 3499bd1 into swiftlang:main Jan 30, 2024
3 checks passed
@cachemeifyoucan cachemeifyoucan deleted the eng/PR-swift-scan-lib-api branch January 30, 2024 17:21
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