question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Compiling with gradle produces an error

See original GitHub issue

Running python src/python/localrun.py -source wikimedium10k produces the following error for me:

Compile:
compile lucene:core...
    [RUN: ./gradlew lucene:core:jar, cwd=/.../lucene_bench_home/patch]
  /.../lucene_bench_home/patch/lucene/benchmark
Traceback (most recent call last):
  File "src/python/localrun.py", line 54, in <module>
    comp.benchmark("trunk_vs_patch")
  File "/.../lucene_bench_home/util/src/python/competition.py", line 389, in benchmark
    taskPatterns = (self.onlyTaskPatterns, self.notTaskPatterns), randomSeed = self.randomSeed)
  File "/.../lucene_bench_home/util/src/python/searchBench.py", line 46, in run
    r.compile(c)
  File "/.../lucene_bench_home/util/src/python/benchUtil.py", line 1017, in compile
    cp = self.classPathToString(self.getClassPath(competitor.checkout))
  File "/.../lucene_bench_home/util/src/python/benchUtil.py", line 935, in getClassPath
    return self.getAntClassPath(checkout)
  File "/.../lucene_bench_home/util/src/python/benchUtil.py", line 893, in getAntClassPath
    for filename in os.listdir('%s/lucene/build/core' % path):
OSError: [Errno 2] No such file or directory: '/.../lucene_bench_home/patch/lucene/build/core'

Commenting these lines in src/python/benchUtil.py seems to fix an error for me:

def getClassPath(self, checkout):
     path = checkoutToPath(checkout)
+    #if not os.path.exists(os.path.join(checkout, 'build.gradle')):
+    #  return self.getAntClassPath(checkout)

@msokolov I am wondering if you can suggest a proper way to fix this issue 🙏

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
mikemccandcommented, Jun 17, 2020

I think it was quite premature to change luceneutil to use the gradle build. Lets revert that, ehh?

I don’t think it is premature.

The primary purpose of luceneutil is to run correctly on Lucene’s master branch.

8.x (and prior releases) are nice to have.

But I do agree, it is a very strong nice to have for the current (8.x, now) stable branch.

So I think we should get both gradle (master) and ant (8.x) working now.

0reactions
msokolovcommented, Jun 19, 2020

@mayya-sharipova can we resolve this issue now?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gives compilation error but works fine in eclipse IDE - Help ...
I'm facing weird issue with Gradle 4.1, JDK 1.8.291 and Eclipse IDE. ... Gradle Java Plugin Issue - Gives compilation error but works...
Read more >
Gradle error when trying to compile an old project Android ...
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.) Re-download dependencies and sync project ( ...
Read more >
Question - Error when compiling unity at the build gradle project
First, make a blank project with a single blank scene and prove that it builds successfully. If it does NOT build, then go...
Read more >
Gradle with Java11 build produces intermittent compilation ...
https://stackoverflow.com/questions/70041411/gradle-with-java11-build-produces-intermittent-compilation-errors.
Read more >
Gradle compiles but vscode-java is getting compilation errors
gradle compileJava runs correctly, but vscode-java is getting me compilation errors. Environment. Operating System: Ubuntu 18.04; JDK version: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found