scala-cli icon indicating copy to clipboard operation
scala-cli copied to clipboard

plugin option added twice

Open tgodzik opened this issue 1 year ago • 8 comments

Version(s) 1.1.2

Describe the bug When using:

//project.scala
//> using plugin "org.virtuslab::besom-compiler-plugin:0.1.1-SNAPSHOT"

the plugin option is sometimes added twice, but it doesn't seem to reproduce always/

Expected behaviour Plugin option is added once.

tgodzik avatar Jan 31 '24 15:01 tgodzik

may be related to https://github.com/VirtusLab/scala-cli/issues/2621, as I never really got it working stably with Bloop... 🤔 @tgodzik is it reproducible with --server=false?

Gedochao avatar Feb 01 '24 07:02 Gedochao

--server=false does not generate bloop's json files I'm afraid

lbialy avatar Feb 01 '24 08:02 lbialy

--server=false does not generate bloop's json files I'm afraid

@lbialy but it does pass plugin options to the compiler

Gedochao avatar Feb 02 '24 14:02 Gedochao

There never was any issue with compilation by scala-cli, the error crashes metals and metals only.

lbialy avatar Feb 02 '24 17:02 lbialy

Passed you a repro with minimization via slack.

lbialy avatar Feb 02 '24 17:02 lbialy

Tomasz suggests that this is what breaks Metals for me, diagnostics not being delivered.

//> using scala "3.3.3"
//> using options -Werror -Wunused:all -Wvalue-discard -Wnonunit-statement
//> using plugin "org.virtuslab::besom-compiler-plugin:0.2.2"
//> using dep "org.virtuslab::besom-core:0.2.2"
//> using dep "org.virtuslab::besom-aws:6.23.0-core.0.2"
//> using dep "org.virtuslab::besom-awsx:2.5.0-core.0.2"

import besom.*
import besom.api.aws, besom.api.awsx

@main def main = Pulumi.run {
  val bucket =
    // THIS IS AN ERROR        v  <---- over here
    aws.s3.Bucket("my-bucket", ws.s3.BucketArgs(forceDestroy = true))

  Stack.exports(
    bucketName = bucket.bucket
  )

}

CleanShot 2024-03-28 at 09 25 06

CleanShot 2024-03-28 at 09 30 28@2x

keynmol avatar Mar 28 '24 09:03 keynmol

Yeah, this is a massive pita for us. Two things actually trigger this. Compiler plugin is one thing. Second is

//> using options -language:noAutoTupling

No idea if this is the same problem or a completely different one.

On Thu 28. Mar 2024 at 10:37, Anton Sviridov @.***> wrote:

Tomasz suggests that this is what breaks Metals for me, diagnostics not being delivered.

//> using scala "3.3.3"//> using options -Werror -Wunused:all -Wvalue-discard -Wnonunit-statement//> using plugin "org.virtuslab::besom-compiler-plugin:0.2.2"//> using dep "org.virtuslab::besom-core:0.2.2"//> using dep "org.virtuslab::besom-aws:6.23.0-core.0.2"//> using dep "org.virtuslab::besom-awsx:2.5.0-core.0.2" import besom.*import besom.api.aws, besom.api.awsx @main def main = Pulumi.run { val bucket = // THIS IS AN ERROR v <---- over here aws.s3.Bucket("my-bucket", ws.s3.BucketArgs(forceDestroy = true))

Stack.exports( bucketName = bucket.bucket, // ecrRepo = repo.url, // image = image.urn )

}

CleanShot.2024-03-28.at.09.25.06.gif (view on web) https://github.com/VirtusLab/scala-cli/assets/1052965/90175895-536a-4396-aa11-57aa0804fb3c

@.*** (view on web) https://github.com/VirtusLab/scala-cli/assets/1052965/ecbbcd0f-9858-44af-8e16-8d420961ef0e

— Reply to this email directly, view it on GitHub https://github.com/VirtusLab/scala-cli/issues/2708#issuecomment-2024773628, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBVNUXWFFTPLJZPEPP6EDTY2PJC5AVCNFSM6AAAAABCTJIR3GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRUG43TGNRSHA . You are receiving this because you were mentioned.Message ID: @.***>

lbialy avatar Mar 28 '24 11:03 lbialy

Yeah, this is a massive pita for us. Two things actually trigger this. Compiler plugin is one thing. Second is //> using options -language:noAutoTupling No idea if this is the same problem or a completely different one.

I've seen also this being trigerred by -encoding:utf-8

pawelprazak avatar Apr 10 '24 11:04 pawelprazak