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

refactor(toml): Make manifest file layout more consitent #12768

Merged
merged 3 commits into from Oct 4, 2023

Conversation

epage
Copy link
Contributor

@epage epage commented Oct 3, 2023

What does this PR try to resolve?

This is to make the file easier to browse (to me) as I work to split out the file format from the business logic to explore ideas for how we could split out a manifest crate (see #12801).

How should we test and review this PR?

This is just moving code around, so existing tests should be sufficient.

This does try to break up the refactors by theme to make it slightly easier.

If there are ideas for further improvements, that might be best left for future refactors rather than cramming every possible idea in this one.

Additional information

The theory of organization
- Built-in impls first (`Display` in this case)
- `Serialize` next to `Display` since they are related
At minimum, we should have "everything" for a type next to it but it was
previously scattered.

When collecting the related impl's, I decided to order based on how I
tend to do it.  Generally the methods are the "core" of the type so I
put those first.

The order I went with
1. Basic impl body
2. Complex impl body
3. Trait impls
4. Helper free-functions
@rustbot
Copy link
Collaborator

rustbot commented Oct 3, 2023

r? @weihanglo

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added A-manifest Area: Cargo.toml issues S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 3, 2023
Copy link
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the refactor. Still brittle but better than before!

Hope someday we can split them into modules

@weihanglo
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Oct 4, 2023

📌 Commit 571e6cf has been approved by weihanglo

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 4, 2023
@bors
Copy link
Collaborator

bors commented Oct 4, 2023

⌛ Testing commit 571e6cf with merge bf7f47e...

@bors
Copy link
Collaborator

bors commented Oct 4, 2023

☀️ Test successful - checks-actions
Approved by: weihanglo
Pushing bf7f47e to master...

@bors bors merged commit bf7f47e into rust-lang:master Oct 4, 2023
20 checks passed
@epage epage deleted the refactor branch October 4, 2023 17:21
@ehuss ehuss added this to the 1.75.0 milestone Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-manifest Area: Cargo.toml issues S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants