Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
som-snytt wants to merge1 commit intoscala:2.13.x
base:2.13.x
Choose a base branch
Loading
fromsom-snytt:trial/library-xsource3

Conversation

som-snytt
Copy link
Contributor

@som-snyttsom-snytt commentedSep 20, 2023
edited
Loading

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'sModelFactory.

What worked like a charm is:

sbt:scala2> set ThisBuild / scalacOptions += "-quickfix:msg=lambda-parens"

Previously:

I will let mima complain. What is the mima command again?

I did a quick jardiff.

lrytz reacted with thumbs up emoji
@scala-jenkinsscala-jenkins added this to the2.13.13 milestoneSep 20, 2023
@som-snyttsom-snytt changed the titleBuild library under -Xsource:3 warningsBuild library under -Xsource:3 warnings [ci: last-only]Sep 20, 2023
@som-snytt
Copy link
ContributorAuthor

I did not intend to ignoreDeadline.

@lrytz
Copy link
Member

What is the mima command again?

library/mimaReportBinaryIssues

We might have to review ifXsource:3 has any semantic changes.

som-snytt reacted with thumbs up emoji

@xuwei-k
Copy link
Contributor

🤔

--- 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)

@xuwei-k
Copy link
Contributor

@som-snytt
Copy link
ContributorAuthor

@xuwei-k thanks, it is also a dry-run to test the pain caused by-Xsource:3.

@som-snytt
Copy link
ContributorAuthor

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.

@som-snytt
Copy link
ContributorAuthor

som-snytt commentedSep 28, 2023
edited
Loading

Sample improved message

Deadline.scala:32:12: access modifiers for `apply` method are copied from the case class constructor

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.

@som-snyttsom-snyttforce-pushed thetrial/library-xsource3 branch 3 times, most recently from28110b0 toa9ba237CompareSeptember 28, 2023 17:12
@som-snyttsom-snytt marked this pull request as ready for reviewSeptember 28, 2023 20:00
@som-snyttsom-snytt marked this pull request as draftOctober 10, 2023 19:12
@som-snytt
Copy link
ContributorAuthor

Drafting until improved-Xsource:3 is merged.

@SethTisueSethTisue added the internalnot resulting in user-visible changes (build changes, tests, internal cleanups) labelOct 13, 2023
@lrytzlrytz modified the milestones:2.13.13,2.13.14Nov 28, 2023
@som-snytt
Copy link
ContributorAuthor

Ready to fork the project so I can merge#10573 and profit.

Closing until that is merged here.

@SethTisueSethTisue removed this from the2.13.14 milestoneJan 16, 2024
@som-snyttsom-snytt changed the titleBuild library under -Xsource:3 warnings [ci: last-only][BLOCKED] Build library under -Xsource:3 warnings [ci: last-only]Jan 27, 2024
@som-snyttsom-snytt changed the title[BLOCKED] Build library under -Xsource:3 warnings [ci: last-only]Build library under -Xsource:3 [ci: last-only]Apr 23, 2024
@som-snyttsom-snytt reopened thisNov 19, 2024
@scala-jenkinsscala-jenkins added this to the2.13.16 milestoneNov 19, 2024
@som-snyttsom-snyttforce-pushed thetrial/library-xsource3 branch 2 times, most recently fromf6c0c59 to898bb8fCompareNovember 19, 2024 03:51
@som-snytt
Copy link
ContributorAuthor

som-snytt commentedNov 19, 2024
edited
Loading

[error] Conflicting compiler settings were detected. Some settings will be ignored.[error] -Xsource-features requires -Xsource:3

Locally, on restarr publish

[error] ## Exception when compiling 164 sources to /home/amarki/projects/scala/build/quick/classes/reflect[error] java.lang.NoClassDefFoundError: scala/collection/immutable/WrappedString[error] scala.LowPriorityImplicits.wrapString(Predef.scala:578)[error] scala.tools.xsbt.DelegatingReporter$.makePosition$1(DelegatingReporter.scala:141)[error] scala.tools.xsbt.DelegatingReporter$.convert(DelegatingReporter.scala:190)[error] scala.tools.xsbt.DelegatingReporter.doReport(DelegatingReporter.scala:225)[error] scala.reflect.internal.Reporter.filteredInfo(Reporting.scala:126)[error] scala.reflect.internal.Reporter.error(Reporting.scala:121)[error] scala.tools.nsc.Reporting$PerRunReporting.error(Reporting.scala:391)[error] scala.tools.nsc.typechecker.Contexts$ImmediateReporter.error(Contexts.scala:1821)

oh, maybe that never worked, publishLocal overwrites the local starr version.

@som-snytt
Copy link
ContributorAuthor

som-snytt commentedNov 19, 2024
edited
Loading

sigs via scalap, from overridden toString you get java.lang.String

-  override val iter: scala.Iterator[scala.Char] = { /* compiled code */ } // BufferedSource+  override val iter: scala.collection.Iterator[scala.Char] = { /* compiled code */ }-  override def toString(): java.lang.String = { /* compiled code */ }+  override def toString(): scala.Predef.String = { /* compiled code */ }-    def set(newValue: scala.Predef.String): scala.Predef.String = { /* compiled code */ } // BooleanProp+    def set(newValue: scala.Predef.String): java.lang.String = { /* compiled code */ }

@SethTisueSethTisue modified the milestones:2.13.16,2.13.17Dec 12, 2024
@som-snytt
Copy link
ContributorAuthor

squashed rebase of local branch, which seems to have some debug settings. Maybe I was tracking down those optimizer warnings?

@som-snytt
Copy link
ContributorAuthor

som-snytt commentedApr 10, 2025
edited
Loading

Weirdly,

// not inline due to outer pointer; optimizer warns on uninlined calls into tpd

but it incurs a warning anyway. I haven't looked at it yet; this was the first opt warning. Or, thedef Apply is inline.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
internalnot resulting in user-visible changes (build changes, tests, internal cleanups)
Projects
None yet
Milestone
2.13.17
Development

Successfully merging this pull request may close these issues.

5 participants
@som-snytt@lrytz@xuwei-k@SethTisue@scala-jenkins

[8]ページ先頭

©2009-2025 Movatter.jp