Stream: t-compiler/help-wanted

Topic: pksunkara


pksunkara (Jan 19 2020 at 15:21, on Zulip):

Hey, I was looking at things blocking proc_macro_hygiene and realized that https://github.com/rust-lang/rust/issues/55414 is labelled as E-help-wanted and E-mentor. I would love to fix this. But I have no idea where to start. @Vadim Petrochenkov , you are the mentor, right?

Vadim Petrochenkov (Jan 19 2020 at 15:55, on Zulip):

@Vadim Petrochenkov , you are the mentor, right?

Yes, I am!

Vadim Petrochenkov (Jan 19 2020 at 15:58, on Zulip):

Looks like you haven't worked on rustc yet?
The first thing to understand here is how rustc's Abstract Syntax Tree is organized (src\libsyntax\ast.rs) and how visitor pattern is used for walking AST immutably (src\libsyntax\visit.rs) or mutably (src\libsyntax\mut_visit.rs).

Vadim Petrochenkov (Jan 19 2020 at 16:00, on Zulip):

The InvocationCollector's implementation of MutVisitor needs to be tweaked to implement the new behavior for attributes, this comments https://github.com/rust-lang/rust/issues/55414#issuecomment-554005412 describes some details.

Vadim Petrochenkov (Jan 19 2020 at 16:03, on Zulip):

(Of course, before that you'll need to build rustc (https://github.com/rust-lang/rust/blob/master/README.md) and be able to run tests (./x.py test --bless --stage 1 src/test/ui --test-args my_test_name).)

pksunkara (Jan 19 2020 at 18:57, on Zulip):

Got the tests working

pksunkara (Jan 20 2020 at 18:24, on Zulip):

@Vadim Petrochenkov should I add a test to ui folder for this issue as first step? I am asking because I am not sure where to add the test

Vadim Petrochenkov (Jan 20 2020 at 19:48, on Zulip):

Yes, tests usually go into subdirectories of test\ui, e.g. test\ui\attributes in this case.

mark-i-m (Jan 20 2020 at 19:52, on Zulip):

@pksunkara The rustc-guide can be a good starting point for general rustc questions: https://rust-lang.github.io/rustc-guide/

In particular: https://rust-lang.github.io/rustc-guide/building/suggested.html and https://rust-lang.github.io/rustc-guide/tests/intro.html and https://rust-lang.github.io/rustc-guide/compiler-debugging.html

Vadim Petrochenkov (Jan 26 2020 at 12:14, on Zulip):

Hi, @pksunkara.
Any news? Do you have a branch in progress so I could look at it and give some feedback?

pksunkara (Jan 28 2020 at 14:08, on Zulip):

Unfortunately no, I have been travelling last week. I should have some stuff for you to look at this week. Sorry.

pksunkara (Feb 01 2020 at 23:36, on Zulip):

Hey @Vadim Petrochenkov, with the stabilisation of fn-like macros for expressions, my main reason for picking this up is gone. I am not interested in attribute macros for expressions. I would much rather focus my effort on getting type_ascription stable. But I really would love to get back to this sometime.

Vadim Petrochenkov (Feb 02 2020 at 09:11, on Zulip):

Ok.

Last update: Feb 25 2020 at 04:15UTC