Fix #654 disable the remaining simplifiedTypeDef caching logic in mcdoc
Some checks failed
Deploy to GitHub Pages / build (push) Has been cancelled
Deploy to GitHub Pages / deploy (push) Has been cancelled

This commit is contained in:
Misode
2024-12-10 22:46:05 +01:00
parent 1860f86cb0
commit cc5b79b4e5

View File

@@ -1,5 +1,5 @@
diff --git a/node_modules/@spyglassmc/mcdoc/lib/runtime/checker/index.js b/node_modules/@spyglassmc/mcdoc/lib/runtime/checker/index.js diff --git a/node_modules/@spyglassmc/mcdoc/lib/runtime/checker/index.js b/node_modules/@spyglassmc/mcdoc/lib/runtime/checker/index.js
index 2d51735..70ac4a0 100644 index 2d51735..e37d8cc 100644
--- a/node_modules/@spyglassmc/mcdoc/lib/runtime/checker/index.js --- a/node_modules/@spyglassmc/mcdoc/lib/runtime/checker/index.js
+++ b/node_modules/@spyglassmc/mcdoc/lib/runtime/checker/index.js +++ b/node_modules/@spyglassmc/mcdoc/lib/runtime/checker/index.js
@@ -545,9 +545,9 @@ function simplifyReference(typeDef, context) { @@ -545,9 +545,9 @@ function simplifyReference(typeDef, context) {
@@ -42,3 +42,48 @@ index 2d51735..70ac4a0 100644
return simplifiedResult; return simplifiedResult;
} }
function simplifyDispatcher(typeDef, context) { function simplifyDispatcher(typeDef, context) {
@@ -604,23 +604,23 @@ function resolveIndices(parallelIndices, symbolMap, symbolQuery, context) {
let dynamicData = false;
let values = [];
function pushValue(key, data) {
- if (data.simplifiedTypeDef) {
- if (data.simplifiedTypeDef.kind === 'union') {
- values.push(...data.simplifiedTypeDef.members);
- }
- else {
- values.push(data.simplifiedTypeDef);
- }
- }
- else {
+ // if (data.simplifiedTypeDef) {
+ // if (data.simplifiedTypeDef.kind === 'union') {
+ // values.push(...data.simplifiedTypeDef.members);
+ // }
+ // else {
+ // values.push(data.simplifiedTypeDef);
+ // }
+ // }
+ // else {
const simplifiedResult = simplify(data.typeDef, context);
if (simplifiedResult.dynamicData) {
dynamicData = true;
}
else if (symbolQuery) {
- symbolQuery.member(key, s => s.amend({
- data: { data: { ...data, simplifiedTypeDef: simplifiedResult.typeDef } },
- }));
+ // symbolQuery.member(key, s => s.amend({
+ // data: { data: { ...data, simplifiedTypeDef: simplifiedResult.typeDef } },
+ // }));
}
if (simplifiedResult.typeDef.kind === 'union') {
values.push(...simplifiedResult.typeDef.members);
@@ -628,7 +628,7 @@ function resolveIndices(parallelIndices, symbolMap, symbolQuery, context) {
else {
values.push(simplifiedResult.typeDef);
}
- }
+ // }
}
let unkownTypeDef = false;
function getUnknownTypeDef() {