deps(java): bump gradle-wrapper from 9.2.1 to 9.3.1#15623
Conversation
Bumps gradle-wrapper from 9.2.1 to 9.3.0. --- updated-dependencies: - dependency-name: gradle-wrapper dependency-version: 9.3.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
|
I'll take a look at this. |
|
Something is wrong with test discovery. |
|
Can we somehow tell @dependabot to not touch the shell files gradlew, gradlew.bat)? |
|
I don't know but I don't think so. I also don't mind - there is a check that ensures those Lucene specific additions are there so it fails when they're not. |
|
Test discovery still doesn't work in 9.3.1. |
|
Did they say it's fixed? |
|
Yes. Not working for me though - benchmarks-jmh still shows no tests even though they're clearly there. I'll investigate when I have some time but I don't think it's our fault. |
|
I've left some comments on why it's not working on gradle's issue |
|
For now, I've implemented a custom TestFramework strategy which bypasses any class file parsing and just uses the set of files passed to it directly. |
| var cc = | ||
| ClassFile.of( | ||
| ClassFile.ConstantPoolSharingOption.NEW_POOL, | ||
| ClassFile.DebugElementsOption.DROP_DEBUG, | ||
| ClassFile.LineNumbersOption.DROP_LINE_NUMBERS, | ||
| ClassFile.StackMapsOption.DROP_STACK_MAPS); | ||
|
|
||
| try { | ||
| ClassModel parsed = cc.parse(testClassFile.getFile().toPath()); | ||
| String internalName = parsed.thisClass().asInternalName().replace('/', '.'); | ||
| testDefinitionProcessor.processTestDefinition(new ClassTestDefinition(internalName)); | ||
| } catch (Exception e) { | ||
| throw new RuntimeException(e); | ||
| } |
There was a problem hiding this comment.
Get fully qualified class name from a file. Perhaps it could be less fancy than actually parsing the file, don't know.
There was a problem hiding this comment.
It won't parse the full file. So should be fine.
| Path wrapperProperties = | ||
| destination.resolveSibling( | ||
| destination.getFileName().toString().replace(".jar", ".properties")); | ||
| if (!Files.exists(wrapperProperties)) { | ||
| throw new IOException("Wrapper property file not found: " + wrapperProperties); | ||
| } | ||
| String wrapperVersion = Files.readString(versionPath, StandardCharsets.UTF_8).trim(); | ||
|
|
||
| Pattern versionPattern = Pattern.compile("gradle-(?<version>.+?)-bin.zip"); | ||
| String wrapperVersion = | ||
| Files.readAllLines(wrapperProperties, StandardCharsets.UTF_8).stream() | ||
| .map( | ||
| line -> { | ||
| var matcher = versionPattern.matcher(line); | ||
| if (matcher.find()) { | ||
| return matcher.group("version"); | ||
| } else { | ||
| return null; | ||
| } | ||
| }) | ||
| .filter(Objects::nonNull) | ||
| .findAny() | ||
| .orElseThrow(); |
There was a problem hiding this comment.
Unrelated simplification - removed the duplication of gradle version and parse the property file instead.
|
Ok. All tests pass with this somewhat internal hack. I also updated perl files to fake user agent because http 403 errors on github jobs shown without it. |
|
|
||
| @Override | ||
| public boolean processTestClass(RelativeFile testClassFile) { | ||
| var cc = |
|
|
||
| try { | ||
| ClassModel parsed = cc.parse(testClassFile.getFile().toPath()); | ||
| String internalName = parsed.thisClass().asInternalName().replace('/', '.'); |
There was a problem hiding this comment.
This var should be named binaryNane. I stumbled on the same search/replace bullshit, but there's no way to get the binary name from an internal name with plain Java API. I worked around that in the JS compiler by never actually requiring it (only use ClassDesc) and load as anonymous class.
As far as I remember, there's an issue open to add a method in jdk...
There was a problem hiding this comment.
Yeah... I checked the test count in each project before and after this change and they align, so I don't think we miss anything. I agree this code isn't too elegant but it works fine (for us). We can remove it entirely if gradle's bug is fixed, eventually.
Bumps gradle-wrapper from 9.2.1 to 9.3.0.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)