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

Prevent obvious duplicate inherits #61

Merged
merged 3 commits into from
Oct 28, 2022

Conversation

matt-sheets
Copy link
Collaborator

Previously we allow the user to do something like: resource baz inherits foo, foo, bar

This is either a needless duplicate or a possible typo. The compiler will now produce an error if a duplicate inherit like this is present.

Previously we allow the user to do something like:
resource baz inherits foo, foo, bar

This is either a needless duplicate or a possible typo.
The compiler will now produce an error if a duplicate inherit
like this is present.
@matt-sheets matt-sheets linked an issue Oct 27, 2022 that may be closed by this pull request
@dburgener
Copy link
Owner

You're failing the "cargo fmt" check. You'll need to get the rustfmt package via rustup (https:/rust-lang/rustfmt) and then run cargo fmt, which will automatically clean up the formatting.

The next check after that, which didn't run because fmt failed is clippy, so you may want to also get and run clippy as well (https:/rust-lang/rust-clippy). The exact clippy command used by the CI is available in .github/workflows/clippy.sh. You'll want to make sure you use "-A clippy::new_without_default" to avoid unrelated failures.

src/internal_rep.rs Outdated Show resolved Hide resolved
src/internal_rep.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
src/internal_rep.rs Outdated Show resolved Hide resolved
@dburgener
Copy link
Owner

I tried to squash and merge this using the github interface, but I'm running in to this issue: isaacs/github#1368

Instead of saying the commit was authored by [email protected] as desired, it's using an internally generated users.noreply.github.com e-mail address for you, that I assume is set as a default in your settings somewhere (probably the "Keep my e-mail address private" box at https:/settings/emails).

Are you able to uncheck the box above so I can hopefully get this to squash merge with the right attribution?

@matt-sheets
Copy link
Collaborator Author

Are you able to uncheck the box above so I can hopefully get this to squash merge with the right attribution?

I updated that setting, I would try again.

@dburgener dburgener merged commit 6a9dff0 into dburgener:main Oct 28, 2022
@dburgener
Copy link
Owner

Merged. Github still messed it up a little bit as your author name in the original commits was "Matt Sheets", but the github squash merge changed it to "matt-sheets" without warning me that it would... But at least the e-mail address is correct. That might be because your "Name" https:/settings/profile is set to "matt-sheets"?

The whole thing is kind of obnoxious. I may just stick to manual squash and force push in the future.

Regardless, this is now merged. Thanks for the contribution!

@matt-sheets matt-sheets deleted the masheets/dup-inheritance branch December 1, 2022 19:45
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.

Explicit duplicated types in inheritance should error
2 participants