-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Build library under -Xsource:3 [ci: last-only] #10551
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
base: 2.13.x
Are you sure you want to change the base?
Conversation
05aa818
to
dc042c5
Compare
I did not intend to ignore |
We might have to review if |
🤔 --- a/src/library/scala/concurrent/duration/Deadline.scala
+++ b/src/library/scala/concurrent/duration/Deadline.scala
@@ -65,6 +65,8 @@ case class Deadline private (time: FiniteDuration) extends Ordered[Deadline] {
* The natural ordering for deadline is determined by the natural order of the underlying (finite) duration.
*/
def compare(other: Deadline): Int = time compare other.time
+
+ def copy(time: FiniteDuration = this.time): Deadline = Deadline(time)
}
object Deadline {
@@ -82,4 +84,5 @@ object Deadline {
def compare(a: Deadline, b: Deadline): Int = a compare b
}
+ def apply(time: FiniteDuration): Deadline = new Deadline(time) |
FYI typelevel/cats use |
@xuwei-k thanks, it is also a dry-run to test the pain caused by |
I was going to try out "improved ergonomics for -Xsource", but I think I will not do that here, as I want the Scala 3 semantics, so that there is never a question if an inferred type shows up differently for Scala 3. |
Sample improved message
The private constructor is an ancient restriction; one may question that choice, but probably we must respect it for now. The build needs to silence the old warnings for bootstrapping. |
28110b0
to
a9ba237
Compare
Drafting until improved |
Ready to fork the project so I can merge #10573 and profit. Closing until that is merged here. |
f6c0c59
to
898bb8f
Compare
898bb8f
to
844918a
Compare
Locally, on restarr publish
oh, maybe that never worked, publishLocal overwrites the local starr version. |
sigs via scalap, from overridden toString you get java.lang.String
|
844918a
to
230304c
Compare
squashed rebase of local branch, which seems to have some debug settings. Maybe I was tracking down those optimizer warnings? |
Weirdly,
but it incurs a warning anyway. I haven't looked at it yet; this was the first opt warning. Or, the |
Use
-Xsource:3-cross
, with the exclusion-Xsource-features:-case-companion-function
in the library.Stay on
-Xsource:2.13
forscalap
.The hardest part was the overrides in Scaladoc's
ModelFactory
.What worked like a charm is:
Previously:
I did a quick jardiff.