-
Notifications
You must be signed in to change notification settings - Fork 46
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
Scala 3 code compilation issues #361
Comments
Hey there, and thanks for the report! I haven't tested the converter with anything newer than scala 3.0.2, and I haven't set a strict flag when using it. Does this mean you specified some These things should all be easy enough to fix I think. Unfortunately I have less time than normal these days, so it'll be some time before I get to it |
yes, I set quite a lot of scalacOptions, as I am trying to make sure the library I am building is using the right structures for Scala3. Currently I have val scala3jsOptions = Seq(
// "-classpath", "foo:bar:...", // Add to the classpath.
//"-encoding", "utf-8", // Specify character encoding used by source files.
"-deprecation", // Emit warning and location for usages of deprecated APIs.
"-unchecked", // Enable additional warnings where generated code depends on assumptions.
"-feature", // Emit warning and location for usages of features that should be imported explicitly.
//"-explain", // Explain errors in more detail.
//"-explain-types", // Explain type errors in more detail.
"-indent", // Together with -rewrite, remove {...} syntax when possible due to significant indentation.
// "-no-indent", // Require classical {...} syntax, indentation is not significant.
"-new-syntax", // Require `then` and `do` in control expressions.
// "-old-syntax", // Require `(...)` around conditions.
// "-language:Scala2", // Compile Scala 2 code, highlight what needs updating
//"-language:strictEquality", // Require +derives Eql+ for using == or != comparisons
// "-rewrite", // Attempt to fix code automatically. Use with -indent and ...-migration.
// "-scalajs", // Compile in Scala.js mode (requires scalajs-library.jar on the classpath).
"-source:future", // Choices: future and future-migration. I use this to force future deprecation warnings, etc.
// "-Xfatal-warnings", // Fail on warnings, not just errors
// "-Xmigration", // Warn about constructs whose behavior may have changed since version.
// "-Ysafe-init", // Warn on field access before initialization
"-Yexplicit-nulls" // For explicit nulls behavior.
) Not a big deal, as I fixed it by hand. |
I'd be happy to support future source and explicit nulls at least, it is the best way forward |
Implement necessary changes to compile with `-source:future` for scala 3 (towards #361)
Hi,
When I compile the generated code for rdflib.js in Scala3 in strict mode, I get the following warnings:
open
x: _*
syntax rather than the*
syntaxThose will be easy to fix, but perhaps there is a flag that I can set to get it right out of the box? I fixed them in this commit by hand. Now I just have to test the code with a few examples...
Originally posted by @bblfish in #359
The text was updated successfully, but these errors were encountered: