-
Notifications
You must be signed in to change notification settings - Fork 186
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 support #1316
Comments
To cross-build for Scala3 , we need metaconfig to be release for scala 3 scalameta/metaconfig#103, or use another config library that doesn't contain macros or release for scala 3 |
This seems to be an issue also in mdoc. I think we might need to migrate to something like sconfig or make metaconfig support Scala 3. Not sure what is the best solution here. |
Thanks to @mlachkar, there has been good progress in inferring the parsing dialect based on the provided Before ticking the first item and ahead of documentation updates, I still wonder how Scala3 rules (or portable Scala2/3 rules) could safely consume/produce Scala3 ASTs with new syntax.
@tgodzik is my analysis correct? |
Regarding (2) and (3): actually most of the patches take strings as parameters to inject (except |
Overall, please open up issue about anything problematic, I will try to fix them as quickly as possible. We've been mostly figuring things out for Scalafmt use cases up until now. |
@tgodzik thanks for the prompt feedback and your hard work on Scala 3 support in scalameta! I/we will follow-up on scalameta as the needs materialize. As mentioned above, I probably over-estimated the impact of (2) and (3) anyway! |
Some other things that might be useful would be to be able to declare different rules for a subset of files. We could have similar thing to The context here is that I am trying to run the current rules on metals, but getting some issues like:
and
|
I was about to suggest using a different configuration file (since I believe we don't need file-level granularity?) but I see https://github.com/scalameta/metals/pull/2860/files did precisely that! |
Hi all, as part of GSoC 2022 I'm currently working on cross compiling scalafix-core, scalafix-rules, scalafix-reflect and scalafix-cli to scala 3, hence allowing for the implementation of ExplicitResultTypes afterwards. @bjaglin I'm not able to update the issue by checking out the checkbox related to this, can I get permissions to do so or could you do it for me? |
@rvacaru I am going to update the description now and will tick the box once we have the artifacts published |
"Scala 3 support" is quite broad. Now that we have had support for implementing syntactic and semantic rules targeting Scala 3 source files using Scala 2.x since Scalafix 0.9.28, closing this in favor of: |
Opening this for visibility and to track the upcoming work for supporting Scala 3
new parameter (optional for backward compatibility) to feed the input/output dialectreusescalaVersion
, see remove dialect and use scalaVersion #1392 (review)scala-3[.0.0-RC2]
folder with all revelevant tests (maybe check if sbt can remove the RC suffix?) & move scala 2.12 syntax currently inscala
toscala-2.12.-x
foldersprovide the input/output dialect based on the buildalways providescalaVersion
scalaVersion
, see remove dialect and use scalaVersion #1392 (review)scalaVersion := "3"
inscalafixEnable
SemanticdbPlugin
to abstract usage of semanticdb-scalacon-demand compilation when semanticdb info is missing should probably be removed ?ExplicitResultTypes
usage of the Scala 2 presentation compiler to Scala 3 scala 3: ExplicitResultTypes #1583support only 2.13 & 3 via TASTywe don't have enough information to shorten namesstop using presentaton compiler completely?drop support for 2.12 and earlier?can we expose TASTy info through scalafix API to avoid duplicated code in scala-rewrites?The text was updated successfully, but these errors were encountered: