Skip to content

Commit

Permalink
Fix spelling errors (#3922)
Browse files Browse the repository at this point in the history
I noticed quite some spelling errors in the codebase, so I decided to
fix some of them by running spell-checker.

Co-authored-by: 0xnm <0xnm@users.noreply.github.com>
  • Loading branch information
0xnm and 0xnm authored Nov 9, 2024
1 parent 0c6186c commit 5e3b6bf
Show file tree
Hide file tree
Showing 99 changed files with 175 additions and 175 deletions.
2 changes: 1 addition & 1 deletion bsp/src/mill/bsp/BSP.scala
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ object BSP extends ExternalModule with CoursierModule {
/**
* This command only starts a BSP session, which means it injects the current evaluator into an already running BSP server.
* This command requires Mill to start with `--bsp` option.
* @param ev The Evaluator
* @param allBootstrapEvaluators The Evaluator
* @return The server result, indicating if mill should re-run this command or just exit.
*/
def startSession(allBootstrapEvaluators: Evaluator.AllBootstrapEvaluators)
Expand Down
2 changes: 1 addition & 1 deletion bsp/src/mill/bsp/BspServerHandle.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ trait BspServerHandle {

/**
* Runs a new session with the given evaluator. This one blocks until the session ends.
* @return The reason which the session ended, possibly indictating the wish for restart (e.g. in case of workspace reload).
* @return The reason which the session ended, possibly indicating the wish for restart (e.g. in case of workspace reload).
*/
def runSession(evaluators: Seq[Evaluator]): BspServerResult

Expand Down
2 changes: 1 addition & 1 deletion bsp/worker/src/mill/bsp/worker/BspTestReporter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import java.io.{PrintWriter, StringWriter}

/**
* Context class for BSP, specialized for sending `task-start` and
* `task-finish` notifications for every test being ran.
* `task-finish` notifications for every test being run.
*
* @param client The client to send notifications to
* @param targetId The targetId of the BSP target for which
Expand Down
6 changes: 3 additions & 3 deletions bsp/worker/src/mill/bsp/worker/MillBuildServer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ private class MillBuildServer(
protected var clientWantsSemanticDb = false
protected var clientIsIntelliJ = false

/** `true` when client and server support the `JvmCompileClasspathProvider`` request. */
/** `true` when client and server support the `JvmCompileClasspathProvider` request. */
protected var enableJvmCompileClasspathProvider = false

private[this] var statePromise: Promise[State] = Promise[State]()
Expand Down Expand Up @@ -349,10 +349,10 @@ private class MillBuildServer(

new DependencyModule(dep.dep.module.repr, dep.dep.version)
}
val unmanged = unmanagedClasspath.map { dep =>
val unmanaged = unmanagedClasspath.map { dep =>
new DependencyModule(s"unmanaged-${dep.path.last}", "")
}
new DependencyModulesItem(id, (deps ++ unmanged).iterator.toSeq.asJava)
new DependencyModulesItem(id, (deps ++ unmanaged).iterator.toSeq.asJava)
} {
new DependencyModulesResult(_)
}
Expand Down
2 changes: 1 addition & 1 deletion contrib/bloop/src/mill/contrib/bloop/BloopImpl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class BloopImpl(evs: () => Seq[Evaluator], wd: os.Path) extends ExternalModule {

/**
* Computes sources files paths for the whole project. Cached in a way
* that does not get invalidated upon sourcefile change. Mainly called
* that does not get invalidated upon source file change. Mainly called
* from module#sources in bloopInstall
*/
def moduleSourceMap = Task.Input {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ object DockerModuleTest extends TestSuite {

val testModuleSourcesPath: Path = os.Path(sys.env("MILL_TEST_RESOURCE_DIR")) / "docker"

val multineRegex = "\\R+".r
val multilineRegex = "\\R+".r

private def isInstalled(executable: String): Boolean = {
val getPathCmd = if (scala.util.Properties.isWin) "where" else "which"
Expand Down Expand Up @@ -91,14 +91,14 @@ object DockerModuleTest extends TestSuite {
test("dockerfile contents") {
test("default options") - UnitTester(Docker, null).scoped { eval =>
val Right(result) = eval(Docker.dockerDefault.dockerfile)
val expected = multineRegex.replaceAllIn(
val expected = multilineRegex.replaceAllIn(
"""
|FROM gcr.io/distroless/java:latest
|COPY out.jar /out.jar
|ENTRYPOINT ["java", "-jar", "/out.jar"]""".stripMargin,
sys.props.getOrElse("line.separator", ???)
)
val dockerfileStringRefined = multineRegex.replaceAllIn(
val dockerfileStringRefined = multilineRegex.replaceAllIn(
result.value,
sys.props.getOrElse("line.separator", ???)
)
Expand All @@ -107,7 +107,7 @@ object DockerModuleTest extends TestSuite {

test("all options") - UnitTester(Docker, null).scoped { eval =>
val Right(result) = eval(Docker.dockerAll.dockerfile)
val expected = multineRegex.replaceAllIn(
val expected = multilineRegex.replaceAllIn(
"""
|FROM docker.io/openjdk:11
|LABEL "version"="1.0"
Expand All @@ -123,7 +123,7 @@ object DockerModuleTest extends TestSuite {
|ENTRYPOINT ["java", "-jar", "/out.jar"]""".stripMargin,
sys.props.getOrElse("line.separator", ???)
)
val dockerfileStringRefined = multineRegex.replaceAllIn(
val dockerfileStringRefined = multilineRegex.replaceAllIn(
result.value,
sys.props.getOrElse("line.separator", ???)
)
Expand All @@ -132,14 +132,14 @@ object DockerModuleTest extends TestSuite {

test("extra jvm options") - UnitTester(Docker, null).scoped { eval =>
val Right(result) = eval(Docker.dockerJvmOptions.dockerfile)
val expected = multineRegex.replaceAllIn(
val expected = multilineRegex.replaceAllIn(
"""
|FROM gcr.io/distroless/java:latest
|COPY out.jar /out.jar
|ENTRYPOINT ["java", "-Xmx1024M", "-jar", "/out.jar"]""".stripMargin,
sys.props.getOrElse("line.separator", ???)
)
val dockerfileStringRefined = multineRegex.replaceAllIn(
val dockerfileStringRefined = multilineRegex.replaceAllIn(
result.value,
sys.props.getOrElse("line.separator", ???)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ object GitlabTokenLookup {
* - File =Contents of a file on local disk.
* - Custom = Own function
*
* Possible additions, that can now be supported with Custom: KeyVault, Yaml, etc..
* Possible additions, that can now be supported with Custom: KeyVault, Yaml, etc.
*/
sealed trait TokenSource
case class Env(name: String) extends TokenSource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ object GitlabModuleTests extends TestSuite {
}

// GitlabMavenRepository does not need to be a module, but it needs to be invoked from one.
// So for test purposes we make make a module with it to get a Ctx for evaluation
// So for test purposes we make a module with it to get a Ctx for evaluation
object GLMvnRepo extends TestBaseModule with GitlabMavenRepository {
override def gitlabRepository: GitlabPackageRepository =
InstanceRepository("https://gl.local")
Expand Down
2 changes: 1 addition & 1 deletion contrib/playlib/src/mill/playlib/Static.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ trait Static extends ScalaModule {
}

/**
* Resource base path of packaged assets (path they will appear in in the jar)
* Resource base path of packaged assets (path they will appear in the jar)
*/
def assetsPath = Task { "public" }

Expand Down
6 changes: 3 additions & 3 deletions contrib/proguard/src/mill/contrib/proguard/Proguard.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import os.{Path, Shellable}
/**
* Adds proguard capabilities when mixed-in to a module
*
* The target name is `proguard`. This runs proguard on the output jar of `asssembly`
* The target name is `proguard`. This runs proguard on the output jar of `assembly`
* and outputs a shrunk/obfuscated/optimized jar under `out.jar` in the `dest/` folder.
*
* Sensible defaults are provided, so no members require overriding..
* Sensible defaults are provided, so no members require overriding.
*/
trait Proguard extends ScalaModule {

Expand Down Expand Up @@ -49,7 +49,7 @@ trait Proguard extends ScalaModule {
* The path to JAVA_HOME.
*
* This is used for both the `java` command binary,
* as well as the standard library jars.
* and the standard library jars.
* Defaults to the `java.home` system property.
* Keep in sync with [[java9RtJar]]-
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ object TutorialTests extends TestSuite {
}

test("useExternalProtocCompiler") {
/* This ensure that the `scalaPBProtocPath` is properly used.
/* This ensures that the `scalaPBProtocPath` is properly used.
* As the given path is incorrect, the compilation should fail.
*/
test("calledWithWrongProtocFile") - UnitTester(TutorialWithProtoc, resourcePath).scoped {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import mill.util.Util.millProjectModule
* [[https://github.com/scoverage/scalac-scoverage-plugin scoverage compiler plugin]].
*
* To declare a module for which you want to generate coverage reports you can
* Extends the `mill.contrib.scoverage.ScoverageModule` trait when defining your
* extend the `mill.contrib.scoverage.ScoverageModule` trait when defining your
* Module. Additionally, you must define a submodule that extends the
* `ScoverageTests` trait that belongs to your instance of `ScoverageModule`.
*
Expand Down
2 changes: 1 addition & 1 deletion contrib/twirllib/src/mill/twirllib/TwirlWorker.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class TwirlWorker {
// NOTE: When creating the cl classloader with passing the current classloader as the parent:
// val cl = new URLClassLoader(twirlClasspath.map(_.toIO.toURI.toURL).toArray, getClass.getClassLoader)
// it is possible to cast the default to a Seq[String], construct our own Seq[String], and pass it to the method invoke -
// classe will be compatible (the tests passed).
// classes will be compatible (the tests passed).
// But when run in an actual mill project with this module enabled, there were exceptions like this:
// scala.reflect.internal.MissingRequirementError: object scala in compiler mirror not found.

Expand Down
4 changes: 2 additions & 2 deletions docs/modules/ROOT/pages/cli/flags.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ flags or options:
2. The JVM running the *task* e.g. `foo.run`, which may take flags e.g. `java -Xss10m -Xmx10G`.
These are configured using xref:javalib/module-config.adoc#_compilation_execution_flags[Compilation and Execution Flags]
3. The Mill build tool process, e.g. `./mill --jobs 10`. These can be passed direcctly after the
3. The Mill build tool process, e.g. `./mill --jobs 10`. These can be passed directly after the
`./mill` executable name, or set in a `.mill-opts` file as shown below in
xref:#_custom_mill_options[Custom mill options]
Expand Down Expand Up @@ -182,7 +182,7 @@ xref:javalib/module-config.adoc#_compilation_execution_flags[Compilation and Exe
== Running Mill with custom JVM options

It's possible to pass JVM options to the Mill launcher. To do this you can either set
the `JAVA_OPTS` environmentvariable, or create a `.mill-jvm-opts` file in your project's
the `JAVA_OPTS` environment variable, or create a `.mill-jvm-opts` file in your project's
root that contains JVM options one per line.

For example, if your build requires a lot of memory and bigger stack size, you could run
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/comparisons/gradle.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ $ ./mill clean; time ./mill compile

This benchmark indicates the use case of clean-compiling a single module. In this case,
the root module in `src/main/java/` containing the bulk of the Mockito library code,
_exluding_ the test code in `src/test/java/` and all the downstream subprojects in
_excluding_ the test code in `src/test/java/` and all the downstream subprojects in
`subprojects/`.

This benchmark gives us Mill being about ~3.7x faster than Gradle. This is in line with
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/comparisons/sbt.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ $ ./mill clean; time ./mill gatling-common.compile
```

This benchmark indicates the use case of clean-compiling a single module. In this case,
the `gatling-commons` module's application code in `commons/, _exluding_ the test code in
the `gatling-commons` module's application code in `commons/, _excluding_ the test code in
and all the downstream submodules.

=== Incremental Compile Single-Module
Expand Down
4 changes: 2 additions & 2 deletions docs/modules/ROOT/pages/comparisons/unique.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ and Python. These features are not as highly-scalable as their Bazel equivalents
they are provided in a lighter-weight, easier-to-use fashion suitable for organizations
with less than 1,000 engineers.

For most companies, their problems with Bazel aren't its scalability or featureset,
For most companies, their problems with Bazel aren't its scalability or feature set,
but its complexity. While Mill can never compete with Bazel for the largest-scale deployments
by its most sophisticated users, the bulk of users operate at a somewhat smaller scale and
need something easier than Bazel. Mill could be that easy monorepo build tool for them to use.
Expand All @@ -483,7 +483,7 @@ is small: most programming language rankings put it anywhere from 15-20th in ter
popularity (e.g. https://redmonk.com/sogrady/2024/09/12/language-rankings-6-24/[Redmonk June 2024]),
with 1-3% of market share (e.g. https://survey.stackoverflow.co/2024/technology/[StackOverflow 2024 Survey],
https://www.jetbrains.com/lp/devecosystem-2023/languages/[Jetbrains 2023 Survey]). Mill
at 5-10% marketshare as a Scala build tool is even smaller and more niche. But I think there
at 5-10% market share as a Scala build tool is even smaller and more niche. But I think there
is room to grow.

The current de-facto standard Scala build tool is SBT. SBT is improving over time, but it has a
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/depth/evaluation-model.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ a short-hand for configuring the meta-build living in `mill-build/build.mill`:
1. `.sc` and `import $file` are a shorthand for specifying the `.scala` files
living in `mill-build/src/`

2. `import $ivy` is a short-hand for configurin the `def ivyDeps` in
2. `import $ivy` is a short-hand for configuring the `def ivyDeps` in
`mill-build/build.mill`

Most builds would not need the flexibility of a meta-build's
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/extending/import-ivy-plugins.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ import $ivy.`com.lihaoyi:mill-contrib-bloop:`
--
to substitute the currently used Mill binary platform.

.Example: Using `mill-vcs-version` plugin matching the current Mill Binary Platfrom
.Example: Using `mill-vcs-version` plugin matching the current Mill Binary Platform
----
import $ivy.`de.tototec::de.tobiasroeser.mill.vcs.version_mill$MILL_BIN_PLATFORM:0.1.2`
----
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/extending/thirdparty-plugins.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ where you'd normally use the Mill `PublishModule` and then ensure you implement
everything that `PublishModule` requires.

Secondly, you'll need to ensure you have a few environment variables correctly
set in your GitHub repo. You can see detailed instuctions on which are
set in your GitHub repo. You can see detailed instructions on which are
necessary https://github.com/ckipp01/mill-ci-release#secrets[here].

Then in CI to publish you'll simply issue a single command:
Expand Down
4 changes: 2 additions & 2 deletions docs/modules/ROOT/pages/fundamentals/library-deps.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ivy"{organization}:{name}:{version}[;{attribute}={value}]*"
When working in other Java and Scala projects, you will find some synonyms, which typically all mean the same.

For example in the Maven ecosystem, the `organization` is called the `group` and the `name` is called the `artifact`.
The whole tripplet is ofthe called `GAV`.
The whole triplet is often called `GAV`.

In Mill we use the additional term `artifactId` which is identical to the `name` when used in the normal form shown above.
When a different form is used, e.g. some double-colons are used between the parts, the `artifactId` typically contains suffixes, but the name doesn't.
Expand Down Expand Up @@ -214,7 +214,7 @@ artifact is coming from using the `--whatDependsOn` argument:
----

By looking at the output we can see that it's our dependency on `coursier_2.13`
that is bringining in the `jsoniter-scala-core_2.13` artifact.
that is bringing in the `jsoniter-scala-core_2.13` artifact.

The `--whatDependsOn` argument can also be repeated to target multiple
artifacts at once. Just repeat the `--whatDependsOn <artifact>` pattern. Note
Expand Down
4 changes: 2 additions & 2 deletions docs/modules/ROOT/pages/fundamentals/query-syntax.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ That means, you can't filter based on the result type of a task.

On the Mill CLI you can also start a complete new task selector with the `+` sign.

There is a subtile difference between the expansion of <<enumerations,enumerations>>, <<wildcards,wildcards>> and <<type-filters,wildcards with type filters>> in contrast to the <<add-task-selector,start of a new selector with `+`>>.
There is a subtle difference between the expansion of <<enumerations,enumerations>>, <<wildcards,wildcards>> and <<type-filters,wildcards with type filters>> in contrast to the <<add-task-selector,start of a new selector with `+`>>.

For all the former versions, Mill parses them into a complex but single task selector path and subsequent parameters are used for all resolved tasks.

Expand All @@ -146,6 +146,6 @@ Whereas the `+` start a completely new selector path to which you can also provi

<1> Runs `foo.run` with the parameter `hello`
<2> Expands to `foo.run` and `bar.run` and runs both with the parameter `hello`.
<3> Selects the `run` command of all Java modules, but not test moudles, and runs them with the parameter `hello`.
<3> Selects the `run` command of all Java modules, but not test modules, and runs them with the parameter `hello`.
<4> Runs `fun.run` with the parameter `hello` and `bar.run` with the parameter `world`.

2 changes: 1 addition & 1 deletion docs/modules/ROOT/partials/Publishing_Footer.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ by passing in `--sonatypeUri example.company.com` instead.
Since Feb. 2021 any new Sonatype accounts have been created on
`s01.oss.sonatype.org`, so you'll want to ensure you set the relevant URIs to match.

The symptom of using the "wrong" URL for publishling is typically a 403 error code, in response to the publish request.
The symptom of using the "wrong" URL for publishing is typically a 403 error code, in response to the publish request.

See https://central.sonatype.org/publish/publish-guide/#releasing-to-central

Expand Down
8 changes: 4 additions & 4 deletions docs/package.mill
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ object `package` extends RootModule {
def supplementalFiles = T.source(millSourcePath / "supplemental-ui")

/**
* The doc root ready to be build by antora for the current branch.
* The doc root ready to be built by antora for the current branch.
*/
def devAntoraSources: T[PathRef] = Task {
val dest = T.dest
Expand Down Expand Up @@ -383,13 +383,13 @@ object `package` extends RootModule {
!l.contains("/example/") &&
!l.contains("/releases/download/") &&
// Ignore internal repo links in the changelog because there are a lot
// of them and they're not very interesting to check and verify.
// of them, and they're not very interesting to check and verify.
!l.contains("https://github.com/com-lihaoyi/mill/pull/") &&
!l.contains("https://github.com/com-lihaoyi/mill/milestone/") &&
!l.contains("https://github.com/com-lihaoyi/mill/compare/") &&
// Link meant for API configuration, not for clicking
!l.contains("https://s01.oss.sonatype.org/service/local") &&
// SOmehow this server doesn't respond properly to HEAD requests even though GET works
// Somehow this server doesn't respond properly to HEAD requests even though GET works
!l.contains("https://marketplace.visualstudio.com/items")
}
.toSet
Expand Down Expand Up @@ -433,7 +433,7 @@ object `package` extends RootModule {
// This is flaky due to rate limits so ignore it for now

// if (brokenRemoteLinks().nonEmpty){
// throw new Exception("Broken Rmote Links: " + upickle.default.write(brokenRemoteLinks(), indent = 2))
// throw new Exception("Broken Remote Links: " + upickle.default.write(brokenRemoteLinks(), indent = 2))
// }
}

Expand Down
2 changes: 1 addition & 1 deletion example/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ The three sub-folders are:
Within each sub-folder, examples are numbered in the order they are intended to
be read. Each example illustrates one key concept or technique, with the code
followed by a comment explaining it, and an `Example Usage` block showing how
the example can be used. By going through all of the examples, you should be
the example can be used. By going through all examples, you should be
able to learn everything that you need to be productive with the Mill build
tool.
4 changes: 2 additions & 2 deletions idea/src/mill/idea/GenIdeaImpl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ case class GenIdeaImpl(
) = evaluator.evalOrThrow(
exceptionFactory = r =>
GenIdeaException(
s"Could not evaluate sources/resouces of module `${mod}`: ${Evaluator.formatFailing(r)}"
s"Could not evaluate sources/resources of module `${mod}`: ${Evaluator.formatFailing(r)}"
)
)(Seq(
mod.resources,
Expand Down Expand Up @@ -755,7 +755,7 @@ case class GenIdeaImpl(
val relToHomeDir = Try(homeDir._2 + forward(path.relativeTo(homeDir._1)))

(relToProjectDir, relToHomeDir) match {
// We seem to be outside of project-dir but inside home dir, so use releative path to home dir
// We seem to be outside of project-dir but inside home dir, so use relative path to home dir
case (Success(p1), Success(p2)) if p1.contains("..") && !p2.contains("..") => p2
// default to project-dir-relative
case (Success(p), _) => p
Expand Down
Loading

0 comments on commit 5e3b6bf

Please sign in to comment.