Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Disable preprocessor cache with -MD and friends #2195

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

glandium
Copy link
Collaborator

Also hook up too_hard_for_preprocessor_cache_mode, because it wasn't.

Also hook up too_hard_for_preprocessor_cache_mode, because it wasn't.
@codecov-commenter
Copy link

codecov-commenter commented May 29, 2024

Codecov Report

Attention: Patch coverage is 93.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 42.55%. Comparing base (0cc0c62) to head (df191d6).
Report is 81 commits behind head on main.

Files with missing lines Patch % Lines
src/compiler/c.rs 92.85% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2195       +/-   ##
===========================================
+ Coverage   30.91%   42.55%   +11.64%     
===========================================
  Files          53       53               
  Lines       20112    20328      +216     
  Branches     9755     9684       -71     
===========================================
+ Hits         6217     8650     +2433     
- Misses       7922     7976       +54     
+ Partials     5973     3702     -2271     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@glandium glandium requested a review from sylvestre May 29, 2024 05:03
preprocessor_cache_mode_config,
)?
} else {
None
Copy link
Collaborator

Choose a reason for hiding this comment

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

could you please add a log entry here ? might be hard to debug otherwise for people who might want to use it

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That would need to mention what specifically makes it too hard for the preprocessor cache, though, otherwise the log is not going to be useful (like cannot_cache!). Maybe more of a followup?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done in #2197. I'll rebase this one when that one is merged.

@sylvestre sylvestre merged commit f80ba73 into mozilla:main Jun 6, 2024
53 checks passed
glandium added a commit to glandium/sccache that referenced this pull request Jan 28, 2025
sccache has two modes:
- normal mode
- preprocessor cache mode (aka direct mode in ccache)

In the former case, the preprocessor is invoked and creates the dep file
itself. Whatever sccache does after that is going to overwrite a fresh
file with potentially wrong information, since the cache key is not
indexed on the elements that would affect the contents of the dep file,
resulting in issue mozilla#2321.

In the latter case, sccache currently doesn't handle the situation
appropriately (issue mozilla#2194), which is why preprocessor cache mode is
automatically disabled when the dependency flags are on the command line
(mozilla#2195). Which also means we fallback to the case above.
@glandium glandium mentioned this pull request Jan 28, 2025
glandium added a commit to glandium/sccache that referenced this pull request Jan 28, 2025
sccache has two modes:
- normal mode
- preprocessor cache mode (aka direct mode in ccache)

In the former case, the preprocessor is invoked and creates the dep file
itself. Whatever sccache does after that is going to overwrite a fresh
file with potentially wrong information, since the cache key is not
indexed on the elements that would affect the contents of the dep file,
resulting in issue mozilla#2321.

In the latter case, sccache currently doesn't handle the situation
appropriately (issue mozilla#2194), which is why preprocessor cache mode is
automatically disabled when the dependency flags are on the command line
(mozilla#2195). Which also means we fallback to the case above.
sylvestre pushed a commit that referenced this pull request Jan 30, 2025
sccache has two modes:
- normal mode
- preprocessor cache mode (aka direct mode in ccache)

In the former case, the preprocessor is invoked and creates the dep file
itself. Whatever sccache does after that is going to overwrite a fresh
file with potentially wrong information, since the cache key is not
indexed on the elements that would affect the contents of the dep file,
resulting in issue #2321.

In the latter case, sccache currently doesn't handle the situation
appropriately (issue #2194), which is why preprocessor cache mode is
automatically disabled when the dependency flags are on the command line
(#2195). Which also means we fallback to the case above.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants