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

Start sccache server when ccache is enabled #93

Merged
merged 2 commits into from
Apr 1, 2024

Conversation

silkeh
Copy link
Member

@silkeh silkeh commented Mar 20, 2024

Start the sccache server so it is ready to be used by tools like Cargo. This is a workaround for an issue where builds hang until the sccache server exits, see #87.

@silkeh silkeh added this to the 1.6.2 milestone Mar 20, 2024
@silkeh silkeh self-assigned this Mar 20, 2024
@silkeh silkeh force-pushed the sccache-workaround branch 2 times, most recently from 2c3b544 to c4afee8 Compare March 20, 2024 14:30
@silkeh silkeh marked this pull request as ready for review March 23, 2024 11:43
@GZGavinZhao
Copy link
Member

Looks good to me! Only one thing I need to test: occasionally a compilation may take sooooooo long that sccache shuts itself down before the compilation can complete. This can be fixed by setting the SCCACHE_IDLE_TIMEOUT environment variable to a desired amount (documented here). I'm not sure if this environment variable must be specified before the startup of the server to take effect or if it is decided on an individual compilation basis.

Start the sccache server so it is ready to be used by tools like Cargo.
This is a workaround for an issue where builds hang until the sccache server exits.
@silkeh silkeh force-pushed the sccache-workaround branch from c4afee8 to efcff7b Compare March 30, 2024 13:47
@silkeh
Copy link
Member Author

silkeh commented Mar 30, 2024

@GZGavinZhao: Thanks! I have set the SCCACHE_IDLE_TIMEOUT for the process to 0 to ensure that it works as we would like, and verified that it doesn't exit by itself within 1 hour.

@ermo ermo requested a review from GZGavinZhao April 1, 2024 20:59
Copy link
Member

@GZGavinZhao GZGavinZhao left a comment

Choose a reason for hiding this comment

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

LGTM! I was initially skeptic whether sccache would be killed if we set timeout to 0, but it does!

@GZGavinZhao GZGavinZhao merged commit baeadd5 into master Apr 1, 2024
1 check passed
@EbonJaeger EbonJaeger deleted the sccache-workaround branch April 1, 2024 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants