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

[MCP] proposing a macros working group #637

Closed
1 of 3 tasks
vincenzopalazzo opened this issue Jun 9, 2023 · 3 comments
Closed
1 of 3 tasks

[MCP] proposing a macros working group #637

vincenzopalazzo opened this issue Jun 9, 2023 · 3 comments
Labels
major-change A proposal to make a major change to rustc major-change-accepted A major change proposal that was accepted T-compiler Add this label so rfcbot knows to poll the compiler team

Comments

@vincenzopalazzo
Copy link
Member

Proposal

This proposal aims to establish a "macros-wg" with both basic and advanced goals. The advanced goals will be pursued in the future only if, after one year, this work is confirmed to be effective through another MCP.

Currently, the macros system in the compiler is more like a "dead zone" where it is difficult to make any progress with nightly features that have been in nightly forever or propose new changes or bug fixes.

In this proposal, we take into consideration two use cases:

In the past year, it has been difficult to give attention to this area for two main reasons:

  • Experts in this area lack time, and no new experts have emerged.
  • There is no interest in changing this area, and perhaps it is considered a stable but tricky area (which it is) where making changes that could introduce regressions is challenging. Therefore, getting work done can be tricky or require more effort due to backward compatibility.

An important role for the WG is to bootstrap the experience necessary to make deeper changes to the macro system and to review changes to the PR system.

By discussing with some people that help me to write down the full WG idea, a good idea to achieve this might involve group review of the existing system, building confidence by fixing bugs, and/or having some kind of reading group for discussing the academic work behind the macro system.

Basic Goals

  • Revive old work, such as:
    • Diagnostic improvements in procedural macros to make Rust more accessible when using proc macros.
  • Bug fixing that has been overlooked.
  • Rebuild or update the Rust macros book (covering both basic and advanced concepts) where the reader of the book will be able to process a syn-like crate in order to have alternative ideas.
  • Conduct more in-depth studies in this area and experiment with declarative macros 2.0 using new crates.
  • Conduct research and experimentation on libraries for proc macros (e.g., kproc-macros):
    • While tools like syn are great, conducting research in this area can lead to improvements in the proc macro API by experimenting with additional crates that make writing proc macros easier.

Advanced Goals

These goals need to be confirmed with another MCP after one year of this one.

  • Clean up outdated nightly features.
  • Conduct more thorough design work on declarative macro 2.0.

Mentors or Reviewers

Team Members

Currently, I put myself as one of the leaders of the team, @vincenzopalazzo, where I have time to organize and manage the work. However, the following people are proposed with the following roles:

  • Eric Holk: Co-leader, as an experienced person in language design and already a well-known figure in the ecosystem as part of different working groups.
  • Jacob Pratt: Team Member, as a well-known Rust contributor and one of the person who tried to make some work on the Rust macro system in past 2 years. It is valuable to have people who have already worked on the macro system.
  • Lukas Wirth: Team Member, as someone working on rust-analyzer, would provide a practical point of view on macros from an IDE perspective. He is also one of the authors for the updated The Little Book of Rust Macros.
  • Arthur Cohen: Team Member, as a GCC Rust maintainer and implementer of the macros code in GCC, could offer another valuable point of view on the macros API/semantics.
  • Daniel Henry-Mantilla: Team Member, as a well-presented figure in the issue and Zulip thread, providing useful feedback for API discussions and bug report support by providing MCVE (Minimal, Complete, and Verifiable Examples).

In this team, we also have a group of unofficial members (aka Fellows) that we hope to mentor them and to include inside the team when the times come.

Finally, I have also been in touch with a few people who are interested in macros work but are not able to commit to WG membership, so we are planning to involve them as well by leading the discussion all in public and give a change to join us.

Process

The main points of the Major Change Process are as follows:

  • File an issue describing the proposal.
  • A compiler team member or contributor who is knowledgeable in the area can second by writing @rustbot second.
    • Finding a "second" suffices for internal changes. If however, you are proposing a new public-facing feature, such as a -C flag, then full team check-off is required.
    • Compiler team members can initiate a check-off via @rfcbot fcp merge on either the MCP or the PR.
  • Once an MCP is seconded, the Final Comment Period begins. If no objections are raised after 10 days, the MCP is considered approved.

You can read more about Major Change Proposals on forge.

Comments

This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.

@vincenzopalazzo vincenzopalazzo added major-change A proposal to make a major change to rustc T-compiler Add this label so rfcbot knows to poll the compiler team labels Jun 9, 2023
@rustbot
Copy link
Collaborator

rustbot commented Jun 9, 2023

This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.

cc @rust-lang/compiler @rust-lang/compiler-contributors

@rustbot rustbot added the to-announce Announce this issue on triage meeting label Jun 9, 2023
@Nilstrieb Nilstrieb changed the title [MCP] proposing a macros woriking group [MCP] proposing a macros working group Jun 9, 2023
@apiraino apiraino removed the to-announce Announce this issue on triage meeting label Jun 15, 2023
@pnkfelix
Copy link
Member

@rustbot second

@rustbot rustbot added the final-comment-period The FCP has started, most (if not all) team members are in agreement label Jul 20, 2023
@apiraino
Copy link
Contributor

@rustbot label -final-comment-period +major-change-accepted

@rustbot rustbot added major-change-accepted A major change proposal that was accepted to-announce Announce this issue on triage meeting and removed final-comment-period The FCP has started, most (if not all) team members are in agreement labels Aug 10, 2023
@apiraino apiraino removed the to-announce Announce this issue on triage meeting label Aug 10, 2023
vincenzopalazzo added a commit to vincenzopalazzo/team that referenced this issue Aug 21, 2023
This is adding a new team that is the wg-macros
as a folloup step after the MCP get merged [1].

[1] rust-lang/compiler-team#637

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
vincenzopalazzo added a commit to vincenzopalazzo/team that referenced this issue Aug 28, 2023
This is adding a new team that is the wg-macros
as a folloup step after the MCP get merged [1].

[1] rust-lang/compiler-team#637

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
vincenzopalazzo added a commit to vincenzopalazzo/team that referenced this issue Aug 28, 2023
This is adding a new team that is the wg-macros
as a folloup step after the MCP get merged [1].

[1] rust-lang/compiler-team#637

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
major-change A proposal to make a major change to rustc major-change-accepted A major change proposal that was accepted T-compiler Add this label so rfcbot knows to poll the compiler team
Projects
None yet
Development

No branches or pull requests

4 participants