-
Notifications
You must be signed in to change notification settings - Fork 51
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
Document editors (metals) support for cross-built projects #111
Comments
I agree that we are lacking documentation on this side. But it is a general concern about cross-built project (version and platform). @tgodzik Don't you think it should be documented in the Metals website? This way we could add a link from here and maybe elaborate further for the context of the migration. |
Not sure where to add it, we are saying here that Scala 3 is supported. We could add it also to overview, but the default behaviour is that Metals supports multiple versions at the same time. We could add a mention in migration guide that multiple versions are supported and link to Metals with a comment to check exactly what is supported. |
Thanks for your replies. Metals does support both languages out of the box but as far as I can tell, it does not support a single project having sources in both Scala 2 and Scala 3. ie. if you have macros for both languages in different folders ( Maybe something needs to be configured or a specific setting set in sbt, but I could not get it working. |
I guess you are using a It means that, at any given time, sbt only knows about one scalaVersion and consequently It is slightly better with sbt as the build server because Metals will always be in-sync with sbt when compiling. But you still need to re-import the build so that Metals is aware of the new scala-version source directory. (That can be improved in future versions with Using So yes we should document that |
We could try to always run |
Indeed I'm using |
While all of the above is true, and it would be nice if it worked, none of this is specific to Scala 3. If you have sources in scala-2.12 and scala-2.13, only one of those will be recognized by Metals. I don't think IntelliJ fares any better. |
I did not know that. Although while it's correct it does not make it any less of an issue. You are less likely to run into the issue between Scala 2.12 and 2.13 bc. they are mostly compatible. OTOH If you cross-build for 2.13 and 3.0, you are almost guaranteed to run into this since the languages are so different. I worry that this lack of ergonomics will in practice hinder the work to cross-publish and in the end encourage libs maintainers to just stick to Scala 2. |
@jto You are totally right. I think we should be able to work on it soon. Followed up with an issue here scalameta/metals#2287 |
AFAIK there's no documentation available rn about using an editor (vscode) together with metals and have support for both Scala 2.x and Scala 3 in a single project. It would be nice if that rather common use case was supported and documented.
The text was updated successfully, but these errors were encountered: