wave N+2: vfbuild16 fixes (aaj EF lambda copies in joinServer/loadThread/sendChat)
This commit is contained in:
parent
1434ba25c4
commit
1160e7f845
3 changed files with 190 additions and 9 deletions
54
build-logs/vfbuild16.log
Normal file
54
build-logs/vfbuild16.log
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
/storage/aboba/evovis-client/src/main/java/defpackage/aaj.java:1486: error: local variables referenced from a lambda expression must be final or effectively final
|
||||
var3.disconnectWithProgressScreen();
|
||||
^
|
||||
/storage/aboba/evovis-client/src/main/java/defpackage/aaj.java:1492: error: local variables referenced from a lambda expression must be final or effectively final
|
||||
var3,
|
||||
^
|
||||
/storage/aboba/evovis-client/src/main/java/defpackage/aaj.java:1493: error: local variables referenced from a lambda expression must be final or effectively final
|
||||
ServerAddress.parseString(var2),
|
||||
^
|
||||
/storage/aboba/evovis-client/src/main/java/defpackage/aaj.java:1494: error: local variables referenced from a lambda expression must be final or effectively final
|
||||
new ServerData(var1.username(), var2, Type.OTHER),
|
||||
^
|
||||
/storage/aboba/evovis-client/src/main/java/defpackage/aaj.java:1501: error: local variables referenced from a lambda expression must be final or effectively final
|
||||
if (var3.level != null) {
|
||||
^
|
||||
/storage/aboba/evovis-client/src/main/java/defpackage/aaj.java:1797: error: local variables referenced from a lambda expression must be final or effectively final
|
||||
if (!var1.equals(this.chatWith)) {
|
||||
^
|
||||
/storage/aboba/evovis-client/src/main/java/defpackage/aaj.java:1865: error: local variables referenced from a lambda expression must be final or effectively final
|
||||
this.chatPending.remove(var3);
|
||||
^
|
||||
/storage/aboba/evovis-client/src/main/java/defpackage/aaj.java:1876: error: local variables referenced from a lambda expression must be final or effectively final
|
||||
if (!var2.equals(this.chatWith)) {
|
||||
^
|
||||
/storage/aboba/evovis-client/src/main/java/defpackage/aaj.java:1884: error: local variables referenced from a lambda expression must be final or effectively final
|
||||
this.chatInput().setText(var1);
|
||||
^
|
||||
/storage/aboba/evovis-client/src/main/java/defpackage/aaj.java:1888: error: local variables referenced from a lambda expression must be final or effectively final
|
||||
this.chatMessages.add(new amw((boolean)(((1)) != 0), var1, var3.at()));
|
||||
^
|
||||
/storage/aboba/evovis-client/src/main/java/defpackage/aaj.java:1888: error: local variables referenced from a lambda expression must be final or effectively final
|
||||
this.chatMessages.add(new amw((boolean)(((1)) != 0), var1, var3.at()));
|
||||
^
|
||||
Note: Some input files use or override a deprecated API.
|
||||
Note: Recompile with -Xlint:deprecation for details.
|
||||
Note: Some input files use unchecked or unsafe operations.
|
||||
Note: Recompile with -Xlint:unchecked for details.
|
||||
11 errors
|
||||
|
||||
FAILURE: Build failed with an exception.
|
||||
|
||||
* What went wrong:
|
||||
Execution failed for task ':compileJava' (registered by plugin class 'org.gradle.api.plugins.JavaBasePlugin').
|
||||
> Compilation failed; see the compiler output below.
|
||||
/storage/aboba/evovis-client/src/main/java/defpackage/aaj.java:1486: error: local variables referenced from a lambda expression must be final or effectively final
|
||||
var3.disconnectWithProgressScreen();
|
||||
^
|
||||
11 errors
|
||||
|
||||
* Try:
|
||||
> Check your code and dependencies to fix the compilation error(s)
|
||||
> Run with --scan to get full insights from a Build Scan (powered by Develocity).
|
||||
|
||||
BUILD FAILED in 16s
|
||||
|
|
@ -1476,6 +1476,8 @@ public class aaj {
|
|||
while (true) {
|
||||
switch (var5) {
|
||||
case -542647713:
|
||||
final Minecraft var3f = var3;
|
||||
final String var2f = var2;
|
||||
var3.execute(
|
||||
() -> {
|
||||
int var3x = 1000740336;
|
||||
|
|
@ -1483,22 +1485,22 @@ public class aaj {
|
|||
while (true) {
|
||||
switch (var3x) {
|
||||
case -1581253811:
|
||||
var3.disconnectWithProgressScreen();
|
||||
var3f.disconnectWithProgressScreen();
|
||||
var3x = -356390454;
|
||||
break;
|
||||
case -356390454:
|
||||
ConnectScreen.startConnecting(
|
||||
new TitleScreen(),
|
||||
var3,
|
||||
ServerAddress.parseString(var2),
|
||||
new ServerData(var1.username(), var2, Type.OTHER),
|
||||
var3f,
|
||||
ServerAddress.parseString(var2f),
|
||||
new ServerData(var1.username(), var2f, Type.OTHER),
|
||||
(boolean)(((0)) != 0),
|
||||
null
|
||||
);
|
||||
return;
|
||||
case 1000740336:
|
||||
default:
|
||||
if (var3.level != null) {
|
||||
if (var3f.level != null) {
|
||||
var3x = -1581253811;
|
||||
} else {
|
||||
var3x = -356390454;
|
||||
|
|
@ -1769,6 +1771,7 @@ public class aaj {
|
|||
this.threadInFlight = (boolean)(((1)) != 0);
|
||||
this.lastChatPoll = System.currentTimeMillis();
|
||||
var1 = this.chatWith;
|
||||
final String var1f = var1;
|
||||
anb.thread(var1, var2x -> {
|
||||
int var3x = 926357645;
|
||||
|
||||
|
|
@ -1794,7 +1797,7 @@ public class aaj {
|
|||
case 926357645:
|
||||
default:
|
||||
this.threadInFlight = (boolean)(((0)) != 0);
|
||||
if (!var1.equals(this.chatWith)) {
|
||||
if (!var1f.equals(this.chatWith)) {
|
||||
var3x = -1567304631;
|
||||
} else {
|
||||
var3x = 1799372623;
|
||||
|
|
@ -1856,13 +1859,16 @@ public class aaj {
|
|||
var3 = new amw((boolean)(((1)) != 0), var1, System.currentTimeMillis());
|
||||
this.chatPending.add(var3);
|
||||
this.scrollToBottom = (boolean)(((1)) != 0);
|
||||
final String var1f = var1;
|
||||
final String var2f = var2;
|
||||
final amw var3f = var3;
|
||||
anb.sendMessage(var2, var1, var4x -> {
|
||||
int var5x = -549797788;
|
||||
|
||||
while (true) {
|
||||
switch (var5x) {
|
||||
case -710309231:
|
||||
this.chatPending.remove(var3);
|
||||
this.chatPending.remove(var3f);
|
||||
if (var4x == null) {
|
||||
var5x = 1278834584;
|
||||
} else {
|
||||
|
|
@ -1873,7 +1879,7 @@ public class aaj {
|
|||
return;
|
||||
case -549797788:
|
||||
default:
|
||||
if (!var2.equals(this.chatWith)) {
|
||||
if (!var2f.equals(this.chatWith)) {
|
||||
var5x = -559696162;
|
||||
} else {
|
||||
var5x = -710309231;
|
||||
|
|
@ -1885,7 +1891,7 @@ public class aaj {
|
|||
var5x = 1768563482;
|
||||
break;
|
||||
case 1278834584:
|
||||
this.chatMessages.add(new amw((boolean)(((1)) != 0), var1, var3.at()));
|
||||
this.chatMessages.add(new amw((boolean)(((1)) != 0), var1f, var3f.at()));
|
||||
this.scrollToBottom = (boolean)(((1)) != 0);
|
||||
this.loadThread();
|
||||
var5x = 1768563482;
|
||||
|
|
|
|||
121
tools/waves_n2.py
Normal file
121
tools/waves_n2.py
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
"""Волна N+2 поверх vfbuild16 (12 EF-ошибок в aaj.java). Запуск: python3 tools/waves_n2.py"""
|
||||
|
||||
import os, sys, collections
|
||||
|
||||
ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
JAVA = os.path.join(ROOT, "src/main/java")
|
||||
stats = collections.Counter()
|
||||
files = {}
|
||||
|
||||
|
||||
def get(rel):
|
||||
p = rel if os.path.isabs(rel) else os.path.join(JAVA, rel)
|
||||
if p not in files:
|
||||
files[p] = open(p, encoding="utf-8", errors="replace").read().splitlines()
|
||||
return files[p]
|
||||
|
||||
|
||||
def edit_line(rel, ln, old, new, tag="n"):
|
||||
L = get(rel)
|
||||
i = ln - 1
|
||||
if i >= len(L):
|
||||
stats[tag + "_MISS"] += 1
|
||||
print(f"MISS {rel}:{ln} (oob {len(L)})")
|
||||
return
|
||||
if old in L[i]:
|
||||
L[i] = L[i].replace(old, new, 1)
|
||||
stats[tag] += 1
|
||||
elif new in L[i]:
|
||||
stats[tag + "_skip"] += 1
|
||||
else:
|
||||
stats[tag + "_MISS"] += 1
|
||||
print(f"MISS {rel}:{ln}: {old!r}\n got: {L[i].strip()!r}")
|
||||
|
||||
|
||||
def insert_before(rel, ln, lines, tag="ins"):
|
||||
L = get(rel)
|
||||
i = ln - 1
|
||||
if lines[0] in L[max(0, i - 5) : i]:
|
||||
stats[tag + "_skip"] += 1
|
||||
return
|
||||
L[i:i] = lines
|
||||
stats[tag] += len(lines)
|
||||
|
||||
|
||||
A = "defpackage/aaj.java"
|
||||
|
||||
EDITS = [
|
||||
(A, 1888, ", var1, var3.at()));", ", var1f, var3f.at()));"),
|
||||
(
|
||||
A,
|
||||
1876,
|
||||
"if (!var2.equals(this.chatWith)) {",
|
||||
"if (!var2f.equals(this.chatWith)) {",
|
||||
),
|
||||
(A, 1865, "this.chatPending.remove(var3);", "this.chatPending.remove(var3f);"),
|
||||
(
|
||||
A,
|
||||
1797,
|
||||
"if (!var1.equals(this.chatWith)) {",
|
||||
"if (!var1f.equals(this.chatWith)) {",
|
||||
),
|
||||
(A, 1501, "if (var3.level != null) {", "if (var3f.level != null) {"),
|
||||
(
|
||||
A,
|
||||
1494,
|
||||
"new ServerData(var1.username(), var2, Type.OTHER),",
|
||||
"new ServerData(var1.username(), var2f, Type.OTHER),",
|
||||
),
|
||||
(A, 1493, "ServerAddress.parseString(var2),", "ServerAddress.parseString(var2f),"),
|
||||
(A, 1492, "var3,", "var3f,"),
|
||||
(
|
||||
A,
|
||||
1486,
|
||||
"var3.disconnectWithProgressScreen();",
|
||||
"var3f.disconnectWithProgressScreen();",
|
||||
),
|
||||
]
|
||||
|
||||
INSERTS = [
|
||||
(
|
||||
A,
|
||||
1859,
|
||||
[
|
||||
" final String var1f = var1;",
|
||||
" final String var2f = var2;",
|
||||
" final amw var3f = var3;",
|
||||
],
|
||||
),
|
||||
(A, 1772, [" final String var1f = var1;"]),
|
||||
(
|
||||
A,
|
||||
1479,
|
||||
[
|
||||
" final Minecraft var3f = var3;",
|
||||
" final String var2f = var2;",
|
||||
],
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
def main():
|
||||
rows = [("e", ln, a, b) for _, ln, a, b in EDITS] + [
|
||||
("i", ln, a, None) for _, ln, a in INSERTS
|
||||
]
|
||||
for kind, ln, a, b in sorted(rows, key=lambda r: -r[1]):
|
||||
if kind == "e":
|
||||
edit_line(A, ln, a, b)
|
||||
else:
|
||||
insert_before(A, ln, a)
|
||||
for p, L in files.items():
|
||||
with open(p, "w", encoding="utf-8") as f:
|
||||
f.write("\n".join(L) + "\n")
|
||||
print(dict(stats))
|
||||
miss = {k: v for k, v in stats.items() if "MISS" in k}
|
||||
if miss:
|
||||
print("PROBLEMS:", dict(miss))
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue