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

Do not traverse the HIR to generate metadata #392

Closed
1 of 3 tasks
cjgillot opened this issue Dec 24, 2020 · 2 comments
Closed
1 of 3 tasks

Do not traverse the HIR to generate metadata #392

cjgillot opened this issue Dec 24, 2020 · 2 comments
Labels
major-change A proposal to make a major change to rustc T-compiler Add this label so rfcbot knows to poll the compiler team

Comments

@cjgillot
Copy link

Proposal

At the moment, generating metadata (rmeta files) traverses the HIR
and gathers relevant data independently for each node.
Most of this data corresponds to the output of DefId-keyed queries,
and is meant to provide info for the same queries in downstream crates.

We propose to replace the traversal of the HIR by a simple loop on all the local DefIds.

Pro: simplicity.
Cons:

  • non-panicking versions of some queries need to be created;
  • more queries are forced even if not data is expected from them.

List of affected queries: def_span, visibility, attributes, expn_that_defined, variances_of, type_of, stability, const_stability, deprecation, generics_of, explicit_predicates, inferred_outlives, promoted_mir, optimized_mir, fn_sig, explicit_item_bounds, inherent_impls.

Draft PR at rust-lang/rust#80347

Mentors or Reviewers

MCP requested by @oli-obk

Process

The main points of the Major Change Process is 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.

@cjgillot cjgillot added T-compiler Add this label so rfcbot knows to poll the compiler team major-change A proposal to make a major change to rustc labels Dec 24, 2020
@apiraino
Copy link
Contributor

Closing MCP for inactivity (+3 months) (see MCP process). Feel free to re-open to further the discussion, though.

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 T-compiler Add this label so rfcbot knows to poll the compiler team
Projects
None yet
Development

No branches or pull requests

2 participants