bazel-contrib / bazel-contrib/rules_jvm_external
Compile Line Length Limit hit under Windows
- Dominant language
- Java
- Stars
- 373
- Forks
- 301
- Avg merge
- 7d 17h
- Merged PRs (30d)
- 3
Description
### Description of the problem / feature request:
> I tried to compile the Java project on Windows 10, but because the project has too many dependencies, an error message is displayed during dependency parsing, indicating that command is longer than CreateProcessW's limit. My maven_install() defines nearly 500 dependencies.
### Feature requests: what underlying problem are you trying to solve with this feature?
>I see in the historical issue that this issue has been fixed in version 3.2. I use version 4.0, but this issue still occurs.
https://github.com/bazelbuild/rules_jvm_external/pull/360
### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
```bazel
# worspace
maven_install(
artifacts = [
"org.apache.zookeeper:zookeeper-jute:3.6.0",
"org.apache.zookeeper:zookeeper-jute:3.6.2",
"org.apache.zookeeper:zookeeper:3.6.2-h0.gdd.sop.r18",
"io.grpc:grpc-api:1.36.1",
...
# ....nearly 500 dependencies
]
)
```
### What operating system are you running Bazel on?
windows10
Bazel verison:4.0.0
rules_jvm_external version:4.0
> Replace this line with your answer.
### What's the output of `bazel info release`?
```
no such package '@maven//': Error while fetching artifact with coursier: java.io.IOException: ERROR:
src/main/native/windows/process.cc(165): CreateProcessWithExplicitHandles("D:\tools\javajdk\bin\java" -noverify -jar
C:/users/xxx/esyrauaw/external/maven/coursier fetch org.apache.zookeeper:zookeeper-jute:3.6.0
org.apache.zookeeper:zookeeper-jute:3.6.2 org.apache.zookeeper:zookeeper:3.6.2-h0.gdd.sop.r18 io.grpc:grpc-api:1.36.1
io.grpc:grpc-context:1.36.1 io.grpc:grpc-core:1.36.1 io.grpc:grpc-grpclb:1.36.1 io.grpc:grpc-netty:1.36.1 io.grpc:grpc-protobuf-
lite:1.36.1 io.grpc:grpc-protobuf:1.36.1 io.grpc:grpc-stub:1.36.1 org.quartz-scheduler.in(...)): command is longer than
CreateProcessW's limit (32767 characters)
```
Contributor guide
Research direction
Start with the maven_install() dependency-resolution path that invokes coursier, focusing on the Windows CreateProcessW command-length failure shown in the report. Reproduce with a large dependency list on Windows 10; done means the nearly 500 dependencies resolve without exceeding the 32,767-character process-command limit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100