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

Make contributing.md into a series of tutorials #775

Open
mark-i-m opened this issue Jun 28, 2020 · 7 comments
Open

Make contributing.md into a series of tutorials #775

mark-i-m opened this issue Jun 28, 2020 · 7 comments
Labels
A-contribution-workflows Area: contribution workflows A-meta Area: meta, about rustc or rustc-dev-guide itself A-organization Area: how things are organized, incl. this guide C-enhancement Category: enhancement T-compiler Relevant to compiler team

Comments

@mark-i-m
Copy link
Member

as per rust-lang/compiler-team#296

cc @ecstatic-morse

We probably also want to figure out how to integrate relevant existing walkthrough sections (e.g. https://rustc-dev-guide.rust-lang.org/walkthrough.html) and planned ones.

@ecstatic-morse ecstatic-morse changed the title Make conritbuting.md into a series of tutorials Make contributing.md into a series of tutorials Jun 28, 2020
@ecstatic-morse
Copy link
Contributor

Thanks for getting this moving with rust-lang/compiler-team#320! I would like to see the first two chapters reorganized so that they follow the typical order of a contribution to rustc. The following was what I had in mind:

  • Initial setup

    • System requirements
    • Cloning and building
    • config.toml
      • incremental = true
      • debug-assertions = true
    • Add ./x.py fmt --check to git hooks
    • Beware long initial build time
      • ./x.py check
  • Typical in-tree contributions

    • Licensing/coding conventions
    • Improving the documentation
      • ./x.py doc --stage 0 src/libstd
    • Implementing a new feature
      - MCP vs. RFC
      - Opening a Tracking Issue
    • Modifying the standard library
      • Stability attributes / logistics
      • ./x.py build --stage 0 src/libstd
      • ./x.py test --stage 0 src/libstd to run unit tests
      • --keep-stage
    • Modifying the compiler
      • Custom toolchains
      • ./x.py build --stage 1 src/libstd
      • Reminder about keep-stage
      • Writing UI tests
        • ./x.py test --stage 1 -- src/test/ui to run UI tests
      • Adding crates.io dependencies
    • Modifying submodules
      • ???
  • Opening a PR

    • squashing and rebasing
    • bors
    • FCP
  • Troubleshooting

    • How to ask for help
    • Backtraces and logging
    • rustc in a debugger (and why this will be very slow)
    • Profiling the compiler

The basic idea is that you could follow along section-by-section, picking the "typical in-tree contribution" that you are interested in. Things that don't fit into this framework like "Errors and Lints" would be moved to a later chapter. I'd also like to have an "Out-of-tree contributions" chapter, although I'm not sure if the rustc-dev-guide is the right place. Maybe that should live in CONTRIBUTING.md?

@mark-i-m
Copy link
Member Author

@rust-lang/wg-rustc-dev-guide was actually planning to focus on guide organize this sprint. @spastorino also had thoughts about this.

One major question is how much stuff should go in the guide vs the forge.

I do like the idea of organizing the chapters in order of what someone might need.

@ecstatic-morse
Copy link
Contributor

My impression of the guide/forge split is that the forge is specifically targeted at org members while the guide is targeted at everyone who wants to contribute. I envisioned that sections like "licensing" and "bors" would contain only the minimum amount of information needed by new contributors.

@mark-i-m
Copy link
Member Author

My impression of the guide/forge split is that the forge is specifically targeted at org members while the guide is targeted at everyone who wants to contribute.

@ecstatic-morse This was my original intention for the rustc-dev-guide too. However, @nikomatsakis and @spastorino were looking to move to a model where the guide only contains information about how the compiler works, and other more procedure-related documentation would go to the forge. The thought was that the guide is getting rather long, and moving stuff to the forge would help make it less overwhelming. Personally, I still like the idea of the guide being a 1-stop shop for contributors....

@nikomatsakis
Copy link
Contributor

It's true, I've been advocating for documentation of procedures and things to move to forge, with rustc-dev-guide more focused on "how the code works", but I think that having some minimal coverage of bors and so forth would be ok, perhaps with the details over at forge.

Still, I don't quite agree with @ecstatic-morse's version that forge is mostly of interest to "org members". I imagine that forge would be a good place to go and learn about MCPs, for example, and that seems a bit out of scope to me for rustc-dev-guide. But I do think it's reasonable that you could find everything you need to make a "small contribution" in the rustc-dev-guide.

@spastorino
Copy link
Member

spastorino commented Jun 29, 2020

Exactly what @nikomatsakis have said. The model I like is something like what was suggested ... "the guide only contains information about how the compiler works, and other more procedure-related documentation would go to the forge" but including also what Niko have said ... with some minimal coverage of other stuff that lives in forge that we could link for further details.

@follower
Copy link
Contributor

[FWIW some feedback from someone who is (again :) ) attempting to learn Rust, encountered a small typo in standard lib docs & wanted to contribute a fix (https://github.com/rust-lang/rust/pull/77050).]

It seems the recent decision/changes to use the rustc-dev-guide as the canonical source for information on how to contribute the Rust project as a whole has led to a situation where initial contributor experience is IMO less welcoming & document descriptions are no longer accurate.

A potential contributor's journey

e.g. currently, as a first time contributor, as of 1.46.0 I:

  1. Go to https://doc.rust-lang.org/std/index.html#contributing-changes-to-the-documentation.
  2. Follow link to https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md and then to https://rustc-dev-guide.rust-lang.org/getting-started.html (Nightly now links to the latter directly: https://doc.rust-lang.org/nightly/std/index.html#contributing-changes-to-the-documentation.)
  3. Suddenly see a lot of text about building the compiler...causing me to panic(). :D

or, I:

  1. Go to https://github.com/rust-lang/rust (i.e. https://github.com/rust-lang/rust/blob/master/README.md) and follow link to...
  2. ... https://rustc-dev-guide.rust-lang.org/getting-started.html
  3. And... panic().

This is in contrast to the (apparently previous) experience changed by rust-lang/rust@3f6928f#diff-6a3371457528722a734f3c51d9238c13L1 which would instead lead to a CONTRIBUTING.md (content now present in https://rustc-dev-guide.rust-lang.org/contributing.html) which starts with a helpful Table of Contents with links to specific types of contributions I might want to be making. (And, IMO more likely to be first contributions.)

Descriptions of rustc-dev-guide purpose

In addition, About this guide describes its purpose as:

This guide is meant to help document how rustc – the Rust compiler – works, as well as to help new contributors get involved in rustc development.

And https://github.com/rust-lang/rustc-dev-guide/blob/master/README.md describes the purpose as:

...a collaborative effort to build a guide that explains how rustc works. The aim of the guide is to help new contributors get oriented to rustc, as well as to help more experienced folks in figuring out some new part of the compiler that they haven't worked on before.

Neither of which seems to make me feel I'm in the right place to e.g. simply make a documentation change. (At this point I don't even know that e.g. standard library documentation is extracted from the library source files.)

The cause of the confusion?

So, to me, it seems like the intention is that rustc-dev-guide is now the "Rust Dev Guide" but the content/arrangement of the guide doesn't currently reflect that.

I currently have a related PR rust-lang/rust#77195 to change the standard library to link to the documentation-specific part of the contributing section but thought I'd mention the wider issue here as that's not the only place affected by the change in focus.

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Oct 22, 2020
Link to "Contributing to Rust" rather than "Getting Started".

Change to link to "Contributing to Rust" chapter of `rustc` Dev Guide, primarily on the basis that:

 * The GitHub "first contribution" Issue "pop-up" says "Be sure to review the [contributing guidelines] and [code of conduct]" and links to this file.

 * The "Bug Report" section _seems_ to restrict itself to if "a compiler error message [told] you to come here".

 * The previous content of `CONTRIBUTING.md` now lives in the "Contributing to Rust" chapter.

When/if the guide/"Getting Started" section gets revised to not be `rustc`-specific, the choice of linked chapter could be updated.

In the meantime this prevents leading first time contributors into a confusing cul de sac.

_[I wasn't planning to make a PR for this until discussion in rust-lang#77215 concluded but the discovery that the "first issue" pop-up also links to this document IMO makes it a higher priority to make the link useful sooner rather than later.]_

Related issues:

 * rust-lang#77215

 * rust-lang/rustc-dev-guide#775 (comment)
JohnTitor added a commit to JohnTitor/rust that referenced this issue Oct 23, 2020
Link to "Contributing to Rust" rather than "Getting Started".

Change to link to "Contributing to Rust" chapter of `rustc` Dev Guide, primarily on the basis that:

 * The GitHub "first contribution" Issue "pop-up" says "Be sure to review the [contributing guidelines] and [code of conduct]" and links to this file.

 * The "Bug Report" section _seems_ to restrict itself to if "a compiler error message [told] you to come here".

 * The previous content of `CONTRIBUTING.md` now lives in the "Contributing to Rust" chapter.

When/if the guide/"Getting Started" section gets revised to not be `rustc`-specific, the choice of linked chapter could be updated.

In the meantime this prevents leading first time contributors into a confusing cul de sac.

_[I wasn't planning to make a PR for this until discussion in rust-lang#77215 concluded but the discovery that the "first issue" pop-up also links to this document IMO makes it a higher priority to make the link useful sooner rather than later.]_

Related issues:

 * rust-lang#77215

 * rust-lang/rustc-dev-guide#775 (comment)
@jieyouxu jieyouxu added C-enhancement Category: enhancement A-meta Area: meta, about rustc or rustc-dev-guide itself T-compiler Relevant to compiler team A-contribution-workflows Area: contribution workflows A-organization Area: how things are organized, incl. this guide labels Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-contribution-workflows Area: contribution workflows A-meta Area: meta, about rustc or rustc-dev-guide itself A-organization Area: how things are organized, incl. this guide C-enhancement Category: enhancement T-compiler Relevant to compiler team
Projects
None yet
Development

No branches or pull requests

6 participants