-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Native applied types #3033
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
Native applied types #3033
Conversation
There was a problem hiding this 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:
- Separate subject from body with a blank line
- When fixing an issue, start your commit message with
Fix #<ISSUE-NBR>:
- Limit the subject line to 72 characters
- Capitalize the subject line
- Do not end the subject line with a period
- Use the imperative mood in the subject line ("Added" instead of "Add")
- Wrap the body at 80 characters
- Use the body to explain what and why vs. how
adapted from https://chris.beams.io/posts/git-commit
Have an awesome day! ☀️
Github seems to be having some issues with this PR and it's preventing the CI from checking it out. Could you try pushing to it again? If that doesn't work we may have to close this PR and open a new one. |
Ah, I think that what's going on is that our CI is configured to use the github branch corresponding to this PR merged on top of master. Since merging currently fails with conflicts, this branch doesn't exist. So I'm afraid you cannot test this on the CI until you rebase. |
d2b91c1
to
f001e4c
Compare
@odersky The last CI failure is not legitimate. Github picked the wrong CI (I am testing a new CI instance with a newer version of Drone). If you push a new commit, it should pick up the right CI. |
@@ -21,6 +21,7 @@ import dotc.printing.{ GlobalPrec, DotPrec, Printer, PlainPrinter } | |||
import dotc.typer.Implicits.SearchResult | |||
import dotc.typer.ImportInfo | |||
|
|||
// TODO: Avoid code duplication between userfacing and refined printers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of the duplication is gone in #3032 so you should be able to drop this commit when rebasing.
12d2a78
to
80f5018
Compare
The dotty-bin-tests CI failure should go away if you rebase (things changed in .drone.yml) |
1aa8181
to
6324124
Compare
The exhaustiveness checker is outputting lots of false warnings right now: object Test {
def test(i: Option[Int]) = i match {
case Some(a) =>
case None =>
}
} -- [E028] Pattern Match Exhaustivity Warning: try/pm.scala:2:29 ----------------
2 | def test(i: Option[Int]) = i match {
| ^
| match may not be exhaustive.
|
| It would fail on: Some[Int](_) |
AppliedType will be used for all type applications, higher-kinded or not. That is, eventually, it will replace HKApply and also the encodings of type applications as refined types. This commit introduces AppliedType and adapts baseType computations to take it into account. AppliedType is not yet constructed anywhere, however.
So far, everything up to parents is adapted to new scheme. Parents is half done; needs more work once we change layour of ClassInfo.
Simplifies usage and removes some obscure code in Types
Systematically introduce handlers for AppliedTypes where there was a handler for HKApply.
Also, change asSeenFrom to use it for arguments
Avoid printing addresses and reduce junk.
We had a stackoverfloa in asSeenFrom even under the old scheme, since there was a bad change involving checkRealizableBounds.
It's definitely the bootstrapped version. It probably means that the generated code from Dotty is comparable to Scalac 2.12, or the optimisations in Dotty is insignificant compared to that of JVM. |
performance test scheduled: 1 job(s) in queue. |
@liufengyun Oops, I guess liufengyun/bench#47 is not active yet ^ ? |
@smarter : a colon is required after |
@liufengyun Hmm I think there's a bug in your script that I didn't catch while reviewing it: 0 is allowed in git hashes, but the bot replaced 3034f59 by 334f59 😄 |
@smarter : Thanks, I just noticed, fixed, deployed and removed the job. |
performance test scheduled for d92e3e6,fb82b9,fc83c24,334f59,1e6572d,724538,393d91f,9af7324,922b379,a7ec349: 1 job(s) in queue. |
Hmm, 0 is still missing in the hashes. |
The polling service just restarted. |
The daily benchmark is running from 12:00pm. Depending on how many PRs we merged today, each PR or commit will take ~40min. If everything goes well, we should be able to get the result in the morning. |
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/3033 to see the changes. Benchmarks is based on merge(s) with master |
@liufengyun The results don't seem to contain the commits scheduled for benchmarking. |
@smarter I'm investigating the problem, will keep you updated once it works. |
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/3033 to see the changes. Benchmarks is based on merge(s) with master |
Looks like fb82b09 was bad for performance, and fc83c24 made things better but still worse than before. @liufengyun It would be nice if clicking on a point on the graph jumped to the commit diff on github instead of the corresponding PR, sorry for making another feature request :). |
@smarter I'm happy to improve the bench infrastructure. Let's talk more about the feature tomorrow, it seems in some cases jump to PR is more friendly. |
We already integrated the optimizations that are easily applicable, and the rest is complicated and does not seem to buy us much. |
This is ready for review now.