Skip to content

Fix #2681: re-enable check for potentially overridden classfiles #3897

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

Merged
merged 5 commits into from
Jan 27, 2018

Conversation

biboudis
Copy link
Contributor

No description provided.

Copy link
Member

@dottybot dottybot left a comment

Choose a reason for hiding this comment

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

Hello, and thank you for opening this PR! 🎉

All contributors have signed the CLA, thank you! ❤️

Commit Messages

We want to keep history, but for that to actually be useful we have
some rules on how to format our commit messages (relevant xkcd).

Please stick to these guidelines for commit messages:

  1. Separate subject from body with a blank line
  2. When fixing an issue, start your commit message with Fix #<ISSUE-NBR>:
  3. Limit the subject line to 72 characters
  4. Capitalize the subject line
  5. Do not end the subject line with a period
  6. Use the imperative mood in the subject line ("Added" instead of "Add")
  7. Wrap the body at 80 characters
  8. Use the body to explain what and why vs. how

adapted from https://chris.beams.io/posts/git-commit

Have an awesome day! ☀️

@biboudis biboudis changed the title Fix #2681: introduce miniphase that normalizes def names for error reporting Fix #2681: introduce miniphase to check def names Jan 23, 2018
@smarter
Copy link
Member

smarter commented Jan 23, 2018

I'm not sure it's worth adding a mini-phase for this. There is already code in the backend to do this kind of check that just needs to be enabled I think: https://github.com/lampepfl/dotty/blob/3004af37018d2f64c08f33500becf939141ec2e8/compiler/src/dotty/tools/backend/jvm/GenBCode.scala#L190-L202 see #1077

@odersky
Copy link
Contributor

odersky commented Jan 24, 2018

The problem with the miniphase approach is that it catches only files declared in the same sourcefile. A backend solution is better because it is more complete, IMO.

"Such classes will overwrite one another on case-insensitive filesystems."
)
}*/
ctx.warning(s"Class ${claszSymbol.name.toString.toLowerCase} differs only in case from ${dupClassSym.name.toString}. " +
Copy link
Contributor

Choose a reason for hiding this comment

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

I would keep the old error message, if you convert to lower case, the user won't see the differences.

@@ -0,0 +1,4 @@
package Foos //error
Copy link
Contributor

@allanrenucci allanrenucci Jan 25, 2018

Choose a reason for hiding this comment

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

@smarter smarter removed their request for review January 25, 2018 17:42
@smarter
Copy link
Member

smarter commented Jan 25, 2018

I have too many things to review.

@allanrenucci allanrenucci self-assigned this Jan 25, 2018
@nicolasstucki nicolasstucki requested review from allanrenucci and removed request for nicolasstucki January 25, 2018 17:52
@biboudis biboudis changed the title Fix #2681: introduce miniphase to check def names Fix #2681: re-enable check for potentially overridden classfiles Jan 26, 2018
@biboudis
Copy link
Contributor Author

If this is merged #1077 can be closed as well.

@odersky
Copy link
Contributor

odersky commented Jan 27, 2018

LGTM

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.

5 participants