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

Mill is stuck on windows with no output #646

Closed
ColOfAbRiX opened this issue Jul 3, 2019 · 7 comments
Closed

Mill is stuck on windows with no output #646

ColOfAbRiX opened this issue Jul 3, 2019 · 7 comments
Milestone

Comments

@ColOfAbRiX
Copy link

ColOfAbRiX commented Jul 3, 2019

I've just downloaded the latest version 0.4.2 of mill on my Windows 10 machine. I followed the instructions to run it but there is no visual output and it seems stuck, no visual output, no interaction, nothing, just a blinking screen. Expectated result: any form of output, a version number, an error.

To troubleshoot I checked what command is run and I tried to run directly:

java -DMILL_CLASSPATH=mill-0.4.2 -DMILL_VERSION=0.4.2 -Djna.nosys=true -cp mill-0.4.2 mill.main.client.MillClientMain

but the result is the same, all stuck.

I performed these tests:

  • Windows 10, java version Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)
  • Cygwin, same java executable as above
  • Windows Subsystem for linux, java version Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)

All with the same result, no output, program stuck

As additional test I also tried to run an older version and I picked randomly version 0.3.3 but same result

@lefou
Copy link
Member

lefou commented Jul 3, 2019

Can you please test with the additional -i option and report the result?

mill -i your.target

@ColOfAbRiX
Copy link
Author

I'm now getting inconsistent behaviour. lt started to work on WSL using -i, then it started to work under windows without -i and it now works on Cygwin too, using -i.

The documentation says to use the -i option on WSL but doesn't say the criterias when the flag is useful. A clarification would be useful.

My ultimate goal is to use it from VSCode through the metals plugins and there still doesn't work, no output and endless waiting. Is there any form of log I can enable or check?

@krotton
Copy link
Contributor

krotton commented Jan 9, 2020

I can confirm the same happens in 0.5.7 under WSL 1. It seems to be related to using exec in the launch script, as seemingly the WSL's implementation of exec is buggy. Under WSL 2 (where exec uses a native Linux kernel call) it works without any issues.

Anyway, calling with -i seems to actually fix it, so maybe that's worth including in some doc.

@lefou
Copy link
Member

lefou commented Jan 9, 2020

@krotton Thanks for the feedback.

@ColOfAbRiX I guess, you have to open an issue in the metals plugin project or ask in their support channel if you need help with that issue.

@lefou
Copy link
Member

lefou commented Mar 2, 2020

Related: #781

@sake92
Copy link
Contributor

sake92 commented Apr 14, 2020

@ColOfAbRiX @krotton can you try with latest Mill? E.g. "0.6.1-121-3f10a4-assembly"
Note that pipe still complains with "Failed to connect to server" on end..

lefou added a commit that referenced this issue Feb 6, 2021
Various fixes only shown on Windows, probably also elsewhere.

* Fixed string stream writer/reader used for mill client-server communication, by using an explicit charset for byte conversion
* Avoid `java.nio.file.Paths.get(url.getFile())` in favour of `java.nio.file.Paths.get(url.toURI())` as the latter handles windows paths with leading drive letters well
* Improved CI setup for Windows
* Better run/spawn of Java sub-processes by selecting the same Java executable which is used by mill

We still have some CI failures on Windows, as we need some of these fixed in mill before we can benefit from it. Expect more PRs.

Probably related issues:
* #781
* #874
* #646
* #1098

Commits:

* CI: Added test on Windows

* Try a better handing of windows absolute paths
I hope to avoid a error like:
  Illegal char <:> at index 2: /D:/a/mill/mill/

* Improve string assertion message?

* More details in assertion error

* Use explicit charset for string-byte conversion

* Search java exe in same JAVA_HOME as mill is using

* CI: job deps

* check for Win

* Debug run java process

Pull request: #1146
@sake92
Copy link
Contributor

sake92 commented Aug 28, 2021

Works on Windows, WSL and in GitBash too now!
#1230

@lefou lefou closed this as completed Sep 27, 2021
@lefou lefou added this to the 0.9.6 milestone Sep 27, 2021
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

No branches or pull requests

4 participants