Skip to content

Add support for Dotty #122

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

Closed
Sciss opened this issue Sep 12, 2020 · 6 comments
Closed

Add support for Dotty #122

Sciss opened this issue Sep 12, 2020 · 6 comments

Comments

@Sciss
Copy link
Contributor

Sciss commented Sep 12, 2020

Add a build for latest Dotty (as of this writing 0.27.0-RC1), and then publish an artifact.

@Sciss
Copy link
Contributor Author

Sciss commented Sep 12, 2020

@Sciss
Copy link
Contributor Author

Sciss commented Sep 12, 2020

Currently stopped by scala/scala3#9780

@Sciss
Copy link
Contributor Author

Sciss commented Nov 5, 2020

Compiles with Scala 3.0.0-M1. As soon as ScalaTest is published, I guess I can submit a PR, and we can publish a new stable version.

@Sciss
Copy link
Contributor Author

Sciss commented Nov 9, 2020

ScalaTest is there now. Running into problems with reflective calls (structural types):

// object Action
    trait Wrapper extends Action.Trigger {
      def peer: javax.swing.JComponent {
        def addActionListener(a: ActionListener): Unit
        def removeActionListener(a: ActionListener): Unit
        def setAction(a: javax.swing.Action): Unit
        def getAction(): javax.swing.Action // note: must keep empty parentheses for Java compatibility
      }

      private var _action: Action = Action.NoAction
      def action: Action = _action
      def action_=(a: Action): Unit = { _action = a; peer.setAction(a.peer) }

when I call action_=, it gives

[error] Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: scala
[error]     at scala.swing.package$.reflectiveCalls(package.scala:93)
[error]     at scala.swing.Action$Trigger$Wrapper.action_$eq(Action.scala:41)
[error]     at scala.swing.Action$Trigger$Wrapper.action_$eq$(Action.scala:30)
[error]     at scala.swing.AbstractButton.action_$eq(AbstractButton.scala:25)
...

@Sciss
Copy link
Contributor Author

Sciss commented Nov 9, 2020

PR ready now: #124

@Sciss
Copy link
Contributor Author

Sciss commented Nov 10, 2020

fixed in #124

@Sciss Sciss closed this as completed Nov 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant