-
Notifications
You must be signed in to change notification settings - Fork 194
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
Add support for direct CASAPI access from libToolchainCASPlugin.dylib #1415
base: main
Are you sure you want to change the base?
Add support for direct CASAPI access from libToolchainCASPlugin.dylib #1415
Conversation
Add initial CAS support through libToolchainCASPlugin.dylib
6309f28
to
3be6d03
Compare
Currently only implements |
Could you clarify what the overall goal and design of CAS access is? For example it's not clear to me how direct access to the C API of the plugin relates to the My first thought is that we could do what we did for libclang where we have higher-level libclang APIs that represent the CAS-related actions and we don't expose low-level access to direct CAS objects & APIs. Whether the C plugin ends-up getting used or direct on-disk CAS is just a configuration change, it doesn't even change the code-paths in libclang (it uses the C++ |
It is not related. Maybe I should break that apart into two commits/PRs. Scanner will keep its own CAS instance (can be created from plugin after this commit), while giving the option for swift driver to have direct CAS access without going through scanner and owns a difference CAS instance.
For short term, we can definitely go through swift scan API for all the CAS operations. The direct CAS access allows converting more scanner logic into swift code. |
Is the intention that these are exclusionary? Meaning, the CAS scanner APIs will be used until the driver moves fully to direct CAS access and at which point we'll deprecate the CAS scanner APIs? |
Depending how much of the depscanner can be written in swift, both will co-exist for a long time. It doesn't really hurt to have scanner and driver each have its own CAS instance which points to the same CAS, just like each If the driver has its own CAS, I might just completely implement the CAS replay logic in swift driver. Otherwise, we can always get some new scanner API that does the replay. |
Split out the pluginCAS support in SwiftScan to https://github.com/apple/swift-driver/pull/1422/files Will rebase this once the other PR is resolved. |
Add initial CAS support through libToolchainCASPlugin.dylib