com-lihaoyi / mill

Your shiny new Java/Scala build tool!

Home Page:https://mill-build.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Strange parsing exeception when using in-repo `./mill` script

lefou opened this issue · comments

Noticed it, while analyzing, why one of our Github Actions fail constantly.

> ./mill --import ivy:io.chris-kipp::mill-github-dependency-graph::0.2.6 resolve io.kipp.mill.github.dependency.graph.Graph/generate
[build.sc] [47/53] zincReportCachedProblems 
Parsing exception Position 1:14, found "=./mill"

It does not happen if I run it with just mill.

> mill --import ivy:io.chris-kipp::mill-github-dependency-graph::0.2.6  resolve io.kipp.mill.github.dependency.graph.Graph/generate
[1/1] resolve 
generate

It's also not happening when I use millw

> ./millw --import ivy:io.chris-kipp::mill-github-dependency-graph::0.2.6 resolve io.kipp.mill.github.dependency.graph.Graph/generate
[1/1] resolve 
generate

So, it must be something within our in-repo mill script.

There is probably some issue with the first arg detection. Maybe the --import is matched by the code that is supposed to match -i.

> sh -x ./mill --import ivy:io.chris-kipp::mill-github-dependency-graph::0.2.6  resolve io.kipp.mill.github.dependency.graph.Graph/generate
+ set -e
+ '[' -z '' ']'
+ DEFAULT_MILL_VERSION=0.11.6
+ '[' -z '' ']'
+ '[' -f .mill-version ']'
+ '[' -f .config/mill-version ']'
++ head -n 1 .config/mill-version
+ MILL_VERSION=0.11.6-61-710ac8
+ '[' x '!=' x ']'
+ MILL_DOWNLOAD_PATH=/home/lefou/.cache/mill/download
+ MILL_EXEC_PATH=/home/lefou/.cache/mill/download/0.11.6-61-710ac8
+ version_remainder=0.11.6-61-710ac8
+ MILL_MAJOR_VERSION=0
+ version_remainder=11.6-61-710ac8
+ MILL_MINOR_VERSION=11
+ version_remainder=6-61-710ac8
+ '[' '!' -s /home/lefou/.cache/mill/download/0.11.6-61-710ac8 ']'
+ '[' -z '' ']'
+ MILL_MAIN_CLI=./mill
+ MILL_FIRST_ARG=
+ '[' --import = --bsp ']'
+ '[' - '!=' --import ']'
+ MILL_FIRST_ARG=--import
+ shift
+ unset MILL_DOWNLOAD_PATH
+ unset MILL_VERSION
+ exec /home/lefou/.cache/mill/download/0.11.6-61-710ac8 --import -D mill.main.cli=./mill ivy:io.chris-kipp::mill-github-dependency-graph::0.2.6 resolve io.kipp.mill.github.dependency.graph.Graph/generate
[build.sc] [47/53] zincReportCachedProblems 
Parsing exception Position 1:14, found "=./mill"