dagger: `dagger run` does not work with Gradle
What is the issue?
Gradle does not work when run within a dagger run context.
Log output
Example. I have a simple application in a gradle module called playground. I can run the app easily with the following
$ ./gradlew playground:run -q --console=plain
hi
however, feed this through dagger run ./gradlew playground:run -q --console=plain and the process hangs indefinitely.
Adding a --debug does not offer a whole lot of insight
$ dagger run -s ./gradlew playground:run --debug --console=plain
Connected to engine b406cfb838a0
2023-06-04T14:00:30.865-0400 [INFO] [org.gradle.internal.nativeintegration.services.NativeServices] Initialized native services in: /Users/megame/.gradle/native
2023-06-04T14:00:30.890-0400 [INFO] [org.gradle.internal.nativeintegration.services.NativeServices] Initialized jansi services in: /Users/megame/.gradle/native
At this point, it just hangs indefinitely.
Steps to reproduce
This can be reproduced even without an associated project. Install Gradle (my version is 8.1.1) and run gradle tasks. Assuming you are in a directory with no gradle project, this operation will fail, but it will show some output. Do the same via dagger run -s gradle tasks --console=plain and you will see that even this command hangs.
SDK version
Dagger CLI 0.6.1
OS version
Confirmed on both MacOS Mojave and Ubuntu 22.04
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 1
- Comments: 16 (13 by maintainers)
Commits related to this issue
- fix: fix process hang when run with dagger run This issue discover in #5666, the Elixir got hang when running with `dagger run`. After debugging, the process hang somehow when using `SysProcAttr.Setp... — committed to wingyplus/dagger by wingyplus 10 months ago
- fix: fix process hang when run with dagger run This issue discover in #5666, the Elixir got hang when running with `dagger run`. After debugging, the process hang somehow when using `SysProcAttr.Setp... — committed to wingyplus/dagger by wingyplus 10 months ago
- fix: fix process hang when run with dagger run This issue discover in #5666, the Elixir got hang when running with `dagger run`. After debugging, the process hang somehow when using `SysProcAttr.Setp... — committed to TomChv/dagger by wingyplus 10 months ago
- fix: fix process hang when run with dagger run (#5712) This issue discover in #5666, the Elixir got hang when running with `dagger run`. After debugging, the process hang somehow when using `SysPro... — committed to dagger/dagger by wingyplus 9 months ago
- fix: fix process hang when run with dagger run (#5712) This issue discover in #5666, the Elixir got hang when running with `dagger run`. After debugging, the process hang somehow when using `SysProcA... — committed to schlapzz/dagger by wingyplus 9 months ago
- fix: fix process hang when run with dagger run (#5712) This issue discover in #5666, the Elixir got hang when running with `dagger run`. After debugging, the process hang somehow when using `SysProcA... — committed to schlapzz/dagger by wingyplus 9 months ago
- fix: fix process hang when run with dagger run (#5712) This issue discover in #5666, the Elixir got hang when running with `dagger run`. After debugging, the process hang somehow when using `SysPro... — committed to schlapzz/dagger by wingyplus 9 months ago
- fix: fix process hang when run with dagger run (#5712) This issue discover in #5666, the Elixir got hang when running with `dagger run`. After debugging, the process hang somehow when using `SysPro... — committed to schlapzz/dagger by wingyplus 9 months ago
- fix: fix process hang when run with dagger run (#5712) This issue discover in #5666, the Elixir got hang when running with `dagger run`. After debugging, the process hang somehow when using `SysPro... — committed to schlapzz/dagger by wingyplus 9 months ago
- fix: fix process hang when run with dagger run (#5712) This issue discover in #5666, the Elixir got hang when running with `dagger run`. After debugging, the process hang somehow when using `SysPro... — committed to schlapzz/dagger by wingyplus 9 months ago
I confirm that gradle works since #5712 has been merged:
My guess is that gradle needs some control over stdout/stderr/stdin \cc @vito.
I reproduced it, even with an error (i.e., on it’s own the usage error from gradle reports I’m missing some tooling, so it fails early).