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

[Option][Caching] Clean up option caching exclusion list #68164

Conversation

cachemeifyoucan
Copy link
Contributor

Systematically declare CacheInvariant options in TableGen file instead of putting a list in the cache key computation function.

Systematically declare CacheInvariant options in TableGen file instead
of putting a list in the cache key computation function.
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke test

@@ -399,15 +408,15 @@ def remark_skip_explicit_interface_build : Flag<["-"], "Rskip-explicit-interface

def emit_tbd : Flag<["-"], "emit-tbd">,
HelpText<"Emit a TBD file">,
Flags<[FrontendOption, NoInteractiveOption, SupplementaryOutput]>;
Flags<[FrontendOption, NoInteractiveOption, SupplementaryOutput, CacheInvariant]>;
Copy link
Member

Choose a reason for hiding this comment

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

Do we always emit a TBD with caching, or is this because the TBD is in a separate job that is cached independently? Same question applies to all the other emit-X options you have marked CacheInvariant.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The comments for the declaration of CacheInvariant says:

// The option that is cache invariant. Change this option doesn't affect the
 // content of any output file. The candidates are options like: `-o` which only
 // affects the location of the output file, or `-emit-module` which defines
 // which action is performed.

The idea is the option only describes if an output exists or not, but doesn't affect other outputs, thus doesn't affect cache key for other outputs.

@cachemeifyoucan cachemeifyoucan merged commit f540753 into apple:main Sep 6, 2023
3 checks passed
@drodriguez
Copy link
Collaborator

Is there a PR in the swift-driver repository to account for the new flags?

@cachemeifyoucan
Copy link
Contributor Author

Is there a PR in the swift-driver repository to account for the new flags?

I forgot to post that. It is now available: apple/swift-driver#1437
swift-driver should build fine without makeOptions

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.

None yet

4 participants