Skip to content

Make blacksmith optional #893

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

Merged
merged 1 commit into from
Jun 14, 2025
Merged

Conversation

Kobzol
Copy link
Contributor

@Kobzol Kobzol commented Jun 13, 2025

Pretty much everytime I build/serve the Forge when I want to change something, I have to wait for blacksmith to download Rust releases. It's so annoying that I actually see this as a contribution roadblock to the Forge :) New stable releases are released every six weeks, and for local development you don't care about having the releases downloaded 99.99% of the time, so I really don't think we need to update the cache every hour. You can always just flush the cache by removing the JSON file.

@rustbot
Copy link
Collaborator

rustbot commented Jun 13, 2025

r? @ehuss

rustbot has assigned @ehuss.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 13, 2025
@apiraino
Copy link
Contributor

apiraino commented Jun 13, 2025

I also find it strange that to build this documentation website I need to download about 60mb to build a cache file. The cache seems to have the complete matrix of rustc builds for all versions ever (was implemented in #249). I struggle to understand what is this file used for.

Any help?

@Kobzol
Copy link
Contributor Author

Kobzol commented Jun 13, 2025

It's essentially used for automating the generation of this page and a few other pieces of information. It's mostly only useful for CI, so we could also just make it optional, e.g. based on CI=1, and if someone wanted to develop blacksmith, they could just pass the flag.

@apiraino
Copy link
Contributor

apiraino commented Jun 13, 2025

ah ok understood. Another option (but I don't know how much work would it be), that file could be generated and stored server-side. blacksmith could just download it (with gzip compression is just 1,3KiB)

@Kobzol
Copy link
Contributor Author

Kobzol commented Jun 13, 2025

Well, it also contains the nightly and beta releases, so it changes at least ~once per day, so we would have to run some cron job on the repo or something to keep it up-to-date 😆 I would just do the simpler thing and increase TTL, or make it be optional.

@apiraino
Copy link
Contributor

In any case, what blacksmith is, does and why would probably be a good thing to mention briefly in the README

@apiraino
Copy link
Contributor

or make it be optional.

I vote for this

@ehuss
Copy link
Contributor

ehuss commented Jun 13, 2025

or make it be optional.

I think I would also vote for this. I find it pretty annoying, and the number of people who need to work on the rendering of that releases page is much smaller than the number of people who work on the forge in general.

@Kobzol Kobzol force-pushed the blacksmith-cache branch from c96c230 to ad3e391 Compare June 13, 2025 17:05
@Kobzol
Copy link
Contributor Author

Kobzol commented Jun 13, 2025

Ok, made blacksmith CI only and documented it a bit.

@Kobzol Kobzol force-pushed the blacksmith-cache branch from ad3e391 to 9bfa32d Compare June 13, 2025 17:12
@Kobzol Kobzol changed the title Increase blacksmith cache TTL to one month Make blacksmith optional Jun 13, 2025
@Kobzol Kobzol marked this pull request as draft June 13, 2025 17:12
@Kobzol Kobzol force-pushed the blacksmith-cache branch from 9bfa32d to dd8d532 Compare June 13, 2025 17:17
@Kobzol Kobzol marked this pull request as ready for review June 13, 2025 18:55
@Kobzol
Copy link
Contributor Author

Kobzol commented Jun 13, 2025

Ok, should be ready now.

Copy link
Contributor

@apiraino apiraino left a comment

Choose a reason for hiding this comment

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

now builds in 1s (lol)

@Kobzol Kobzol merged commit 1e3629a into rust-lang:master Jun 14, 2025
1 check passed
@Kobzol Kobzol deleted the blacksmith-cache branch June 14, 2025 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants