Skip to content

Add the diagrams from my rustconf talk #1419

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

Closed
jyn514 opened this issue Aug 8, 2022 · 11 comments · Fixed by #1421
Closed

Add the diagrams from my rustconf talk #1419

jyn514 opened this issue Aug 8, 2022 · 11 comments · Fixed by #1421
Assignees

Comments

@jyn514
Copy link
Member

jyn514 commented Aug 8, 2022

https://docs.google.com/presentation/d/1GnKlK98APzZ0Fw1BOqbroPQyvIio5Tm7SP7P0B8x3Cc/edit#slide=id.gf49216051b_0_96 (and the following 7 slides)

the sequence of slides, i.e. being shown multiple different diagrams in order, seemed to be particularly helpful - maybe we can find some way to do that with mdbook?

@eholk
Copy link
Contributor

eholk commented Aug 8, 2022

It'd be a pain to re-draw the diagrams, but you can do mermaid diagrams in mdbook. I don't know if that'd help make it so they can build on each other though.

@jyn514
Copy link
Member Author

jyn514 commented Aug 8, 2022

@RalfJung @ehuss @camelid you mentioned in #843 that you found my diagram confusing - do the diagrams here make more sense to you?

cc #914, @Mark-Simulacrum

@camelid
Copy link
Member

camelid commented Aug 8, 2022

Yeah, I think the new diagrams (from the talk) are clearer. I'm not sure exactly why, but I think the run-stage/build-stage distinction in the old diagrams was confusing. It's also helpful that the new one has version numbers and a graph representation rather than a table representation.

The one thing I found confusing in the new one is that in e.g. this diagram it says it's "Building" the beta compiler. I think it should say "Building with"?
image

@camelid
Copy link
Member

camelid commented Aug 8, 2022

I was able to adapt the diagram in mermaid, but I can't figure out how to get right angles and/or the nightly compiler and nightly std being at the same vertical position.

graph TD
    betac("beta compiler (1.63)") -->|A| std("nightly std (1.64)");
    betac -->|B| nightlyc{"nightly compiler<br>(1.64)"}
    std -->|"B (using 1.64)"| nightlyc
    nightlyc -->|C| std
    nightlyc -->|D| nightlyc2{"nightly compiler<br>(1.64)"}
    std -->|"D (using 1.64)"| nightlyc2
Loading

@jyn514
Copy link
Member Author

jyn514 commented Aug 8, 2022

I meant "building" to mean "the thing doing the building" - I agree "building with" is more clear, happy to change it.

@camelid
Copy link
Member

camelid commented Aug 8, 2022

One other thing I noticed is that "nightly compiler" has two separate nodes for each stage, but "nightly std" only has one. Shouldn't std be two as well?

@RalfJung
Copy link
Member

RalfJung commented Aug 8, 2022

I like it! It took me a bit to realize that the A, B, C on the arrows indicates the order though.

My main suggestion is that IMO it's confusing that the two standard libraries have the same node. It looks like there is a cyclic dependency when there isn't. Also you split up the two nightly compilers into two nodes, so for consistency IMO you should do the same with the standard libraries. That will also make the diagram more symmetric.

@camelid
Copy link
Member

camelid commented Aug 9, 2022

Here's the same diagram with two std nodes:

graph TD
    betac("beta compiler (1.63)") -->|A| std1("nightly std (1.64)");
    betac -->|B| nightlyc{"nightly compiler<br>(1.64)"}
    std1 -->|"B (using 1.64)"| nightlyc
    nightlyc -->|C| std2("nightly std (1.64)")
    nightlyc -->|D| nightlyc2{"nightly compiler<br>(1.64)"}
    std2 -->|"D (using 1.64)"| nightlyc2
Loading

@camelid
Copy link
Member

camelid commented Aug 9, 2022

Here's another option I made that I think is a bit clearer (though please let me know):

graph TD
    s0c["stage0 compiler (1.63)"] -->|A| s0l("stage0 std (1.64)");
    s0c & s0l --- stepb[ ]:::empty
    stepb -->|B| s1c["stage1 compiler (1.64)"]
    s1c -->|C| s1l("stage1 std (1.64)")
    s1c & s1l --- stepd[ ]:::empty
    stepd -->|D| s2c["stage2 compiler (1.64)"]

    classDef empty width:0px,height:0px;
Loading

@RalfJung
Copy link
Member

RalfJung commented Aug 9, 2022

Yes, that is the structure I was looking for. :) Not sure which of the two is better.

The remaining question is the labels... what you label "stage1 compiler" is the same as what bootstrap calls "stage 0 compiler artifacts", I think. So it might be worth having that as a separate node?

graph TD
    s0c["stage0 compiler (1.63)"] -->|A| s0l("stage0 std (1.64)");
    s0c & s0l --- stepb[ ]:::empty
    stepb -->|B| s0ca["stage0 compiler artifacts (1.64)"]
    s0ca -->|copy| s1c["stage1 compiler (1.64)"]
    s1c -->|C| s1l("stage1 std (1.64)")
    s1c & s1l --- stepd[ ]:::empty
    stepd -->|D| s1ca["stage1 compiler artifacts (1.64)"]
    s1ca -->|copy| s2c["stage2 compiler"]

    classDef empty width:0px,height:0px;
Loading

@camelid camelid self-assigned this Aug 9, 2022
@camelid
Copy link
Member

camelid commented Aug 9, 2022

Ok, I've opened a PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants