21 May 2024 |
| jypma changed their display name from netwa1ker to jypma. | 13:16:19 |
rohith_02_ | ![image.png](https://matrix.org/_matrix/media/r0/thumbnail/t2bot.io/2aaea839e029d8535ae11625707754dcb96abe1c1792966119418494976?height=360&method=scale&width=360) Download image.png | 17:18:47 |
rohith_02_ | ![image.png](https://matrix.org/_matrix/media/r0/thumbnail/t2bot.io/5a74bb9ae01ce9d7ddbfdd3755ce27cd7b864c501792966124757843968?height=360&method=scale&width=360) Download image.png | 17:18:48 |
rohith_02_ | Hey guys. Why do I see this error? The scala version in my project is 2.12.18. I see that 'do, while' is deprecated on Scala versions 3+. Should I specify the scala version explicitly somewhere else? | 17:18:48 |
Tomasz Godzik | looks like the file is using the default Scala 3 version. Either it's not recognized as part of Scala 2 build or maybe it's a leftover diagnostic from before the project was imported? If you reopen the file does it stay? | 17:38:05 |
22 May 2024 |
rohith_02_ | Yes, it does stay the same even I reopen the file. | 04:31:12 |
rohith_02_ | Interestingly, I see this message: INFO no build target found for /scala/com/ro/rkt/util/data/cos/COSWriter.scala. Using presentation compiler with project's scala-library version: 3.3.3
How come my project's scala-library version is 3.3.3? It's 2.12.18. | 05:43:24 |
rohith_02_ | ![image.png](https://matrix.org/_matrix/media/r0/thumbnail/t2bot.io/9ed58b918cbe4650cd69764ed600740bd4a151c21793157948072001536?height=360&method=scale&width=360) Download image.png | 05:52:24 |
Tomasz Godzik | The message shows up when we don't detect any information about the file. You can change the default in the settings, but for sure it will not solve all the problems. Did you import the build? You might want to run it again and show if there are any errors | 07:33:14 |
Tomasz Godzik | You can do it via a command or in the metals view | 07:33:45 |
rohith_02_ | That file is from a external JAR. Yes, I had imported the build, it was successful and the compilation was also done. I'm able to access that file, but my concern here is, how can I make the presentation compiler to use scala 2.12.18 instead of 3.3.3? Can you guide me on that? | 07:39:07 |
Tomasz Godzik | Interesting, we usually infer the Scala version from the jar path, so that should be fixable for now it VS Code setting you can use
"metals.fallbackScalaVersion": "2.13.13", | 07:43:54 |
Tomasz Godzik | setting | 07:43:57 |
rohith_02_ | ![image.png](https://matrix.org/_matrix/media/r0/thumbnail/t2bot.io/bcbb49e37f8c4c81ed1153813c19d1cbd225ac321793189377854144512?height=360&method=scale&width=360) Download image.png | 07:57:18 |
rohith_02_ | ![Screenshot_2024-05-22_at_13.23.42.png](https://matrix.org/_matrix/media/r0/thumbnail/t2bot.io/ce7e64cb2c2cad3f3ed0ed4210066fb3708ed1f91793189381771624448?height=360&method=scale&width=360) Download Screenshot_2024-05-22_at_13.23.42.png | 07:57:19 |
rohith_02_ | Updated the version and also restarted Bloop. It's still showing that the project's scala-library is 3.3.3. | 07:57:19 |
Tomasz Godzik | Looks like the setting is not properly propagated 🤔 This is right next to each other | 08:00:14 |
Tomasz Godzik | also, is there any Scala 3 at all in your project? | 08:00:40 |
rohith_02_ | I have searched for Scala 3 in the entire project and I don't see anything. | 08:02:03 |
rohith_02_ | Is there any command to check from where it's fetching that 3.3.3 version ? | 08:19:32 |
Tomasz Godzik | Could you try and run the metals doctor? It should show all targets that metals sees | 08:23:36 |
rohith_02_ | ![Screenshot_2024-05-22_at_13.57.13.png](https://matrix.org/_matrix/media/r0/thumbnail/t2bot.io/345b40df49bb18dbc61cd3bce63cf70cc2f1082b1793197392799989760?height=360&method=scale&width=360) Download Screenshot_2024-05-22_at_13.57.13.png | 08:29:09 |
rohith_02_ | Here you go. There are two buid targets here. One is for the main and one is for the test | 08:29:09 |
| im_bharadwajj joined the room. | 08:54:35 |
Tomasz Godzik | That looks correct 🤔 it should use scala 2.12.18 as a fallback | 09:30:29 |
rohith_02_ | Pretty much confused on why this is happening. What could be the possible resolution? I'm not using sbt build, i'm sticking with Maven itself. Does changing to sbt makes any impact? | 10:35:36 |
Tomasz Godzik | Everything seems correct aside from the version being picked for the library, which should be 2.12.18 | 10:50:21 |
Tomasz Godzik | This happens only in dependencies though? | 10:50:42 |
rohith_02_ | only with that specific dependency. | 10:51:55 |
Tomasz Godzik | is that a public dependency? | 10:52:33 |