Giter VIP home page Giter VIP logo

Comments (15)

lefou avatar lefou commented on September 28, 2024

I can't reproduce:

> git clone https://github.com/com-lihaoyi/cask
Klone nach 'cask'...
remote: Enumerating objects: 5408, done.
remote: Counting objects: 100% (989/989), done.
remote: Compressing objects: 100% (479/479), done.
remote: Total 5408 (delta 418), reused 932 (delta 379), pack-reused 4419
Empfange Objekte: 100% (5408/5408), 747.54 KiB | 4.30 MiB/s, fertig.
Löse Unterschiede auf: 100% (2241/2241), fertig.
> cd cask
> echo -n "0.11.7-86-18d144" > .mill-version
> mill mill.idea.GenIdea/idea
[build.sc] [53/58] compile 
Compiling compiler interface...
[info] compiling 27 Scala sources to /home/lefou/work/tmp/cask/out/mill-build/compile.dest/classes ...
[warn] /home/lefou/work/tmp/cask/example/staticFiles/build.sc:19:7: reference to test is ambiguous;
[warn] it is both defined in the enclosing trait AppModule and inherited in the enclosing object test as method test (defined in trait TestModule, inherited through parent trait ScalaTests)
[warn] In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope.
[warn] Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.test`.
[warn] Or use `-Wconf:msg=legacy-binding:s` to silence this warning. [quickfixable]
[warn]       test(args:_*)
[warn]       ^
[warn] /home/lefou/work/tmp/cask/example/staticFiles2/build.sc:19:7: reference to test is ambiguous;
[warn] it is both defined in the enclosing trait AppModule and inherited in the enclosing object test as method test (defined in trait TestModule, inherited through parent trait ScalaTests)
[warn] In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope.
[warn] Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.test`.
[warn] Or use `-Wconf:msg=legacy-binding:s` to silence this warning. [quickfixable]
[warn]       test(args:_*)
[warn]       ^
[warn] two warnings found
[info] done compiling
[1/1] mill.idea.GenIdea.idea 
Analyzing modules ...
[build.sc] [1/1] mill.idea.GenIdea.idea > [7/9] sources.super.mill.scalalib.JavaModule.sources 
Writing 502 IDEA project files to /home/lefou/work/tmp/cask/.idea ...

I also can't make any sense of your other comments. Maybe, you have some local changes? Can you elaborate?

from mill.

He-Pin avatar He-Pin commented on September 28, 2024

Thanks for look in,There is a pr in the cask repo, you can check it out. And I'm using windows 11.

from mill.

lefou avatar lefou commented on September 28, 2024

Please provide the link to the PR. I see two.

> gh pr list
Showing 3 of 3 open pull requests in com-lihaoyi/cask

#125  Virtual Thread support         He-Pin:vt                about 1 day ago
#124  chore: Rename page 1           He-Pin:patch-1           about 1 day ago
#113  [WIP] Better route validation  better-route-validation  about 4 months ago

from mill.

He-Pin avatar He-Pin commented on September 28, 2024

@lefou com-lihaoyi/cask#125
I'm on Windows 11, and using mill from Windows shell , not WSL.

from mill.

lefou avatar lefou commented on September 28, 2024

I still can't reproduce on my Linux machine.

But the stacktrace/error message you've shown doesn't make sense to me, since it points me to

case (_, true, false) => Some("PROVIDED")
, which isn't even supposed to match on a Vector of PathRef.

Does running with --debug reveal anything?
Can you show mill --meta-level 1 show runClasspath?
Are your projects dir and home dir on the same drive/filesystem?
How have you installed Mill?

from mill.

Amagicman avatar Amagicman commented on September 28, 2024

hang@vm:~/work/lx00lib/mill$ mill mill.idea.GenIdea/idea
Mill version 0.11.7 is different than configured for this directory!
Configured version is 0.11.7-17-17dea9 (/home/hang/work/lx00lib/mill/.config/mill-version)
[1/1] mill.idea.GenIdea.idea
Analyzing modules ...
[1/1] mill.idea.GenIdea.idea > [5/38] millLastTag
1 targets failed
mill.idea.GenIdea.idea scala.MatchError: Vector() (of class scala.collection.immutable.Vector0$)
mill.idea.GenIdeaImpl.$anonfun$xmlFileLayout$100(GenIdeaImpl.scala:538)
scala.collection.immutable.List.map(List.scala:250)
scala.collection.immutable.List.map(List.scala:79)
mill.idea.GenIdeaImpl.xmlFileLayout(GenIdeaImpl.scala:512)
mill.idea.GenIdeaImpl.run(GenIdeaImpl.scala:38)

