Open pjoneswork opened 3 years ago
Converting a package to a top level object with the same name gives " is already defined as package "
To reproduce start with the follow setup:
> cat build.sbt ThisBuild / organization := "foo" ThisBuild / scalaVersion := "2.12.12" lazy val root = (project in file (".")) > cat project/build.properties sbt.version=1.4.6 > cat src/main/scala/foo.scala package foo.bar object Bar { val myFooBar: Int = 1 } > cat project/metals.sbt // DO NOT EDIT! This file is auto-generated. // This file enables sbt-bloop to create bloop config files. addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.6-21-464e4ec4")
After metals has loaded and built the project change foo.scala to
foo.scala
package foo object bar { object Bar { val myFooBar: Int = 1 } }
Get the error message bar is already defined as package bar.
bar is already defined as package bar
The error message remains even through doing the following commands exposed by VSCode:
I can get rid of the error message by doing
> rm -fr .bloop
and reimporting the build.
Thanks for reporting! I think the issue here is that we don't fully clean the results when being sent the clean request. It's soemthing on my list to take a look at.
Converting a package to a top level object with the same name gives "
To reproduce start with the follow setup:
After metals has loaded and built the project change
foo.scala
toGet the error message
bar is already defined as package bar
.The error message remains even through doing the following commands exposed by VSCode:
I can get rid of the error message by doing
and reimporting the build.