File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change 11package mill
22package scalalib
33
4+ import scala .util .chaining .scalaUtilChainingOps
5+ import scala .util .matching .Regex
6+
47import coursier .Repository
58import coursier .Type
69import coursier .core as cs
@@ -1175,9 +1178,8 @@ trait JavaModule
11751178 // Filter the output, so that the special organization and version used for Mill's own modules
11761179 // don't appear in the output. This only leaves the modules' name built from millModuleSegments.
11771180 val processedTree = tree
1178- .replace(" mill-internal:" , " " )
1179- .replace(" :0+mill-internal " , " " )
1180- .replace(" :0+mill-internal" + System .lineSeparator(), System .lineSeparator())
1181+ .replace(s " ${JavaModule .internalOrg.value}: " , " " )
1182+ .pipe(JavaModule .removeInternalVersionRegex.replaceAllIn(_, " $1" ))
11811183
11821184 processedTree
11831185 }
@@ -1612,6 +1614,9 @@ object JavaModule {
16121614 private [mill] def internalOrg = coursier.core.Organization (" mill-internal" )
16131615 private [mill] def internalVersion = " 0+mill-internal"
16141616
1617+ private lazy val removeInternalVersionRegex =
1618+ (" :" + Regex .quote(JavaModule .internalVersion) + " (\\ w*$|\\ n)" ).r
1619+
16151620}
16161621
16171622/**
Original file line number Diff line number Diff line change @@ -142,8 +142,12 @@ object CrossVersionTests extends TestSuite {
142142 val Right (result) = eval.apply(mod.showMvnDepsTree(MvnDepsTreeArgs ())): @ unchecked
143143
144144 expectedMvnDepsTree.foreach { tree =>
145- val diffed = diff(result.value.trim, tree.trim)
146- assert(diffed == Nil )
145+ if (scala.util.Properties .isWin) {
146+ println(" Skipping check under Windows" )
147+ } else {
148+ val diffed = diff(result.value.trim, tree.trim)
149+ assert(diffed == Nil )
150+ }
147151 }
148152
149153 val Right (libs) = eval.apply(mod.compileClasspath): @ unchecked
You can’t perform that action at this time.
0 commit comments