improvements

This commit is contained in:
nora 2024-01-14 13:45:15 +01:00
parent 8a0b9bf441
commit 0b0c9c8971
6 changed files with 84 additions and 112 deletions

View file

@ -23,8 +23,8 @@
<div> <div>
<div>Nilstrieb</div> <div>Nilstrieb</div>
<ul> <ul>
<li>contributing since 2022</li> <li>contributing since 2021</li>
<li>compiler contributors team since 2023</li> <li>compiler contributors team since 2022</li>
<li>all areas of the compiler</li> <li>all areas of the compiler</li>
<li>issue triaging</li> <li>issue triaging</li>
<li>1.74 cargo feature cfg diagnostics</li> <li>1.74 cargo feature cfg diagnostics</li>
@ -109,6 +109,10 @@
<a href="https://github.com/rust-lang/cargo-bisect-rustc">https://github.com/rust-lang/cargo-bisect-rustc</a> <a href="https://github.com/rust-lang/cargo-bisect-rustc">https://github.com/rust-lang/cargo-bisect-rustc</a>
<div>downloads toolchains instead of building them</div> <div>downloads toolchains instead of building them</div>
</section> </section>
<section>
<h2>bisection</h2>
<img src="triage-bisect-comment.png">
</section>
<section> <section>
<h2 style="display: flex; justify-content: center; align-items: center;">minimization <img src="E-needs-mcve.png" height="60"></h2> <h2 style="display: flex; justify-content: center; align-items: center;">minimization <img src="E-needs-mcve.png" height="60"></h2>
<div>very useful for fixing an issue</div> <div>very useful for fixing an issue</div>
@ -135,8 +139,6 @@
<textarea data-template> <textarea data-template>
## existing unstable features ## existing unstable features
high value, very needed
- stabilize - stabilize
- close - close
</textarea> </textarea>
@ -166,10 +168,8 @@
<h2>final comment periods</h2> <h2>final comment periods</h2>
<img src="stabilize-fcp.png"> <img src="stabilize-fcp.png">
</section> </section>
<section data-markdown> <section>
<textarea data-template> <h2>writing code</h2>
# writing code
</textarea>
</section> </section>
<section data-markdown> <section data-markdown>
<textarea data-template> <textarea data-template>
@ -177,10 +177,10 @@
always in need of help! always in need of help!
- rustup
- clippy - clippy
- cargo
- rust-analyzer - rust-analyzer
- cargo
- rustup
- rustfmt - rustfmt
</textarea> </textarea>
</section> </section>
@ -190,6 +190,7 @@
limited review bandwidth! limited review bandwidth!
- improve documentation
- performance improvements - performance improvements
- bug fixes - bug fixes
- APIs are selective - APIs are selective
@ -199,57 +200,65 @@
<textarea data-template> <textarea data-template>
## compiler contributions ## compiler contributions
- diagnostics are a great starting point - diagnostics are a great starting point (A-diagnostics)
- internal compiler error fixes - internal compiler error fixes
- E-{mentor,easy} labels
</textarea> </textarea>
</section> </section>
<section> <section>
<h2>diagnostics</h2> <h2>examples of my PRs</h2>
<img src="my-first.png"> <img src="my-first.png">
<a href="https://github.com/rust-lang/rust/pull/89892">https://github.com/rust-lang/rust/pull/89892</a>
</section> </section>
<section> <section>
<h2>writing a new trait solver</h2> <h2>examples of my PRs</h2>
<h3>errs.png</3> <img src="my-let-underscore-lock.png">
<a href="https://github.com/rust-lang/rust/pull/119710">https://github.com/rust-lang/rust/pull/119710</a>
</section> </section>
<section> <section>
<h2>Internal compiler-errors fixes</h2> <h2>examples of my PRs</h2>
<div>step 1: become a surgeon</div> <img src="my-clippy-needless-borrow.png">
<img src="my-first.png"> <a href="https://github.com/rust-lang/rust/pull/118143">https://github.com/rust-lang/rust/pull/118143</a>
</section>
<section>
<h2>examples of my PRs</h2>
<img src="my-carbon-hashing.png">
<a href="https://github.com/rust-lang/rust/pull/117079">https://github.com/rust-lang/rust/pull/117079</a>
</section> </section>
<!-- EXAMPLES (mine) -->
<section> <section>
<h2>rustc dev guide</h2> <h2>rustc dev guide</h2>
<a href="https://rustc-dev-guide.rust-lang.org/">https://rustc-dev-guide.rust-lang.org/</a> <a href="https://rustc-dev-guide.rust-lang.org/">https://rustc-dev-guide.rust-lang.org/</a>
</section> </section>
<!-- you can pick another one -->
<section>
<h2>ask for help</h2>
<p>zulip.rust-lang.org, #t-compiler/help</p> <!-- TODO -->
</section>
<section data-markdown> <section data-markdown>
<textarea data-template> <textarea data-template>
## looking at prs ## looking at prs
- yes <!-- TODO --> - learn more about what other people are doing
- leave review comments on random PRs - leave review comments if you see something
</textarea>
</section>
<section data-markdown>
<textarea data-template>
# to remember
</textarea> </textarea>
</section> </section>
<section data-markdown> <section data-markdown>
<textarea data-template> <textarea data-template>
## to remember
- volunteers - volunteers
- weeks - review times sometimes long (weeks)
- rust-lang/rust: ping if >2 weeks - rust-lang/rust: ping if review >2 weeks
</textarea> </textarea>
<!-- some of my own contributionsd --> </section>
<section>
<h2>ask for help</h2>
<p>rust-lang.zulipchat.com</p>
</section> </section>
<section> <section>
<h2>see you on GitHub!</h2> <h2>see you on GitHub!</h2>
<!-- TODO add all URLs --> <a href="https://rustc-dev-guide.rust-lang.org/">https://rustc-dev-guide.rust-lang.org/</a>
<a href="https://forge.rust-lang.org/release/issue-triaging.html">https://forge.rust-lang.org/release/issue-triaging.html</a>
<a href="https://github.com/rust-lang/cargo-bisect-rustc">https://github.com/rust-lang/cargo-bisect-rustc</a>
<a href="http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/">http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/</a>
<br>
<a href="https://github.com/Nilstrieb/cargo-minimize">https://github.com/Nilstrieb/cargo-minimize</a>
<a href="https://rust-lang.zulipchat.com">rust-lang.zulipchat.com</a>
</section> </section>
</div> </div>
</div> </div>

