Skip to content

Commit a5b158f

Browse files
committedNov 11, 2018
add a bit more
1 parent 07eb29f commit a5b158f

File tree

1 file changed

+66
-1
lines changed

1 file changed

+66
-1
lines changed
 

‎src/walkthrough.md

+66-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ where to start, please feel free to ask!
1515
The feature I will discuss in this chapter is the `?` Kleene operator for
1616
macros. Basically, we want to be able to write something like this:
1717

18-
```rust
18+
```rust,ignore
1919
macro_rules! foo {
2020
($arg:ident $(, $optional_arg:ident)?) => {
2121
println!("{}", $arg);
@@ -145,4 +145,69 @@ Some other possible outcomes might be for a team member to propose to
145145

146146
## Implementation
147147

148+
To make a change to the compiler, open a PR against the [rust-lang/rust] repo.
149+
150+
[rust-lang/rust]: https://github.com/rust-lang/rust
151+
152+
Depending on the feature/change/bug fix/improvement, implementation may be
153+
relatively-straightforward or it may be a major undertaking. You can always ask
154+
for help or mentorship from more experienced compiler devs. Also, you don't
155+
have to be the one to implement your feature; but keep in mind that if you
156+
don't it might be a while before someone else does.
157+
158+
For the `?` macro feature, I needed to go understand the relevant parts of
159+
macro expansion in the compiler. Personally, I find that [improving the
160+
comments][comments] in the code is a helpful way of making sure I understand
161+
it, but you don't have to do that if you don't want to.
162+
163+
[comments]: https://github.com/rust-lang/rust/pull/47732
164+
165+
I then [implemented][impl1] the original feature, as described in the RFC. When
166+
a new feature is implemented, it goes behind a _feature gate_, which means that
167+
you have to use `#![feature(my_feature_name)]` to use the feature. The feature
168+
gate is removed when the feature is stabilized.
169+
170+
**Most bug fixes and improvements** don't require a feature gate. You can just
171+
make your changes/improvements.
172+
173+
When you open a PR on the [rust-lang/rust], a bot will assign your PR to a
174+
review. If there is a particular rust team member you are working with, you can
175+
request that reviewer by leaving a comment on the thread with `r?
176+
@reviewer-github-id` (e.g. `r? @eddyb`). If you don't know who to request,
177+
don't request anyone; the bot will assign someone automatically.
178+
179+
The reviewer may request changes before they approve your PR. Feel free to ask
180+
questions or discuss things you don't understand or disagree with. However,
181+
recognize that the PR won't be merged unless someone on the rust team approves
182+
it.
183+
184+
When your review approves the PR, it will go into a queue for yet another bot
185+
called `@bors`. `@bors` manages the CI build/merge queue. When your PR reaches
186+
the head of the `@bors` queue, `@bors` will test out the merge by running all
187+
tests against your PR on Travis CI. This takes about 2 hours as of this
188+
writing. If all tests pass, the PR is merged and becomes part of the next
189+
nightly compiler!
190+
191+
There are a couple of things that may happen for some PRs during the review process
192+
193+
- If the change is substantial enough, the reviewer may request an FCP on
194+
the PR. This gives all members of the appropriate team a chance to review the
195+
changes.
196+
- If the change may cause breakage, the reviewer may request a [crater] run.
197+
This compiles the compiler with your changes and then attempts to compile all
198+
crates on crates.io with your modified compiler. This is a great smoke test
199+
to check if you introduced a change to compiler behavior that affects a large
200+
portion of the ecosystem.
201+
- If the diff of your PR is large or the reviewer is busy, your PR may have
202+
some merge conflicts with other PRs. You should fix these merge conflicts
203+
using the normal git procedures.
204+
205+
[crater]: ./tests/intro.html#crater
206+
207+
## Refining your implementation
208+
209+
TODO
210+
211+
## Stabilization
212+
148213
TODO

0 commit comments

Comments
 (0)
Please sign in to comment.