I also encountered this issue on the Ubuntu system running on my virtual machine, which cannot be resolved

from mill.

Amagicman avatar Amagicman commented on September 28, 2024

hang@vm:~/work/lx00lib/rocket-chip$ make verilog
cd /home/hang/work/lx00lib/rocket-chip && mill emulator[freechips.rocketchip.system.TestHarness,freechips.rocketchip.system.DefaultConfig].mfccompiler.compile
Compiling /home/hang/work/lx00lib/rocket-chip/build.sc
build.sc:588: not found: value Cross
trait JTAGDTMTest extends Cross.Module5[String, String, String, String, String] {
^
build.sc:462: not found: value Cross
trait ArchTest extends Cross.Module4[String, String, String, String] {
^
build.sc:434: not found: value Cross
trait RiscvTest extends Cross.Module4[String, String, String, String] {
^
build.sc:113: not found: value Cross
trait Emulator extends Cross.Module2[String, String] {
^
build.sc:68: not found: value millbuild
extends millbuild.common.RocketChipModule
^
build.sc:71: not found: value Cross
with Cross.Module[String] {
^
build.sc:56: not found: value millbuild
extends millbuild.cde.common.CDEModule
^
build.sc:36: not found: value millbuild

at the same time my mill's Cross cant work

from mill.

lefou avatar lefou commented on September 28, 2024

@Amagicman Your last comment looks totally unrelated. Please make sure your build.sc doesn't contain other errors. E.g. some mill resolve __.compile should provide all compile targets in your project, not an error.

from mill.

He-Pin avatar He-Pin commented on September 28, 2024

@lefou the twril part is commented out, you need turn it on to reproduce that issue.

from mill.

lefou avatar lefou commented on September 28, 2024

Still not reproducible.

> git diff
diff --git a/.mill-version b/.mill-version
index 2b96086..429ca70 100644
--- a/.mill-version
+++ b/.mill-version
@@ -1 +1 @@
- 0.11.7-107-9ec9bc
+0.11.7-107-9ec9bc
diff --git a/build.sc b/build.sc
index 397e947..c7daf5b 100644
--- a/build.sc
+++ b/build.sc
@@ -168,7 +168,7 @@ object example extends Module{
   object todoDb extends Cross[TodoDbModule](scala213) // uses quill, can't enable for Dotty yet
 
   trait TwirlModule extends millbuild.example.twirl.build.AppModule with LocalModule
-//  object twirl extends Cross[TwirlModule](scalaVersions)
+  object twirl extends Cross[TwirlModule](scalaVersions)
 
   trait VariableRoutesModule extends millbuild.example.variableRoutes.build.AppModule with LocalModule
   object variableRoutes extends Cross[VariableRoutesModule](scalaVersions)
> mill --version
Mill Build Tool version 0.11.7-107-9ec9bc
Java version: 17.0.10, vendor: Eclipse Adoptium, runtime: /opt/openjdk-bin-17.0.10_p7
Default locale: de_DE, platform encoding: UTF-8
OS name: "Linux", version: 6.1.74-gentoo-x86_64, arch: amd64

> mill -i mill.idea.GenIdea/idea
[1/1] mill.idea.GenIdea.idea 
Analyzing modules ...
[1/1] mill.idea.GenIdea.idea > [5/6] example.websockets4[3.3.3].test.sources 
Writing 501 IDEA project files to /home/lefou/work/tmp/cask/.idea ...

from mill.

He-Pin avatar He-Pin commented on September 28, 2024
PS C:\Users\hepin\IdeaProjects\cask> mill --meta-level 1 show runClasspath
Mill version 0.11.7 is different than configured for this directory!
Configured version is 0.11.7-109-59a5cb (C:\Users\hepin\IdeaProjects\cask\.mill-version)   
[build.sc] [1/1] show > [47/51] zincReportCachedProblems
[
  "qref:v1:53cf50f2:C:\\Users\\hepin\\AppData\\Local\\Coursier\\cache\\v1\\https\\repo1.maven.org\\maven2\\com\\lihaoyi\\os-lib_2.13\\0.8.1\\os-lib_2.13-0.8.1.jar",
  "qref:v1:565a2c8b:C:\\Users\\hepin\\AppData\\Local\\Coursier\\cache\\v1\\https\\repo1.mav
en.org\\maven2\\de\\tototec\\de.tobiasroeser.mill.vcs.version_mill0.11_2.13\\0.4.0\\de.tobiasroeser.mill.vcs.version_mill0.11_2.13-0.4.0.jar",
  "qref:v1:4f8f7ce9:C:\\Users\\hepin\\AppData\\Local\\Coursier\\cache\\v1\\https\\repo1.mav
en.org\\maven2\\com\\lihaoyi\\mill-contrib-twirllib_2.13\\0.11.7\\mill-contrib-twirllib_2.13-0.11.7.jar",
  "qref:v1:c9379904:C:\\Users\\hepin\\AppData\\Local\\Coursier\\cache\\v1\\https\\repo1.mav
en.org\\maven2\\com\\github\\lolgab\\mill-mima_mill0.11_2.13\\0.1.0\\mill-mima_mill0.11_2.13-0.1.0.jar",
  "qref:v1:7070eb2e:C:\\Users\\hepin\\AppData\\Local\\Coursier\\cache\\v1\\https\\repo1.mav
en.org\\maven2\\com\\lihaoyi\\mill-moduledefs_2.13\\0.10.9\\mill-moduledefs_2.13-0.10.9.jar",
  "qref:v1:1c857655:C:\\Users\\hepin\\AppData\\Local\\Coursier\\cache\\v1\\https\\repo1.maven.org\\maven2\\org\\scala-lang\\scala-library\\2.13.12\\scala-library-2.13.12.jar",       
  "qref:v1:2cd29d03:C:\\Users\\hepin\\AppData\\Local\\Coursier\\cache\\v1\\https\\repo1.maven.org\\maven2\\com\\lihaoyi\\geny_2.13\\0.7.1\\geny_2.13-0.7.1.jar",
  "qref:v1:c18cbcee:C:\\Users\\hepin\\AppData\\Local\\Coursier\\cache\\v1\\https\\repo1.mav
en.org\\maven2\\com\\github\\lolgab\\mill-mima-worker-api_2.13\\0.1.0\\mill-mima-worker-api_2.13-0.1.0.jar",
  "qref:v1:f5873f79:C:\\Users\\hepin\\AppData\\Local\\Coursier\\cache\\v1\\https\\repo1.maven.org\\maven2\\org\\scala-lang\\scala-compiler\\2.13.12\\scala-compiler-2.13.12.jar",     
  "qref:v1:4a8b347b:C:\\Users\\hepin\\AppData\\Local\\Coursier\\cache\\v1\\https\\repo1.maven.org\\maven2\\com\\lihaoyi\\sourcecode_2.13\\0.3.0\\sourcecode_2.13-0.3.0.jar",
  "qref:v1:2bc24408:C:\\Users\\hepin\\AppData\\Local\\Coursier\\cache\\v1\\https\\repo1.maven.org\\maven2\\org\\scala-lang\\scala-reflect\\2.13.12\\scala-reflect-2.13.12.jar",       
  "qref:v1:181ca472:C:\\Users\\hepin\\AppData\\Local\\Coursier\\cache\\v1\\https\\repo1.mav
en.org\\maven2\\io\\github\\java-diff-utils\\java-diff-utils\\4.12\\java-diff-utils-4.12.jar",
  "qref:v1:fa0f0f70:C:\\Users\\hepin\\AppData\\Local\\Coursier\\cache\\v1\\https\\repo1.maven.org\\maven2\\org\\jline\\jline\\3.22.0\\jline-3.22.0.jar",
  "qref:v1:5f26dd08:C:\\Users\\hepin\\AppData\\Local\\Coursier\\cache\\v1\\https\\repo1.maven.org\\maven2\\net\\java\\dev\\jna\\jna\\5.13.0\\jna-5.13.0.jar",
  "ref:v0:c984eca8:C:\\Users\\hepin\\IdeaProjects\\cask\\mill-build\\compile-resources",   
  "qref:v0:49e75042:C:\\Users\\hepin\\IdeaProjects\\cask\\out\\mill-launcher\\0.11.7.jar", 
  "qref:v1:9aac14a2:C:\\Users\\hepin\\AppData\\Local\\Coursier\\cache\\v1\\https\\repo1.mav
en.org\\maven2\\com\\lihaoyi\\mill-runner-linenumbers_2.13\\0.11.7\\mill-runner-linenumbers_2.13-0.11.7.jar",
  "qref:v1:f5873f79:C:\\Users\\hepin\\AppData\\Local\\Coursier\\cache\\v1\\https\\repo1.maven.org\\maven2\\org\\scala-lang\\scala-compiler\\2.13.12\\scala-compiler-2.13.12.jar",     
  "qref:v1:1c857655:C:\\Users\\hepin\\AppData\\Local\\Coursier\\cache\\v1\\https\\repo1.maven.org\\maven2\\org\\scala-lang\\scala-library\\2.13.12\\scala-library-2.13.12.jar",       
  "qref:v1:7070eb2e:C:\\Users\\hepin\\AppData\\Local\\Coursier\\cache\\v1\\https\\repo1.mav
en.org\\maven2\\com\\lihaoyi\\mill-moduledefs_2.13\\0.10.9\\mill-moduledefs_2.13-0.10.9.jar",
  "qref:v1:2bc24408:C:\\Users\\hepin\\AppData\\Local\\Coursier\\cache\\v1\\https\\repo1.maven.org\\maven2\\org\\scala-lang\\scala-reflect\\2.13.12\\scala-reflect-2.13.12.jar",       
  "qref:v1:181ca472:C:\\Users\\hepin\\AppData\\Local\\Coursier\\cache\\v1\\https\\repo1.mav
en.org\\maven2\\io\\github\\java-diff-utils\\java-diff-utils\\4.12\\java-diff-utils-4.12.jar",
  "qref:v1:fa0f0f70:C:\\Users\\hepin\\AppData\\Local\\Coursier\\cache\\v1\\https\\repo1.maven.org\\maven2\\org\\jline\\jline\\3.22.0\\jline-3.22.0.jar",
  "qref:v1:5f26dd08:C:\\Users\\hepin\\AppData\\Local\\Coursier\\cache\\v1\\https\\repo1.maven.org\\maven2\\net\\java\\dev\\jna\\jna\\5.13.0\\jna-5.13.0.jar",
  "qref:v1:4a8b347b:C:\\Users\\hepin\\AppData\\Local\\Coursier\\cache\\v1\\https\\repo1.maven.org\\maven2\\com\\lihaoyi\\sourcecode_2.13\\0.3.0\\sourcecode_2.13-0.3.0.jar",
  "ref:v0:5d44b286:C:\\Users\\hepin\\IdeaProjects\\cask\\out\\mill-build\\compile.dest\\classes"
]

@lefou run with mill --meta-level 1 show runClasspath

from mill.

lefou avatar lefou commented on September 28, 2024

I see an rather old os-lib in the classpath, which may collide with what Mill already provided. Also some duplicate java-diff-uitls, jline, jna and sourcecode jars. I don't expect those to be the cause, but it's probably worth to fix anyways.

from mill.

He-Pin avatar He-Pin commented on September 28, 2024
[1/1] mill.idea.GenIdea.idea > [10/14] example.twirl[2.12.19].compileTwirl
1 targets failed
mill.idea.GenIdea.idea scala.MatchError: Vector(Vector(ref:v0:c984eca8:C:\Users\hepin\IdeaProjects\cask\example\twirl\app\resources)) (of class scala.collection.immutable.Vector1)
    mill.idea.GenIdeaImpl.$anonfun$xmlFileLayout$101(GenIdeaImpl.scala:516)
    scala.collection.immutable.List.flatMap(List.scala:294)
    scala.collection.immutable.List.flatMap(List.scala:79)
    mill.idea.GenIdeaImpl.xmlFileLayout(GenIdeaImpl.scala:489)
    mill.idea.GenIdeaImpl.run(GenIdeaImpl.scala:37)

I tested it with the latest version 0.11.8, same error.

from mill.

He-Pin avatar He-Pin commented on September 28, 2024

@lefou I tried with WSL too, same problem.

from mill.

He-Pin avatar He-Pin commented on September 28, 2024

With mill 0.11.12

mill.idea.GenIdea.idea scala.MatchError: Vector(Vector(ref:v0:c984eca8:C:\Users\hepin\IdeaProjects\cask\example\twirl\app\resources)) (of class scala.collection.immutable.Vector1) 
    mill.idea.GenIdeaImpl.$anonfun$xmlFileLayout$97(GenIdeaImpl.scala:510)
    scala.collection.immutable.List.flatMap(List.scala:294)
    scala.collection.immutable.List.flatMap(List.scala:79)
    mill.idea.GenIdeaImpl.xmlFileLayout(GenIdeaImpl.scala:483)
    mill.idea.GenIdeaImpl.run(GenIdeaImpl.scala:39)
hepin@LAPTOP-057IVKOG:/mnt/c/Users/hepin/IdeaProjects/cask$ 

from mill.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.