[Space Lua] Load scripts without priority last during reload
The new null-aware ordering in `orderByCompare` changed the default placement of undefined values for descending sorts to `nulls first` (SQL standard). This caused Space Lua scripts without a `-- priority:` comment to load before the `Std` library scripts and breaking the boot sequence for user scripts ran before `schema`, `config`, `widget` and other core definitions were available. Add explicit `nulls: "last"` to the reload query so scripts without priority always load last, matching the documented behavior. Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>
This commit is contained in:
@@ -33,6 +33,7 @@ export class SpaceLuaEnvironment {
|
||||
orderBy: [{
|
||||
expr: parseExpressionString("script.priority"),
|
||||
desc: true,
|
||||
nulls: "last",
|
||||
}],
|
||||
} as LuaCollectionQuery,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user