Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[WIP] Add an Inside Rust blog post for stage 0 std redesign #1582
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
base: master
Are you sure you want to change the base?
[WIP] Add an Inside Rust blog post for stage 0 std redesign #1582
Changes from all commits
b412814
c8d819a
330fecd
222f4fe
dbd84f8
ad5aa2b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: having someone on t-libs and someone on t-compiler skim it and sign off that it makes sense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would maybe change the title to be something like "Redesigning stage 0 during compiler bootstrapping" (i.e. give a little bit more of a hint at who will be affected, for those not familiar with what "stage 0" is)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might rename this to sth like "Redesigning the stage 0 compiler bootstrap sequence", not sure if that makes more sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw the heading should be removed, the

title
attribute in the frontmatter is authoritative. Otherwise it creates this:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree to find a less dense title. Another (more verbose) proposal:
or something like that. Titles are hard 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly, I would put a little bit of a lead up here on why this change is desired (which I think will naturally require a little bit of background to flow well).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, previously the motivation was up front, I'll need to balance it a bit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also think that having to clarify that stage0 is "technically not always the beta compiler" makes things a bit harder to understand 🤔 Almost every contributor is going to have stage0 being the beta compiler so even if its not necessarily true I do wonder if it would make sense to lie a bit with a footnote the first time and then just ignore it from then on:
Although maybe this actually doesn't matter too much if you have a motivation section upfront discussing mental models so that there's already a nice intuition built for "stage0 == beta mostly sort of"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this could do with a short summary with less of the... I hesitate to say jargon, but something like:
Generally I find the current "before/after" description to be a little bit hard to parse 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how you'd fit in but I wonder if it'd be helpful to say something like "stage0 now always refers to things from the beta toolchain (unless otherwise customized)".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dogfooding = technical lingo, which might be ok if we assume a specific target audience. Could it be reworded to be less technical?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can use "experimenting with unstable library features", sure.
This internal blog post is targeted towards people (compiler/library contributors) who'd already be exposed to terms like "dogfooding", but "experimenting" is less opaque, so sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or does
x check library
actually build and test it?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, that's a mistake from moving things around, good catch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does it mean to check the precompiled library?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a no-op (arguably not exactly that, it's "does nothing"/"unsupported"?), I'll reword that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this would really benefit from some example(s). For example, what would this look like for e.g. a new trait solving feature that requires some core lang items?
(Aside, not the right place for this, but this effectively means that such features actually will need to a stage 2 compiler to be built to properly test them, right?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Said above, a very brief summary of this could be put at the beginning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have an alternative description of the motivation that I think more accurately captures the effect on combined compiler/library changes. Feel free to merge and integrate or so whatever with it that you want:
The compiler and standard library are tightly coupled. Intrinsics and lang items form a broad interface between the two, and whenever it is changed, both sides need to adjust. But the standard library supports being compiled with two different compilers, the in-tree compiler and the stage0 (beta) compiler. This means that all such changes require
cfg(bootstrap)
to support both compilers, which results in a lot of churn of anyone wanting to improve things that touch this area.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think that's a way better motivation summary. I'll need to think about how to reword this section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also an aside and shouldn't really be discussed here, but I personally think
cfg(bootstrap)
in library code is likely easier to maintain and reason about thancfg(bootstrap)
in compiler code.Though, perhaps I'm wrong, in which case I think this blog post can do better at convincing me this isn't the case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be easier, but it's much more common. Instances of cfg(bootstrap) should be really rare, while in the library it's incredibly common, especially for larger refactors that were simply not done previously because it's so bad