-
Notifications
You must be signed in to change notification settings - Fork 22
characters ` are missing after reorganize import #101
Comments
Hey @JR-Utily, thanks for reporting! Which version of |
@JR-Utily, actually, I reproduced this issue with the most recent master (f5ee0a8) with the following diff: diff --git a/input/src/main/scala/fix/ExpandRelativeQuotedIdent.scala b/input/src/main/scala/fix/ExpandRelativeQuotedIdent.scala
index d91fe7f..59ed1ee 100644
--- a/input/src/main/scala/fix/ExpandRelativeQuotedIdent.scala
+++ b/input/src/main/scala/fix/ExpandRelativeQuotedIdent.scala
@@ -5,6 +5,7 @@ OrganizeImports.expandRelative = true
package fix
import QuotedIdent.`a.b`
+import QuotedIdent.`macro`
import `a.b`.c
import `a.b`.`{ d }`
diff --git a/output/src/main/scala/fix/ExpandRelativeQuotedIdent.scala b/output/src/main/scala/fix/ExpandRelativeQuotedIdent.scala
index 24c79cb..633c3f3 100644
--- a/output/src/main/scala/fix/ExpandRelativeQuotedIdent.scala
+++ b/output/src/main/scala/fix/ExpandRelativeQuotedIdent.scala
@@ -3,5 +3,6 @@ package fix
import fix.QuotedIdent.`a.b`
import fix.QuotedIdent.`a.b`.`{ d }`
import fix.QuotedIdent.`a.b`.c
+import fix.QuotedIdent.`macro`
object ExpandRelativeQuotedIdent
diff --git a/shared/src/main/scala/fix/QuotedIdent.scala b/shared/src/main/scala/fix/QuotedIdent.scala
index 010e8e2..121d61f 100644
--- a/shared/src/main/scala/fix/QuotedIdent.scala
+++ b/shared/src/main/scala/fix/QuotedIdent.scala
@@ -7,4 +7,6 @@ object QuotedIdent {
object e
}
}
+
+ object `macro`
} Test failure output:
Hmm, I guess it's because |
Update: Per discussion in scalameta/scalameta#2096, it's not really about the |
The Scalameta side issue has been fixed in scalameta/scalameta#2098, waiting for new releases of Scalameta and Scalafix. |
Thank you so much for your reactivity ! |
@JR-Utily, a fix for this issue has been included in the v0.4.1 release. |
Thanks ! |
I don't know why, I try to fix from
to
and it were not ok, it put it again as
but after adding back the quotes in the defactorized lines, it keeps them correctly on next reorganize calls, so this is ok for me but maybe there is still a bug (non-blocking this time) |
Hello !
In my company, we have a
macro
package in which we write our macros.As macro is a reserved keyword, the package is name
macro
with backquote `When we import something from this package, we write for example:
but when this is reorganized, the ` are removed, and I have just:
which is not a valid syntax and leads to compilation error
The text was updated successfully, but these errors were encountered: