bazel-contrib / bazel-contrib/rules_jvm_external
LockFileConverter replaces "+" with space in version strings
- Dominant language
- Java
- Stars
- 373
- Forks
- 301
- Avg merge
- 6d 3h
- Merged PRs (30d)
- 5
Description
If I set up a dependency on a version like "2.0.17+15-d6f2c09b+20230921-1427-SNAPSHOT" (e.g. sbt tends to generate such versions for snapshots), then the coursier generated json (`coursier-deps.json`) contains:
```
"coord": "groupId:artifactId:2.0.17+15-d6f2c09b+20230921-1427-SNAPSHOT",
```
But `unsorted_deps.json` has:
```
"groupId:artifactId": {
"shasums": {
"jar": "f36e2210fa925792a6667f5c1a8515b3b7aa8d85fd0ffe20886cc6a4a40d9956",
"sources": "805cc867deb5952f97ba2076f14926eeff02599af4edd05f980c5395b656bcc8"
},
"version": "2.0.17 15-d6f2c09b 20230921-1427-SNAPSHOT"
},
```
This causes an issue when building my project:
```
Error in repository_rule: invalid repository name '@groupdId_artifactId_2_0_17 15_d6f2c09b 20230921_1427_SNAPSHOT': workspace names may contain only A-Z, a-z, 0-9, '-', '_' and '.'
```
So the "+" from the version gets replaced to " ", and it seems this is happening in LockFileConverter.
Contributor guide
Research direction
Start by reading LockFileConverter and reproducing the conversion with the version shown in the issue, comparing coursier-deps.json with unsorted_deps.json. Done means '+' remains valid in the version used for generated repository names and the reported build no longer fails.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100