BIN
my-carbon-hashing.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

BIN
my-let-underscore-lock.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

View file

@ -1,110 +1,74 @@
# speaker notes # speaker notes
Hi! Welcome to my presentation about how to contribute to the Rust project. There are numerous ways
to help Rust by contributing to it, and I'm going to list some of them, show you how to do it
and point you to further resources about it. So after my talk, you hopefully have the knowledge and
motivation to get started yourself if you're interested.
But first, who am I to talk about this? I'm nils, and I've been a member of the compiler contributors
team for over a year now. In addition to contributing code to the compiler I've also been involved in
other things, like helping other people contribute to the compiler, triaging issues and of course shitposting on Discord.
But this talk here isn't just mine alone, other people helped with this too, like these silly bingles.
So, let's start contributing to Rust. Maybe some of you here have contributed something to Rust before,
(maybe you didn't even think it was a contribution), and I assume some of you have wanted to do it but have
never done it for various reasons, like not knowing where to start or even thinking you're not good enough to do it.
Here's the good news for that: I'm going to tell you a lot of different ways to get started, no matter
your experience level. There are so many things to do that there's something for everyone.
Sure, there are some areas that require domain-specific expertise, like writing a MIR optimization in the
compiler requires good knowledge of MIR, but there are also things that don't even require knowledge of Rust,
so even if you're still a beginner you can help, and I can guarantee that you will learn a lot.
The only thing you really need is some spare time and interest. Some tasks are very time intensive, but
other tasks require a lot less time. That said, if you don't have any spare time, then it's going to be hard.
With that out of the way, let's look at some places you can contribute to.
First, we're going to look at ways to contribute that don't involve opening VSCode or whatever your favourite editor is.
When talking about contributing to open source projects, we usually think of contributing code, like opening Pull Requests.
While this is an important part of any open source projects and no less true in Rust, it's also by far not the only thing to do.
And especially those other tasks are often forgotten and underappreciated. We're also not great at this, there's a very nice page
called `thanks.rust-lang.org` that contains a list of contributors, but it only counts commit and review counts.
The first thing I'm going to talk about is triaging issues, something that I have also done a lot myself.
Triaging issues is great because it's easy to get started and you can put in very variable amounts of time.
You can triage one issue in two minutes, or you can spend 2 hours on an issue. It always depends on the
issue and how much time you want to put in, even the small work is nice.
Some of the things that are involved when triaging issues are labelling, minimization, bisection and adding tests.
Labelling is the task here that takes the least time. We have an example issue here, that requests that the standard
library documents the memory ordering guarantees for the thread spawn function.
Let's think about what this is: This is a *feature request* for *documentation* about *threads* and *atomics*.
The feature request is to the *library API team*, as it's about a guarantee.
So we add those labels. Remove needs-triage, as we're doing triage, add the docs, thread and atomics area, the category
feature request and the team libs api. If you're not part of a team that has write access to the repository, you can leave
a comment with rustbot as shown here. If you're interested and want to know more, see the link below.
For bugs, especially compiler panics (so called internal compiler errors, ICE for short)
# bullet points # bullet points
- welcome - welcome
- in this talk i well tell you how to contribute
- many ways to contribute - many ways to contribute
- after, start yourself - after the talk, start yourself
- reason for the talk: estebans talk 3 years ago
- whoami - whoami
- nils, compiler contributors team - nils, compiler contributors team
- helping people, triaging, shitposting on discord - helping people, triaging, shitposting on discord
- others - others
- no one yet :( - reviewed the talk
- important path of why I contribute
- friends reviewing your PRs
- start - start
- some contributed before - some contributed before
- wanted to but never have - wanted to but never have
- many ways, no matter experience - many ways, no matter experience
- some domain-expecific expertise - some domain-expecific expertise
- some no knowledge of rust - some no knowledge of rust
- learn - will learn something
- what to - requirement: time and interest
- what to contribute?
- where to get started?
- not code - not code
- usual focus on code - usual focus on code
- rust also not good, thanks.rust-lang.org - rust also not good, thanks.rust-lang.org
- triage - triage
- same - easy to get started
- variable amounts of time - variable amounts of time
- labelling, minimization, bisection, adding tests - labelling, minimization, bisection, adding tests
- labelling - labelling
- helps with
- organizing issues
- finding related issues
- least time - least time
- std document mmeory ordering thread::spawn - std document mmeory ordering thread::spawn
- feature request, documentation, threads, atomics, libs api - feature request, documentation, threads, atomics, libs api
- -needs-triage +A-docs +T-libs-api +C-feature-request +A-thread +A-atomics - -needs-triage +A-docs +T-libs-api +C-feature-request +A-thread +A-atomics
- A- , T-, C-
- use rustbot - use rustbot
- see link - see link
- bisect - bisect
- helps debugging - helps with
- priorization for recent regression - finding the root cause of the problem
- figure out when regression happened -> priorization
- E-needs-bisect (not only) - E-needs-bisect (not only)
- ICE easiest - ICE easiest
- cargo-bisect-rustc (--access github) - cargo-bisect-rustc (--access github)
- start date, often last year or last few months - start date, often last year or last few months
- issue comment - issue comment
- potential problems
- feature
- minimization - minimization
- helps debugging - helps with
- debugging
- coming up with a test
- E-needs-mcve - E-needs-mcve
- me in 2 hours to 60 lines, on github - me in 2 hours to 60 lines, on github
- felix (compiler team) blog post - felix (compiler team) blog post (outdated)
- cargo-minimize - cargo-minimize
- helps you learn more about rust
- adding tests - adding tests
- E-needs-test - E-needs-test
- fixed, no test - fixed, no test
- commit test - commit test
- see compiler section
- existing unstable features - existing unstable features
- a lot of unstable features - a lot of unstable features
- used some or many of them, a favourite - used some or many of them, a favourite
- not GCE, const traits or specialization
- goal: stabilize or close - goal: stabilize or close
- tracking issues - tracking issues
- C-tracking-issue - C-tracking-issue
@ -114,7 +78,7 @@ For bugs, especially compiler panics (so called internal compiler errors, ICE fo
- middle - middle
- summarize - summarize
- most important: summarize discussion - most important: summarize discussion
- aggregate open and resolved - aggregate open and resolved questions
- propose next steps, suggest answers - propose next steps, suggest answers
- stabilization report - stabilization report
- no open questions - no open questions
@ -123,6 +87,7 @@ For bugs, especially compiler panics (so called internal compiler errors, ICE fo
- close - close
- use cases haven't proven themselves - use cases haven't proven themselves
- subseeded by other feature - subseeded by other feature
- also summarize discussion
- fcps - fcps
- team decisions - team decisions
- majority approves - majority approves
@ -130,31 +95,29 @@ For bugs, especially compiler panics (so called internal compiler errors, ICE fo
- want to write code - want to write code
- lots of code - lots of code
- official tooling - official tooling
- recommendation
- very good, but needs help - very good, but needs help
- different, choose - different, choose
- fix bugs, implement new features (like lints) - fix bugs, implement new features (like lints)
- plsss elaborate on the tooling aaaa
- standard library - standard library
- compiler - compiler
- me - me
- diagnostics (many, many) - diagnostics (many, many)
- internal compiler error fixes (variable difficulty) - internal compiler error fixes (variable difficulty)
- E-has-mentor - E-mentor
- diagnostics - diagnostics
- my first - my first
- search for issue, fix it - search for issue, fix it
- diagnostics how to - examples
- A-diagnostics label, close to 2000 - rustc dev guide
- dev guide - looking at PRs
- implement the fix - if unsure
- zulip.rust-lang.org - know what's happening
- this compiler section really sucks lol - learn from others
- reviews - do leave comments
- review other peoples PRs
- typos, bugs, case missing
- saves work, faster
- to remember - to remember
- its over - many volunteers, no guaranteed review time
- review times - ask for help on zulip
- - end
- i hope i was able to encourage some of you to get started
- for others, learn how rust works
- questions

BIN
triage-bisect-comment.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB