Skip to content

Conversation

@icp1994
Copy link
Member

@icp1994 icp1994 commented Jan 13, 2023

Reviving #30702 - I tested the changes in this PR: YES

I have been using this for almost a week and it has reduced build times for rust packages quite considerably in my laptop. I have addressed some of the questions/suggestions from the reviews of the previous PR.

Although not the most scientific benchmark, I noted the build times from the cargo output while packaging 4 templates across iterations. In the first two iterations, all of them ran without sccache with an older version of the template to get a baseline without the interference of the crates being downloaded. Third iteration was with same old versions but with sccache enabled which created the cache of all 4 packages combined. Finally, last iteration with the full cache and the latest version of the templates - a typical scenario while updating a package. The difference between the second and the fourth iterations are as follows:

rust-analyzer | 6m 13s | 4m 49s
gping         | 1m 44s | 40.81s
difftastic    | 1m 32s | 34.80s
streampager   | 1m 14s | 23.25s

I will add docs for README later if there is consensus to merge this eventually.

x86_64*|i686*|arm*|aarch64*) hostmakedepends+=" rust-sccache" ;;
*) ;;
esac
fi
Copy link
Member

Choose a reason for hiding this comment

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

I really don't like implicit build-style dependencies, especially with logic like this.

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree it's not the cleanest. But isn't it explicit since XBPS_SCCACHE is opt-in?

Copy link
Member Author

Choose a reason for hiding this comment

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

With ppc support being dropped from void, don't need the arch checking logic - so this is as "clean" as it's going to be.

@github-actions
Copy link

Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.

@github-actions
Copy link

Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.

@github-actions github-actions bot added the Stale label Jul 23, 2023
@github-actions github-actions bot removed the Stale label Jul 26, 2023
@classabbyamp classabbyamp added the xbps-src xbps-src related label Aug 9, 2023
@github-actions
Copy link

github-actions bot commented Nov 8, 2023

Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.

@github-actions
Copy link

Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.

@github-actions
Copy link

Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.

@github-actions
Copy link

Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.

@Vinfall
Copy link
Contributor

Vinfall commented Nov 15, 2024

Does this make sccache co-exist with ccache?

I'm using ccache globally inside & outside of void-packages with different cache directories and would like to enable sccache for cargo builds only (or better, Rust codes only, so I can re-use existing Fortran/C/C++ cache in ccache). Is this possible?

@icp1994
Copy link
Member Author

icp1994 commented Nov 15, 2024

Yes,it only modifies the Rust build helper and stores it's stuff at /hostdir/sccache

@Vinfall
Copy link
Contributor

Vinfall commented Nov 16, 2024

That makes a lot of sense, I'm a bit hesitated to adopt sccache globally due to hit rate but it sounds reasonable to try it in packaging.

@github-actions
Copy link

Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.

@github-actions
Copy link

Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.

@github-actions
Copy link

Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.

@github-actions github-actions bot added the Stale label Aug 22, 2025
@github-actions
Copy link

Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.

@github-actions github-actions bot added the Stale label Nov 21, 2025
@github-actions github-actions bot closed this Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Stale xbps-src xbps-src related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants