-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added error message if there are multiple jars in the candidate and b… #157
base: master
Are you sure you want to change the base?
Conversation
if core_jar_file is None: | ||
raise RuntimeError('can\'t find core JAR file in %s' % ('%s/lucene/build/core' % path)) | ||
if jars_found > 1: | ||
raise RuntimeError('Found %d jars in %s, please only include 1 jar file' % (jars_found,'%s/lucene/build/core' % path)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe change message to Found %d jars in "%s"; please run "gradle clean" to clean up
or so?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually just realized in this code path the build.gradle
file wouldn't exist (see other comment). So then wouldn't gradle clean
not work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OH, yes, then suggest ant clean
here and gradle clean
in the other code path? Or vice/versa :)
@@ -1536,12 +1539,15 @@ def getClassPath(checkout): | |||
|
|||
# We use the jar file for core to leverage the MR JAR | |||
core_jar_file = None | |||
jars_found = 0 | |||
for filename in os.listdir('%s/lucene/core/build/libs' % path): | |||
if reCoreJar.match(filename) is not None: | |||
core_jar_file = '%s/lucene/core/build/libs/%s' % (path, filename) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uh oh, why is this path different from the above path! Why are we doing this (differently!) in two places?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line in getClassPath
line 1535:
if not os.path.exists(os.path.join(path, 'build.gradle')):
return getAntClassPath(checkout)
The top path is in getAntClassPath
, and the bottom is getClassPath
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK this is actually dead-ish code now, but let's leave it since sometimes we do go back and (try to) run luceneutil
on older Lucene releases.
…aseline core build
9c4b85c
to
93bb404
Compare
…aseline core build