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

chore: Use inheritance to reduce copy-paste in Cargo.tomls #7687

Merged
merged 8 commits into from
Sep 26, 2022

Conversation

akhi3030
Copy link
Collaborator

See #7674 for more details.

core/account-id/Cargo.toml Outdated Show resolved Hide resolved
@akhi3030 akhi3030 marked this pull request as ready for review September 26, 2022 15:56
@akhi3030 akhi3030 requested a review from a team as a code owner September 26, 2022 15:56
}
None => {
// we can skip, since we have has_rust_version check
continue;
Copy link
Contributor

Choose a reason for hiding this comment

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

Re-reading this bit of code, I think we can just remove the whole function? We check that rust-version is specified at all in has_rust_version, and it cant' actually be greated that what we have in rust-toolcahin, as that would break the build.

I suggest sending a follow-up just removing this logic (but maybe I am missing something obvious here?)

Copy link
Contributor

Choose a reason for hiding this comment

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

For future PRs which combine "do the same trivail change all over the place" with "do small non-trivial change in one place", consider more explicitly calling this structure out, so that the interesting bit isn't missed. (eg, by adding a comment yourself on GitHub, or setting-up history for per-commit review.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Re-reading this bit of code, I think we can just remove the whole function? We check that rust-version is specified at all in has_rust_version, and it cant' actually be greated that what we have in rust-toolcahin, as that would break the build.

Hmm... that might indeed be the case. I'll investigate a bit. I was actually thinking of doing something simpler and combining has_rust_version and has_debuggable_rust_version. They seem to be performing similar checks.

For future PRs which combine "do the same trivail change all over the place" with "do small non-trivial change in one place", consider more explicitly calling this structure out, so that the interesting bit isn't missed. (eg, by adding a comment yourself on GitHub, or setting-up history for per-commit review.)

Thanks for the feedback. I will keep it in mind in future.

@near-bulldozer near-bulldozer bot merged commit 6952d7d into near:master Sep 26, 2022
nikurt pushed a commit that referenced this pull request Sep 27, 2022
nikurt pushed a commit that referenced this pull request Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants