Skip to content

Commit ee8e0d6

Browse files
authored
Doc review (#5431)
1 parent 00ddc31 commit ee8e0d6

File tree

12 files changed

+194
-109
lines changed

12 files changed

+194
-109
lines changed

changelog.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ _2025-05-10_
489489

490490
* fix: Use root qualifier in Discover macro ({link-pr}/5055[#5055])
491491
* Fix selective execution when multiple changes are made to one module under `--watch` ({link-pr}/5032[#5032])
492-
* Add ability to define `package` `ExternalModule`s that can be calle via just `pkg.path/` rather than `pkg.path.ObjectName/` ({link-pr}/4920[#4920])
492+
* Add ability to define `package` ``ExternalModule``s that can be calle via just `pkg.path/` rather than `pkg.path.ObjectName/` ({link-pr}/4920[#4920])
493493
* Backport `javascriptlib` and `pythonlib` improvements from `main` branch ({link-pr}/4893[#4893])
494494
* Fix wildcard and type selector query bugs ({link-pr}/4862[#4862])
495495
* Lots of Mill `main` branch compatibility changes, adding the new name and deprecating the old one
@@ -1418,7 +1418,7 @@ __New features__
14181418
__Fixes and Improvements__
14191419

14201420
* Better detect Windows Subsystem for Linux environments {link-pr}/2901[#2901]
1421-
* Avoid evaluating `Task.Input`s twice {link-pr}/2952[#2952]
1421+
* Avoid evaluating ``Task.Input``s twice {link-pr}/2952[#2952]
14221422
* Deduplicate (anonymous) tasks in results {link-pr}/2959[#2959]
14231423
* Synchronize `evaluateGroupCached` to avoid concurrent access to cache {link-pr}/2980[#2980]
14241424
* Properly sanitize Windows reserved names and symbols in evaluator paths {link-pr}/2964[#2964], {link-pr}/2965[#2965]
@@ -2450,7 +2450,7 @@ The API is suspected to change before a 0.10.0 releae.*
24502450

24512451
_Changes since {prev-version}:_
24522452

2453-
* `ScalaModule with PublishModule`: the `scala-library` artifact is now always part of the dependencies in published `pom.xml`s and `ivy.xml`s
2453+
* `ScalaModule with PublishModule`: the `scala-library` artifact is now always part of the dependencies in published ``pom.xml``s and `ivy.xml`s
24542454
* New `JavaModule.mandatoryMvnDeps` target to provide essential dependencies like scala-library without forcing the user to call `super.mvnDeps`
24552455
* `ScalaJSModule.scalaLibraryMvnDeps` no longer contains the scala-js-library, but only the scala-library; if you need that, use `ScalaJSModule.mandatoryMvnDeps` instead.
24562456
* `import $ivy` support `$MILL_BIN_PLATFORM` variable and a new sort notations for external plugins
@@ -3280,7 +3280,7 @@ _2018-03-04_
32803280

32813281
* Speed up Mill client initialization by another 50-100ms
32823282

3283-
* Speed up incremental `assembly`s in the common case where upstream dependencies do not change.
3283+
* Speed up incremental ``assembly``s in the common case where upstream dependencies do not change.
32843284

32853285
* Make `ScalaJSModule#run` work with main-method discovery
32863286

example/depth/sandbox/1-task/build.mill

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
// In order to help manage your build, Mill performs some rudimentary filesystem
2-
// sandboxing to keep different tasks and modules from interfering with each other.
3-
// This tries to ensure your tasks only read and write from their designated `.dest/`
4-
// folders, which are unique to each task and thus guaranteed not to collide with
5-
// the filesystem operations of other tasks that may be occurring in parallel.
6-
//
7-
//
81
// === `Task.dest`
92
// The standard way of working with a task's `.dest/` folder is through the `Task.dest`
103
// property. This is available within any task, and gives you access to the
@@ -24,11 +17,14 @@ object foo extends Module {
2417
.../out/foo/tDestTask.dest
2518
*/
2619

20+
// If you really need to reference paths outside of the `Task.dest`, you can do
21+
// so via `BuildCtx.workspaceRoot`.
22+
2723
// === Filesystem Read/Write Checks
2824
//
2925
// Mill enforces limits on what you can read and write while a task is executing.
3026
// In general, a task may only write to its own `Task.dest` folder, and may only
31-
// read from the `PathRef`s provided to it from upstream tasks
27+
// read from the ``PathRef``s provided to it from upstream tasks
3228

3329
def bannedWriteTask = Task {
3430
os.write(BuildCtx.workspaceRoot / "banned-path", "hello")
@@ -63,9 +59,9 @@ error: ...Reading from out/foo/tDestTask.json not allowed during execution of `b
6359

6460
val listed = BuildCtx.watchValue(os.list(BuildCtx.workspaceRoot).map(_.last))
6561

66-
// === Disabling Task Sandboxing
62+
// === Bypassing Task Sandboxing
6763
//
68-
// You can disable Mill's filesystem read/write limitations via
64+
// You can bypass Mill's filesystem read/write limitations via
6965
// `BuildCtx.withFilesystemCheckerDisabled`. Note that this bypasses the
7066
// best-practices that Mill tries to enforce on your tasks and may result in strange
7167
// bugs around caching, parallelism, and invalidation, so you shouldn't do this unless

example/depth/sandbox/2-test/build.mill

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ object bar extends MyModule
6363
// one another, which helps keep tests stable and deterministic even when run in
6464
// parallel
6565
//
66-
// === Escaping the Test Sandbox
66+
// === Bypassing the Test Sandbox
6767

6868
// Within a test, you can use the `MILL_WORKSPACE_ROOT` environment variable
6969
// to access the workspace root directory:
@@ -89,9 +89,7 @@ object qux extends JavaModule {
8989
*/
9090

9191
//
92-
// === Disabling Test Sandboxing
93-
//
94-
// Test sandboxing can be disabled by setting `def testSandboxWorkingDir = false`
92+
// Test sandboxing can also be disabled by setting `def testSandboxWorkingDir = false`
9593
// on your test module, which makes your unit tests run in the root of your
9694
// project workspace, with full access to the project files on disk.
9795
//

example/extending/jvmcode/1-subprocess/build.mill

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//
55
// * `defaultResolver().classpath` to resolve the dependencies from Maven Central,
66
// converting `org:name:version` coordinates (and their transitive dependencies) to
7-
// `PathRef`s referring to files on disk
7+
// ``PathRef``s referring to files on disk
88
//
99
// * `Jvm.runSubprocess`, which runs the given classpath files in a subprocess, starting
1010
// from specified `mainClass`

runner/client/package.mill

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@ import mill.api.BuildCtx
1212
*/
1313
object `package` extends MillPublishJavaModule with BuildInfo {
1414
def buildInfoPackageName = "mill.client"
15-
def millJvmVersion = Task.Source(BuildCtx.workspaceRoot / ".mill-jvm-version")
1615

1716
def buildInfoMembers = Seq(
1817
BuildInfo.Value("millVersion", build.millVersion(), "Mill version."),
19-
BuildInfo.Value("defaultJvmId", os.read(millJvmVersion().path).trim())
18+
BuildInfo.Value("defaultJvmId", os.read(build.millJvmVersion().path).trim())
2019
)
2120

2221
def moduleDeps = Seq(build.core.constants)

0 commit comments

Comments
 (0)