Skip to content

Commit 2485d9f

Browse files
committed
fix: valma logging and pool bugs, text changes, toolset command bugs
Extracts perspire revelationPath&additionalRevelationPaths from revelationPaths
1 parent 29db164 commit 2485d9f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+137
-95
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
"publish-packages": "vlm publish-packages "
2828
},
2929
"devDependencies": {
30-
"@valos/toolset-revealer": ">0.33.0-prerelease",
31-
"@valos/toolset-vault": ">0.33.0-prerelease",
32-
"valma": ">0.33.0-prerelease"
30+
"@valos/toolset-revealer": ">0.34.0-prerelease",
31+
"@valos/toolset-vault": ">0.34.0-prerelease",
32+
"valma": ">0.34.0-prerelease"
3333
}
3434
}

packages/engine/debugId.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// @flow
22

33
import { getTransientTypeName } from "~/raem/state/Transient";
4-
import dumpify from "~/tools/dumpify";
54

5+
const dumpify = require("~/tools/dumpify").default;
66
const isSymbol = require("~/tools/isSymbol").default;
77

88
export default function debugId (object: any, options: any) {

packages/inspire/ui/Presentable.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import dumpify from "~/tools/dumpify";
21
import { unthunkRepeat } from "~/inspire/ui/thunk";
32

3+
const dumpify = require("~/tools/dumpify").default;
4+
45
// TODO(iridian): A lot of this content should be straight-up moved to UIComponent.
56

67
export const skipPresentation = {};

packages/prophet/FalseProphet/FalseProphetPartitionConnection.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ export default class FalseProphetPartitionConnection extends PartitionConnection
223223
(command, queueIndex) => {
224224
purgedCommands = this._unconfirmedCommands.splice(queueIndex);
225225
});
226-
_purgeAndRecomposeStories(this, purgedCommands, newCommands, "receiveCommand");
226+
_purgeAndRecomposeStories(this, purgedCommands, newCommands || [], "receiveCommand");
227227
return commands;
228228
} catch (error) {
229229
throw this.wrapErrorEvent(error, `receiveCommand([${

packages/prophet/Scribe/ScribePartitionConnection.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,15 +198,15 @@ export default class ScribePartitionConnection extends PartitionConnection {
198198
// currently in the truth log write queue have been written, or
199199
// undefined if there are no pending truth writes.
200200
_triggerTruthLogWrites (lastTruthCommandId?: any) {
201-
this._clampCommandQueueByTruthEvendIdEnd(lastTruthCommandId);
201+
this._clampCommandQueueByTruthEventIdEnd(lastTruthCommandId);
202202
if (!this._truthLogInfo.writeQueue.length) return undefined;
203203
if (this._truthLogInfo.writeProcess) {
204204
return this._truthLogInfo.writeProcess.then(() => this._truthLogInfo.writeProcess);
205205
}
206206
return _triggerEventQueueWrites(this, this._truthLogInfo, this._writeTruths.bind(this));
207207
}
208208

209-
_clampCommandQueueByTruthEvendIdEnd (lastTruthCommandId?: any) {
209+
_clampCommandQueueByTruthEventIdEnd (lastTruthCommandId?: any) {
210210
const deleteBegin = this._commandQueueInfo.eventIdBegin;
211211
if (!(deleteBegin < this._truthLogInfo.eventIdEnd)) return undefined;
212212
const commandIds = this._commandQueueInfo.commandIds;
@@ -223,12 +223,18 @@ export default class ScribePartitionConnection extends PartitionConnection {
223223
this._commandQueueInfo.eventIdBegin = this._commandQueueInfo.eventIdEnd =
224224
this._truthLogInfo.eventIdEnd;
225225
}
226+
const wrap = new Error(`_clampCommandQueueByTruthEventIdEnd(${lastTruthCommandId})`);
226227
return !deletedIds.length ? undefined : thenChainEagerly(
227228
_deleteCommands(this, deleteBegin, deleteBegin + deletedIds.length, deletedIds),
228229
commands => commands,
229230
error => {
230-
if (typeof error.conflictingCommandEventId !== "number") throw error;
231-
this._reloadCommandQueue(error.conflictingCommandEventId);
231+
if (typeof error.conflictingCommandEventId === "number") {
232+
return this._reloadCommandQueue(error.conflictingCommandEventId);
233+
}
234+
throw this.wrapErrorEvent(error, wrap,
235+
"\n\tdeleteBegin:", deleteBegin,
236+
"\n\tdeleteBegin + len:", deleteBegin + deletedIds.length,
237+
"\n\tdeletedIds:", deletedIds);
232238
});
233239
}
234240

packages/prophet/Scribe/_databaseOps.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export async function _initializeConnectionIndexedDB (connection: ScribePartitio
9292
connection._commandQueueInfo.commandIds = new Array(
9393
connection._commandQueueInfo.eventIdEnd - connection._commandQueueInfo.eventIdBegin);
9494
});
95-
connection._clampCommandQueueByTruthEvendIdEnd();
95+
connection._clampCommandQueueByTruthEventIdEnd();
9696
return this;
9797

9898
function _loadEventId (entries, direction: ?"prev", target, eventIdTargetFieldName) {

packages/raem/VALK/Kuery.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { vRef } from "~/raem/ValaaReference";
22
import type { VRef } from "~/raem/ValaaReference"; // eslint-disable-line no-duplicate-imports
33

44
import beaumpify from "~/tools/beaumpify";
5-
import dumpify from "~/tools/dumpify";
65
import inBrowser from "~/tools/inBrowser";
76
import invariantify, { invariantifyArray, invariantifyNumber, invariantifyString,
87
invariantifyObject } from "~/tools/invariantify";
@@ -11,6 +10,8 @@ import trivialClone from "~/tools/trivialClone";
1110

1211
import { isHostRef, tryHostRef } from "./hostReference";
1312

13+
const dumpify = require("~/tools/dumpify").default;
14+
1415
/**
1516
* VALK - VAlaa Language for Kuerying
1617
* ==================================

packages/raem/VALK/packedField.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ import ValaaReference from "~/raem/ValaaReference";
44

55
import type { FieldInfo } from "~/raem/state/FieldInfo";
66

7-
import dumpify from "~/tools/dumpify";
87
import { invariantifyString } from "~/tools/invariantify";
98

109
import { PackedHostValue, HostRef, tryHostRef } from "~/raem/VALK/hostReference";
1110

11+
const dumpify = require("~/tools/dumpify").default;
12+
1213
// PackedField is a packed, datatype for accessing reference fields lazily. Potentially expensive
1314
// operations like value elevations and sequence completions will only be performed when needed.
1415

packages/raem/redux/middleware/validateEvent.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import wrapError from "~/tools/wrapError";
2-
import dumpify from "~/tools/dumpify";
2+
3+
const dumpify = require("~/tools/dumpify").default;
34

45
export default function createValidateEventMiddleware (validators, defaultVersion: string,
56
fixedVersion?: string) {

packages/raem/tools/denormalized/collectFields.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import { tryObjectTransient } from "~/raem/state/getObjectTransient";
88
import { getTransientTypeName } from "~/raem/state/Transient";
99
1010
import wrapError from "~/tools/wrapError";
11-
import dumpify from "~/tools/dumpify";
11+
12+
const dumpify = require("~/tools/dumpify").default;
1213
*/
1314

1415
/**

0 commit comments

Comments
 (0)