Skip to content
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

GenIdea: Illegal char <:> #3203

Open
He-Pin opened this issue Jun 11, 2024 · 2 comments
Open

GenIdea: Illegal char <:> #3203

He-Pin opened this issue Jun 11, 2024 · 2 comments

Comments

@He-Pin
Copy link
Contributor

He-Pin commented Jun 11, 2024

Bug:
: is not a valid file name on Windows.

[build.sc] [1/1] mill.idea.GenIdea.idea > [7/9] sources.super.mill.scalalib.JavaModule.sources   
Writing 1201 IDEA project files to C:\Users\hepin\IdeaProjects\mill\.idea ...
1 targets failed
mill.idea.GenIdea.idea java.nio.file.InvalidPathException: Illegal char <:> at index 32: mill_modules/dummy.io.chris-kipp:mill-scip_mill0.11_2.13:0.3.7.iml
    java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:204)
    java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:175)
    java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
    java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)
    java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:231)
    java.base/java.nio.file.Path.resolve(Path.java:516)
    os.Path.$div(Path.scala:501)
    mill.idea.GenIdeaImpl.$anonfun$run$3(GenIdeaImpl.scala:48)
    mill.idea.GenIdeaImpl.$anonfun$run$3$adapted(GenIdeaImpl.scala:46)
    scala.collection.IterableOnceOps.foreach(IterableOnce.scala:576)
    scala.collection.IterableOnceOps.foreach$(IterableOnce.scala:574)
    scala.collection.AbstractIterable.foreach(Iterable.scala:933)
    scala.collection.IterableOps$WithFilter.foreach(Iterable.scala:903)
    mill.idea.GenIdeaImpl.run(GenIdeaImpl.scala:46)
PS C:\Users\hepin\IdeaProjects\mill>

How to reprodouce.

Checkout mill and run mill mill.idea.GenIdea/idea

@lefou
Copy link
Member

lefou commented Jun 11, 2024

Thanks for the report. Looks like we also need to mask illegal characters in cross values.

As a work around, you can skip the dummy modules.

--- a/build.sc
+++ b/build.sc
@@ -1987,6 +1987,7 @@ implicit object DepSegment extends Cross.ToSegments[Dep]({ dep =>
  */
 object dummy extends Cross[DependencyFetchDummy](dummyDeps)
 trait DependencyFetchDummy extends ScalaModule with Cross.Module[Dep] {
+  def skipIdea = true
   def scalaVersion = Deps.scalaVersion
   def compileIvyDeps = Agg(crossValue)
 }

@lefou lefou changed the title Illegal char <:> GenIdea: Illegal char <:> Jun 11, 2024
@He-Pin
Copy link
Contributor Author

He-Pin commented Jun 11, 2024

I'm using Windows 11😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants