Skip to content

Dotty 3.0.0-M1 support #124

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 7 commits into from
Nov 10, 2020
Merged

Dotty 3.0.0-M1 support #124

merged 7 commits into from
Nov 10, 2020

Conversation

Sciss
Copy link
Contributor

@Sciss Sciss commented Nov 9, 2020

No description provided.

- RichWindow - we cannot override internal class InterfaceMixin, thus
  introduce InterfaceMixin2
- ScrollPane.BarPolicy cannot be an Enumeration because we cannot
  override internal class Value. Make it a case class instead
- Window#SuperMixin causes a compiler bug in Dotty
  ("dotc: wrong number of arguments at crossCast for (x$0: java.awt.GraphicsConfiguration): java.awt.Window: (java.awt.Window#<init> : (x$0: java.awt.GraphicsConfiguration): java.awt.Window
  ), expected: 1, found: 0"
- we're waiting for scala-test
- Action.Trigger.Wrapper, Oriented.Wrapper, Orientable.Wrapper have been
  removed; one must mix in Action.Trigger, Oriented, Orientable instead
  and implement the methods
- Swing.PeerContainer is not a structural type but a trait, that must
  be mixed in
- clean up some examples
- remove lanuage feature lazy vals from package object
@Sciss Sciss mentioned this pull request Nov 9, 2020
Copy link
Member

@SethTisue SethTisue left a comment

Choose a reason for hiding this comment

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

build changes LGTM. rest looks plausible :-)

@@ -16,6 +16,6 @@ package scala.swing
* A frame that can be used for main application windows. It shuts down the
* framework and quits the application when closed.
*/
class MainFrame(gc: java.awt.GraphicsConfiguration = null) extends Frame(gc) {
class MainFrame(/*gc: java.awt.GraphicsConfiguration = null*/) extends Frame /*(gc)*/ {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

might have missed to undo this? will check

@@ -79,7 +79,7 @@ private[swing] trait LazyPublisher extends Publisher {

import scala.ref._

private[swing] trait SingleRefCollection[+A <: AnyRef] extends Iterable[A] { self =>
private[swing] trait SingleRefCollection[/*+*/ A <: AnyRef] extends Iterable[A] { self =>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

is this a left-over?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, this is stronger enforcement by dotty. Just remove the entire commented part.

- build with 2.11, 2.12, 2.13, 3.0.0-M1
- update travis
- update readme
- restore MainFrame constructor argument
- remove unused import
@Sciss
Copy link
Contributor Author

Sciss commented Nov 9, 2020

Ok tests with all cross scala versions. The indended new version of scala-swing will be 2.2.0.

@SethTisue
Copy link
Member

with a new major version since multiple API changes happen (mostly simplifications).

@Sciss I think this should be 3.0.0 then, not 2.2.0?

@Sciss
Copy link
Contributor Author

Sciss commented Nov 9, 2020

Are we not in "old style" semver, like <epoch>.<major>.<minor>? Then wouldn't 2.2.x follow after 2.1.x ? I mean, 1.0.x was never correlated to Scala 1. But I have no strong feelings, we can also call it scala-swing 3.0.0.

@SethTisue
Copy link
Member

SethTisue commented Nov 9, 2020

In general in the Scala modules we use major.minor.patch. Bump patch if bugfix only; bump minor when breaking forward compat; bump major when breaking backward compat.

So yeah, I would prefer we call it 3.0.0 unless you have a strong opinion otherwise.

@Sciss
Copy link
Contributor Author

Sciss commented Nov 9, 2020

Oh, alright. Then I will just edit the README.

@Sciss Sciss merged commit a01fea5 into scala:work Nov 10, 2020
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.

2 participants