Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .mill-version file #7

Merged
merged 1 commit into from
Mar 6, 2024
Merged

Add .mill-version file #7

merged 1 commit into from
Mar 6, 2024

Conversation

ngc7331
Copy link
Contributor

@ngc7331 ngc7331 commented Mar 6, 2024

Add .mill-version file to fix the mill version to 0.11.6.

Motivation:
When I try to run make verilog with the latest mill (0.11.7) (+openjdk11/17/19), the following error occurs:

$ make verilog
mkdir -p ./build
mill -i __.test.runMain Elaborate -td ./build
[build.sc] [49/53] compile 
[info] compiling 1 Scala source to /<REDACTED>/chisel-playground/out/mill-build/compile.dest/classes ...
[info] done compiling
[build.sc] [53/53] methodCodeHashSignatures 
Unknown argument: "-t"
Expected Signature: runMain
  --mainClass <str>
  args <str>...


make: *** [Makefile:11: verilog] Error 1

After drilling into the source code for mill and chisel, I'm guessing that the problem is caused by mill 0.11.7 changing the way it handles short arguments, treating -td as combined short arguments -t -d.

This was introduced by com-lihaoyi/mill/pull/2990, in which a mainargs module was updated from 0.5.4 to 0.6.1. This update included changes that allow short arguments and flags to be combined, refer to com-lihaoyi/mainargs/pull/102.

There are two temporary solutions to the problem, one is to replace -td with --target-dir in Makefile, and the other is to downgrade the mill to 0.11.6, which is the latest version without the problem.

In order to ensure the out-of-the-box nature of this repository, and to avoid similar issues of being broken by tool version updates in the future, I think adding a .mill-version file is a good idea, and thus issue this PR.

@sashimi-yzh sashimi-yzh merged commit ea2a535 into OSCPU:master Mar 6, 2024
1 check failed
sashimi-yzh added a commit that referenced this pull request Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants