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

Assumes compiler is deterministic #16

Open
ohmantics opened this issue Nov 17, 2021 · 1 comment
Open

Assumes compiler is deterministic #16

ohmantics opened this issue Nov 17, 2021 · 1 comment

Comments

@ohmantics
Copy link

This assumes the compiler is deterministic. It is not proven so.

@polac24
Copy link
Collaborator

polac24 commented Nov 17, 2021

I assume you talk about incremental determinism. And yes, if a compiler has a bug and incorrectly specifies a list of dependency files in .d file, XCRemoteCache can overcache. The same problem would surface for a non-cacheable build in Xcode but there is always a fallback: clean DerivedData and build from scratch again. To be prepared for such edge-cases, we introduced --targets-exclude parameter which, as name suggests, forces the local build for that target. Fortunately, we haven't got that problem yet so maybe it is not that common.

Regarding other determinism, we know that basic will not be met and all class of literals like Swift's#filepath may have rubbish value. As we don't compare byte level dependencies (e.g. swiftmodule has its own "fingerprint" that is carried over), we will not have false positives/negatives but just incorrect data - which developers could expect if they use such a risky macro/literal.

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

No branches or pull requests

2 participants