Skip to content

Commit

Permalink
Fix forUtil.gradle to actually execute python script and also fix typ…
Browse files Browse the repository at this point in the history
…e error in script (#12411)
  • Loading branch information
uschindler committed Jul 3, 2023
1 parent 341d72e commit 8456a52
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
4 changes: 2 additions & 2 deletions gradle/generation/forUtil.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ configure(project(":lucene:core")) {
quietExec {
workingDir genDir
executable project.externalTool("python3")
args = []
args = [ '-B', genScript ]
}
}
}
Expand All @@ -59,7 +59,7 @@ configure(project(":lucene:backward-codecs")) {
quietExec {
workingDir genDir
executable project.externalTool("python3")
args = []
args = [ '-B', genScript ]
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"lucene/backward-codecs/src/java/org/apache/lucene/backward_codecs/lucene84/ForUtil.java": "e91aafa414018b34a39c8f0947ff58c1f1dde78d",
"lucene/backward-codecs/src/java/org/apache/lucene/backward_codecs/lucene84/gen_ForUtil.py": "285ed73b9763c541edaf40072667d68bd2537c56"
"lucene/backward-codecs/src/java/org/apache/lucene/backward_codecs/lucene84/gen_ForUtil.py": "7be3f1e17c9055d68a8ad6b0d6321481dcc4d711"
}
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ def writeRemainder(bpv, next_primitive, remaining_bits_per_long, o, num_values,
i = 0
remaining_bits = 0
tmp_idx = 0
for i in range(num_values):
for i in range(int(num_values)):
b = bpv
if remaining_bits == 0:
b -= remaining_bits_per_long
Expand Down
2 changes: 1 addition & 1 deletion lucene/core/src/generated/checksums/generateForUtil.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"lucene/core/src/java/org/apache/lucene/codecs/lucene90/ForUtil.java": "f2091e2b7284b70c740052a9b0ee389e67eb48a9",
"lucene/core/src/java/org/apache/lucene/codecs/lucene90/gen_ForUtil.py": "69b6fcb95fc127a5cd29a40e4454048f56570a26"
"lucene/core/src/java/org/apache/lucene/codecs/lucene90/gen_ForUtil.py": "7a137c58f88d68247be4368122780fa9cc8dce3e"
}
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,7 @@
}
for (int i = 0; i < numLongsPerShift; ++i) {
// Java longs are big endian and we want to read little endian longs, so we need to reverse
// bytes
long l = tmp[i];
out.writeLong(l);
out.writeLong(tmp[i]);
}
}
Expand Down Expand Up @@ -317,7 +314,7 @@ def writeRemainder(bpv, next_primitive, remaining_bits_per_long, o, num_values,
i = 0
remaining_bits = 0
tmp_idx = 0
for i in range(num_values):
for i in range(int(num_values)):
b = bpv
if remaining_bits == 0:
b -= remaining_bits_per_long
Expand Down

0 comments on commit 8456a52

Please sign in to comment.