Mill - 404 when Metals downloads, "no build target found"

I have a simple Mill setup and see no errors in it’s cli, yet Metals is failing to connect properly and showing the error no build target found for ..., noticeably alongside a 404 error

Downloading mill 0.12.14 from https://repo1.maven.org/maven2/com/lihaoyi/mill-dist/0.12.14/mill-dist-0.12.14.jar ..
curl: (22) The requested URL returned error: 404

structure

.
├── build.sc
├── foo
│   └── src
│       ├── main.scala

mill resolve __.run

foo.run
selective.run

build.sc

package build
import mill._, scalalib._, scalajslib._, publish._

object foo extends ScalaModule {
  def scalaVersion = "3.7.0"
}

metals output

Metals version: 1.5.3
Using coursier located at /opt/homebrew/bin/coursier
Searching for Java on PATH. Found java executable under /usr/bin/java that resolves to /usr/bin/java
Using Java Home: /opt/homebrew/Cellar/openjdk/23.0.2/libexec/openjdk.jdk/Contents/Home
INFO  logging to files /Users/john/projects/test1/.metals/metals.log
INFO  Started: Metals version 1.5.3 in folders '/Users/john/projects/test1' for client Visual Studio Code 1.100.2.
Initializing Scala Debugger
Release notes was not shown: not showing release notes since they've already been seen for your current version
INFO  Database: jdbc:h2:file:/Users/john/projects/test1/.metals/metals (H2 2.3)
INFO  Schema history table "PUBLIC"."flyway_schema_history" does not exist yet
INFO  Successfully validated 6 migrations (execution time 00:00.007s)
INFO  Creating Schema History table "PUBLIC"."flyway_schema_history" ...
INFO  Current version of schema "PUBLIC": << Empty Schema >>
INFO  Migrating schema "PUBLIC" to version "1 - Create tables"
INFO  Migrating schema "PUBLIC" to version "2 - Server discovery"
INFO  Migrating schema "PUBLIC" to version "3 - Jar symbols"
INFO  Migrating schema "PUBLIC" to version "4 - Fingerprints"
INFO  Migrating schema "PUBLIC" to version "5 - Jar type hierarchy"
INFO  Migrating schema "PUBLIC" to version "6 - Delete indices"
INFO  Successfully applied 6 migrations to schema "PUBLIC", now at version v6 (execution time 00:00.037s)
INFO  no build target found for /Users/john/projects/test1/build.sc. Using presentation compiler with project's scala-library version: 3.3.6
INFO  no build target found for /Users/john/projects/test1/build.sc. Using presentation compiler with project's scala-library version: 3.3.6
INFO  running '/Users/john/projects/test1/.metals/mill --import ivy:com.lihaoyi::mill-contrib-bloop: mill.contrib.bloop.Bloop/install'
INFO  No mill version specified.
INFO  You should provide a version via a '//| mill-version: ' comment or a '.mill-version' file.
INFO  Using mill version 0.12.14
INFO  Downloading mill 0.12.14 from https://repo1.maven.org/maven2/com/lihaoyi/mill-dist/0.12.14/mill-dist-0.12.14.jar ...
INFO  no build target found for /Users/john/projects/test1/build.sc. Using presentation compiler with project's scala-library version: 3.3.6
INFO    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
INFO                                   Dload  Upload   Total   Spent    Left  Speed
INFO  
INFO    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
INFO    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
INFO    0   554    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
INFO  curl: (22) The requested URL returned error: 404
INFO  time: ran 'mill bloopInstall' in 1.16s
ERROR Mill command failed: /Users/john/projects/test1/.metals/mill --import ivy:com.lihaoyi::mill-contrib-bloop: mill.contrib.bloop.Bloop/install
INFO  no build target found for /Users/john/projects/test1/build.sc. Using presentation compiler with project's scala-library version: 3.3.6

I’ve tried mill clean + Metals: Clear caches and reimport project already.

Seems like the 0.12.11 is the last version that published mill-dist-<version>.jar It can be found for this version Central Repository: com/lihaoyi/mill-dist/0.12.11
but not for the next release Central Repository: com/lihaoyi/mill-dist/0.12.13

Seems like an issue on the mill side for breaking the compatibility (published artifacts) between patch version.

It can be found however in milestone release for 0.13 Central Repository: com/lihaoyi/mill-dist/0.13.0-M2 so maybe that’s issue in the release process of mill?

I think it was handled just right now on the metals side, should work with the latest snapshot release

Here’s guide how to use snapshot version of metals

Alternatively, you can install mill locally and put the location into metals.millScript seting.