Skip to content

Commit 2c98ca2

Browse files
committed
update mill.
1 parent a7b9d59 commit 2c98ca2

File tree

7 files changed

+27
-11
lines changed

7 files changed

+27
-11
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ jobs:
4242
uses: actions/cache@v2
4343
with:
4444
path: /home/runner/.cache/ms-playwright
45-
key: playwright-${{ runner.os }}-${{ hashFiles('playwrightVersion.sc') }}
45+
key: playwright-${{ runner.os }}-${{ hashFiles('playwrightVersion.mill') }}
4646
restore-keys: |
47-
playwright-${{ runner.os }}-${{ hashFiles('playwrightVersion.sc') }}
47+
playwright-${{ runner.os }}-${{ hashFiles('playwrightVersion.mill') }}
4848
4949
- name: formatCheck
5050
run: mill mill.scalalib.scalafmt.ScalafmtModule/checkFormatAll __.sources

.mill-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.11.8
1+
0.12.5

build.sc renamed to build.mill

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import java.text.Format
1414

1515
object V{
1616

17-
val http4sVersion = "0.23.27"
18-
val circeVersion = "0.14.9"
17+
val http4sVersion = "0.23.30"
18+
val circeVersion = "0.14.10"
1919
}
2020

2121
trait FormatFix extends ScalafmtModule with ScalafixModule with ScalaModule

justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jvmLinker:
3535
mill {{projectName}}.run --build-tool scala-cli --project-dir /Users/simon/Code/helloScalaJs --out-dir /Users/simon/Code/helloScalaJs/out --extra-build-args --js-cli-on-jvm --port 3007
3636

3737
serveMill:
38-
mill -j 0 {{projectName}}.run --build-tool mill --project-dir /Users/simon/Code/mill-full-stack/mill-full-stack \
38+
mill {{projectName}}.run --build-tool mill --project-dir /Users/simon/Code/mill-full-stack/mill-full-stack \
3939
--path-to-index-html /Users/simon/Code/mill-full-stack/mill-full-stack/frontend/ui \
4040
--out-dir /Users/simon/Code/mill-full-stack/mill-full-stack/out/frontend/fastLinkJS.dest \
4141
--log-level info \

playwrightVersion.mill

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package build
2+
3+
val pwV = "1.45.0"

playwrightVersion.sc

Lines changed: 0 additions & 1 deletion
This file was deleted.

sjsls/src/build.runner.scala

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,11 @@ def buildRunnerMill(
144144
// .background
145145
// .void
146146

147+
val linkCommand = s"$moduleName.fastLinkJS"
148+
147149
val millargs = List(
148150
"-w",
149-
s"$moduleName.fastLinkJS",
150-
"-j",
151-
"0"
151+
linkCommand
152152
) ++ extraBuildArgs
153153
// TODO pipe this to stdout so that we can see linker progress / errors.
154154
val builder = ProcessBuilder(
@@ -167,15 +167,29 @@ def buildRunnerMill(
167167
.through(text.utf8.decode)
168168
.debug()
169169
.chunks
170+
.sliding(2)
170171
.evalMap(
171172
aChunk =>
172-
if aChunk.head.exists(_.contains("BasicBackend: total modules:")) then
173+
174+
val chunk1 = aChunk(0).toString
175+
val chunk2 = aChunk(1).toString
176+
if chunk1.contains(s"= $linkCommand") && chunk2.contains("Watching for changes to ") then
173177
logger.trace("Detected that linking was successful, emitting refresh event") >>
174178
linkingTopic.publish1(())
175179
else
176180
logger.trace(s"$aChunk :: Linking unfinished") >>
177181
IO.unit
178182
end if
183+
184+
/** Doesn't work with new mill
185+
*/
186+
// if aChunk.head.exists(_.contains("BasicBackend: total modules:")) then
187+
// logger.trace("Detected that linking was successful, emitting refresh event") >>
188+
// linkingTopic.publish1(())
189+
// else
190+
// logger.trace(s"$aChunk :: Linking unfinished") >>
191+
// IO.unit
192+
// end if
179193
)
180194
.compile
181195
.drain

0 commit comments

Comments
 (0)