diff --git a/dist/core/DataModel.d.ts.map b/dist/core/DataModel.d.ts.map index eb43da0..28b004c 100644 --- a/dist/core/DataModel.d.ts.map +++ b/dist/core/DataModel.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"DataModel.d.ts","sourceRoot":"","sources":["../../src/core/DataModel.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,KAAK,EAAkB,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACpG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAIxE,OAAO,KAAK,EAAE,OAAO,EAAmC,MAAM,+BAA+B,CAAC;AAU9F,OAAO,KAAK,EACV,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,SAAS,EACT,gBAAgB,EACjB,MAAM,mBAAmB,CAAC;AAW3B,YAAY,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC7D,YAAY,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,cAAc,EAAE,cAAc,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;AA6BvH,wBAAgB,aAAa,CAAC,IAAI,GAAE,oBAAyB;;2BAyRpD,MAAM,WACJ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,SACzB,OAAO,CAAC,UAAU,CAAC,aACf,YAAY,EAAE,KACxB,WAAW;6BAYL,MAAM,YACH,WAAW,SACd,OAAO,CAAC,UAAU,CAAC,aACf,YAAY,EAAE,KACxB,WAAW;4BAIiB,MAAM,UAAU,WAAW,SAAS,OAAO,CAAC,UAAU,CAAC,KAAG,WAAW;kCAwC/D,MAAM,UAAU,OAAO,SAAS,OAAO,CAAC,UAAU,CAAC,KAAG,WAAW;0BA7BzE,MAAM,UAAU,WAAW,SAAS,OAAO,CAAC,UAAU,CAAC,KAAG,WAAW;gCAwC/D,MAAM,UAAU,OAAO,SAAS,OAAO,CAAC,UAAU,CAAC,KAAG,WAAW;8B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AAM,CAAC,KAAG,CAAC;yBAsC9B,KAAK,KAAG,IAAI;2BAoBV,KAAK,WAAW,MAAM,IAAI,KAAG,IAAI;gBA2iDxC,IAAI;gBAQJ,IAAI;mBAQD,OAAO;mBAKP,OAAO;;CAsKmB,CAAC;AAErD,eAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/dist/core/DataModel.js b/dist/core/DataModel.js index 486f2ba..849f6c1 100644 --- a/dist/core/DataModel.js +++ b/dist/core/DataModel.js @@ -12,7 +12,7 @@ import { serializeBinarySldd } from '../datamodel/parser/BinarySlddSerializer.js // The name reductions and the expression reading, from the leaf modules that hold the // single copy of each. This file used to spell all three itself; the usage index needs // the same three, and a rule stated twice is a rule that drifts (see fileKinds). -import { basenameOf, isMatFile, isSlddFile, modelNameOf, projectNameOf, refBasename } from '../datamodel/fileKinds.js'; +import { basenameOf, isMatFile, isSlddFile, modelNameOf, projectFallbackName, refBasename } from '../datamodel/fileKinds.js'; import { identifiersIn } from '../datamodel/expressions.js'; import { blockKey, blockLabel, joinBlockPath } from '../datamodel/blockIdentity.js'; import { maskDefining } from '../datamodel/maskScope.js'; @@ -341,16 +341,23 @@ export function createSession(opts = {}) { } function addProjectSource(srcId, files, meta) { // srcId may be a full path or an opaque URI, so prefer meta.path when the host - // supplied one; either way the node is labelled with the basename, .prj included, - // because the tree shows a file. parseProject wants a project NAME rather than a - // filename for its fallback, hence the strip — note ProjectNode.fromParsed labels - // itself from the basename and never reads parsed.name, so the stripped form only - // shows up if a host calls parseProject itself. - // No `|| srcId` guard on the reduction: `basenameOf` returns the whole string when it - // finds no separator to cut at, so it is falsy only for input that was already empty — + // supplied one; either way the node is labelled with the basename, `.prj` or + // `matlab.toml` included, because the tree shows a file. parseProject wants a project + // NAME rather than a filename for its fallback, hence the reduction — note + // ProjectNode.fromParsed labels itself from the basename and never reads parsed.name, + // so the reduced form only shows up if a host calls parseProject itself. + // + // `projectFallbackName` over the whole PATH, not `projectNameOf` over the basename: + // the two agree on a `.prj`, and on a `matlab.toml` only the first one gets an answer + // worth showing. Every project in that format has a definition file of the same name, + // so stripping an extension titles all of them "matlab"; the rule that does not is the + // parent FOLDER's name, which needs the path and not the basename. + // No `|| srcId` guard on it: `basenameOf` returns the whole string when it finds no + // separator to cut at, so the basename is falsy only for input that was already empty — // in which case srcId is the empty string too and the fallback returned it unchanged. - const basename = basenameOf((meta && meta.path) || srcId); - const parsed = parseProject(files, projectNameOf(basename)); + const path = (meta && meta.path) || srcId; + const basename = basenameOf(path); + const parsed = parseProject(files, projectFallbackName(path)); const projectNode = ProjectNode.fromParsed(parsed, basename); return registerSource(srcId, projectNode, meta, parsed.warnings); } diff --git a/dist/core/DataModel.js.map b/dist/core/DataModel.js.map index be37eb2..3822a26 100644 --- a/dist/core/DataModel.js.map +++ b/dist/core/DataModel.js.map @@ -1 +1 @@ -{"version":3,"file":"DataModel.js","sourceRoot":"","sources":["../../src/core/DataModel.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,QAAQ,MAAM,yCAAyC,CAAC;AAC/D,OAAO,SAAS,MAAM,0CAA0C,CAAC;AACjE,OAAO,OAAO,MAAM,wCAAwC,CAAC;AAC7D,OAAO,WAAW,MAAM,4CAA4C,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAEhE,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AAClF,sFAAsF;AACtF,uFAAuF;AACvF,iFAAiF;AACjF,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,2BAA2B,C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AAe;QACf,cAAc;QACd,oBAAoB;QACpB,YAAY;QACZ,kBAAkB;QAClB,gBAAgB;QAChB,gBAAgB;QAChB,SAAS;QACT,aAAa;QACb,aAAa;QACb,gBAAgB;QAChB,kBAAkB;QAClB,eAAe;QACf,UAAU;QACV,gBAAgB;QAChB,cAAc;QACd,SAAS;QACT,cAAc;QACd,YAAY;QACZ,aAAa;QACb,aAAa;QACb,iBAAiB;QACjB,mBAAmB;QACnB,cAAc;QACd,cAAc;QACd,gBAAgB;QAChB,YAAY;QACZ,8EAA8E;QAC9E,6EAA6E;QAC7E,SAAS;QACT,QAAQ;QACR,+EAA+E;QAC/E,kFAAkF;QAClF,4EAA4E;QAC5E,2DAA2D;QAC3D,WAAW;QACX,UAAU;QACV,2BAA2B;QAC3B,wFAAwF;QACxF,sFAAsF;QACtF,wFAAwF;QACxF,MAAM;QACN,UAAU;QACV,QAAQ;QACR,YAAY;QACZ,QAAQ;QACR,wEAAwE;QACxE,gFAAgF;QAChF,qEAAqE;QACrE,QAAQ;QACR,UAAU;QACV,UAAU;QACV,cAAc;QACd,eAAe;QACf,kFAAkF;QAClF,kFAAkF;QAClF,oFAAoF;QACpF,+EAA+E;QAC/E,uCAAuC;QACvC,aAAa;QACb,YAAY;QACZ,cAAc;QACd,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,aAAa;QACtB,OAAO,EAAE,aAAa;QACtB,GAAG;KACJ,CAAC;IACF,OAAO,OAAO,CAAC;AACjB,CAAC;AAID,MAAM,SAAS,GAAG,aAAa,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,CAAC;AAErD,eAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/dist/core/ingest.d.ts.map b/dist/core/ingest.d.ts.map index df6adb5..349287b 100644 --- a/dist/core/ingest.d.ts.map +++ b/dist/core/ingest.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ingest.d.ts","sourceRoot":"","sources":["../../src/core/ingest.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEnE,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAExF,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;CAC5B;AAYD,wBAAgB,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,aAAa,GAAG,WAAW,CAqDjG"} \ No newline at end of file +{"version":3,"file":"ingest.d.ts","sourceRoot":"","sources":["../../src/core/ingest.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEnE,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAExF,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;CAC5B;AAYD,wBAAgB,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,aAAa,GAAG,WAAW,CA+EjG"} \ No newline at end of file diff --git a/dist/core/ingest.js b/dist/core/ingest.js index a3400c4..167819f 100644 --- a/dist/core/ingest.js +++ b/dist/core/ingest.js @@ -7,7 +7,7 @@ // in the Node-only `src/node/` subpath; this layer never touches the filesystem. import { strFromU8 } from 'fflate'; import { unzipEntries } from '../datamodel/parser/Inflate.js'; -import { basenameOf, extOf, isMatFile, isModelFile, isProjectFile, isSlddFile } from '../datamodel/fileKinds.js'; +import { basenameOf, extOf, isMatFile, isModelFile, isProjectFile, isSlddFile, isTomlProjectFile, TOML_PROJECT_FILE, } from '../datamodel/fileKinds.js'; import { readSlddContent } from '../datamodel/parser/SlddContent.js'; function toArrayBuffer(content) { if (content instanceof ArrayBuffer) @@ -60,6 +60,24 @@ export function ingest(session, content, opts) { if (isMatFile(filename)) { return session.addMatSource(id, requireBinary(content, ext), meta); } + // A `matlab.toml` project BEFORE the `.prj` branch, because the two arrive as + // different kinds of bytes entirely: a `.prj` is a zip whose entries are the store, + // and this is one TOML document that is the whole definition. `isProjectFile` is true + // for both (R2026b gave a project two spellings), so unzipping first would meet a + // text file and fail with "invalid zip data" on a project that is perfectly healthy. + if (isTomlProjectFile(filename)) { + // Bytes are decoded rather than refused: a host reading a file off disk hands over + // bytes without caring which of the five formats it just read, and this is the one + // project format whose content is text. An already-parsed object is the one shape + // this cannot take — there is no parsed form of a project the way there is of a + // dictionary — and `requireBinary` is what says so. + const text = typeof content === 'string' ? content : strFromU8(new Uint8Array(requireBinary(content, ext))); + // The definition map a project source takes, with its one entry under the name + // `parseProject` dispatches on. The key is the FILE NAME and not `filename`, which + // may be a whole path: either would dispatch (the match is by basename), but the + // part this names in a warning should be the file, not the host's path to it. + return session.addProjectSource(id, { [TOML_PROJECT_FILE]: text }, meta); + } if (isProjectFile(filename)) { const entries = unzipEntries(new Uint8Array(requireBinary(content, ext))); const files = {}; @@ -67,6 +85,10 @@ export function ingest(session, content, opts) { files[name] = strFromU8(bytesU8); return session.addProjectSource(id, files, meta); } - throw new Error(`ingest: unsupported extension "${ext}" for "${filename}" (expected .sldd/.slx/.mdl/.mat/.prj)`); + // The list names the four extensions AND the one file NAME, because a project is now + // identified either way (see isProjectFile) — and a list that reads as exhaustive while + // omitting one of the five things this function accepts is worse than no list. + throw new Error(`ingest: unsupported extension "${ext}" for "${filename}" ` + + `(expected .sldd/.slx/.mdl/.mat/.prj, or a file named ${TOML_PROJECT_FILE})`); } //# sourceMappingURL=ingest.js.map \ No newline at end of file diff --git a/dist/core/ingest.js.map b/dist/core/ingest.js.map index f73ce8e..f6242ad 100644 --- a/dist/core/ingest.js.map +++ b/dist/core/ingest.js.map @@ -1 +1 @@ -{"version":3,"file":"ingest.js","sourceRoot":"","sources":["../../src/core/ingest.ts"],"names":[],"mappings":"AAAA,qBAAqB;AACrB,qCAAqC;AACrC,EAAE;AACF,gFAAgF;AAChF,+EAA+E;AAC/E,gFAAgF;AAChF,iFAAiF;AAEjF,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACjH,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAYrE,SAAS,aAAa,CAAC,OAAiC;IACtD,IAAI,OAAO,YAAY,WAAW;QAAE,OAAO,OAAO,CAAC;IACnD,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAgB,CAAC;AAC1G,CAAC;AAED,SAAS,aAAa,CAAC,OAAsB,EAAE,GAAW;IACxD,IAAI,OAAO,YAAY,WAAW,IAAI,OAAO,YAAY,UAAU;QAAE,OAAO,aAAa,CAAC,OAAO,CAAC,CAAC;IACnG,MAAM,IAAI,KAAK,CAAC,YAAY,GAAG,8DAA8D,OAAO,OAAO,EAAE,CAAC,CAAC;AACjH,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,OAAgB,EAAE,OAAsB,EAAE,IAAmB;IAClF,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IAChC,MAAM,EAAE,GAAG,U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AAE,IAAI,CAAC,CAAC;IAC3E,CAAC;IAED,IAAI,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC5B,MAAM,OAAO,GAAG,YAAY,CAAC,IAAI,UAAU,CAAC,aAAa,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;QAC1E,MAAM,KAAK,GAA2B,EAAE,CAAC;QACzC,KAAK,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC;YAAE,KAAK,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;QACxF,OAAO,OAAO,CAAC,gBAAgB,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IACnD,CAAC;IAED,qFAAqF;IACrF,wFAAwF;IACxF,+EAA+E;IAC/E,MAAM,IAAI,KAAK,CACb,kCAAkC,GAAG,UAAU,QAAQ,IAAI;QACzD,wDAAwD,iBAAiB,GAAG,CAC/E,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/dist/datamodel/fileKinds.d.ts b/dist/datamodel/fileKinds.d.ts index c82c3d6..dbfd944 100644 --- a/dist/datamodel/fileKinds.d.ts +++ b/dist/datamodel/fileKinds.d.ts @@ -54,7 +54,35 @@ export declare function refModelExt(parentFilename: string): string; export declare function isSlddFile(filename: string): boolean; /** True if `filename` names a MAT-file. */ export declare function isMatFile(filename: string): boolean; -/** True if `filename` names a MATLAB project. */ +/** + * The name of the one file a TOML-format project's entire definition lives in. + * + * The ONE place this name is spelled in the package, and it earns that because it is + * not only a kind test: `ingest` keys the content it hands a session on it, + * `parseProject` dispatches on finding it among a store's entries, and + * `parseTomlProject` names it in the warnings it reports. Three independent literals + * that must agree is the shape this module exists to prevent. + */ +export declare const TOML_PROJECT_FILE = "matlab.toml"; +/** True if `filename` names a TOML-format project definition. */ +export declare function isTomlProjectFile(filename: string): boolean; +/** + * True if `filename` names a MATLAB project. + * + * The only kind test here that answers from EITHER an extension or a NAME, because + * R2026b gave a project two spellings: the long-standing `.prj` marker beside a + * `resources/project/` store, and `matlab.toml` at the project root with no marker and + * no store at all (`matlab.project.DefinitionFiles.Toml` deletes both). Both are a + * project to a host listing a folder, admitting a drop or labelling a tab, so both are + * a project here. + * + * It is that NAME and emphatically not the `.toml` EXTENSION, which is the whole reason + * `isTomlProjectFile` exists rather than another line beside `.prj`. TOML is the + * configuration format of half the tooling a MATLAB repository sits beside, so admitting + * the extension would make every `Cargo.toml`, `pyproject.toml` and `ruff.toml` in a + * workspace a MATLAB project — offered for opening, parsed as a project definition, and + * then reported as a project that declares nothing. + */ export declare function isProjectFile(filename: string): boolean; /** * A project file name with its `.prj` removed — the project's NAME, as distinct from the @@ -74,4 +102,30 @@ export declare function isProjectFile(filename: string): boolean; * with no `.prj` to strip is returned unchanged. */ export declare function projectNameOf(filename: string): string; +/** + * The name to call a project whose own definition records none, given the path of the + * marker file that definition was found through. + * + * `projectNameOf`'s warning is exactly why this is one function here rather than a rule + * each host re-derives: the reduction is made on two paths that must not disagree — + * this package makes it when adding a project source to a session, a host makes it + * again for whatever index it builds over `parseProject` — and the result is a label a + * user reads on both, so a drift shows up as one project appearing under two names. + * Until R2026b the rule was small enough to be invisible and was duplicated anyway; + * what made it worth naming is that it is no longer one rule. + * + * For a `matlab.toml` the name is the basename of the marker's PARENT FOLDER, because + * the file is called `matlab.toml` in every project that has one — the stem reduction + * that serves a marker (`MyProj.prj` -> `MyProj`) answers "matlab" for all of them, and + * a host stripping the extension itself would title every such project identically. The + * parent folder is what MATLAB calls a project it was handed the root of. + * + * Anything else delegates to `projectNameOf`, so `.prj` behaviour is bit-for-bit what + * it was before this existed. + * + * Pure string work, splitting on both separators so a Windows path needs no cleanup — + * and deliberately NOT `node:path`, because this module is reachable from the browser + * barrel (see test/moduleBoundaries.test.ts). + */ +export declare function projectFallbackName(markerPath: string): string; //# sourceMappingURL=fileKinds.d.ts.map \ No newline at end of file diff --git a/dist/datamodel/fileKinds.d.ts.map b/dist/datamodel/fileKinds.d.ts.map index 23662a3..30b0150 100644 --- a/dist/datamodel/fileKinds.d.ts.map +++ b/dist/datamodel/fileKinds.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"fileKinds.d.ts","sourceRoot":"","sources":["../../src/datamodel/fileKinds.ts"],"names":[],"mappings":"AAmBA,2EAA2E;AAC3E,wBAAgB,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAG9C;AAED,0FAA0F;AAC1F,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGvD;AAED,sEAAsE;AACtE,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAGrD;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,WAAW,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,kDAAkD;AAClD,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED,2CAA2C;AAC3C,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEnD;AAED,iDAAiD;AACjD,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEtD"} \ No newline at end of file +{"version":3,"file":"fileKinds.d.ts","sourceRoot":"","sources":["../../src/datamodel/fileKinds.ts"],"names":[],"mappings":"AAmBA,2EAA2E;AAC3E,wBAAgB,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAG9C;AAED,0FAA0F;AAC1F,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGvD;AAED,sEAAsE;AACtE,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAGrD;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,WAAW,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,kDAAkD;AAClD,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED,2CAA2C;AAC3C,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEnD;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,gBAAgB,CAAC;AAE/C,iEAAiE;AACjE,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAE3D;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAW9D"} \ No newline at end of file diff --git a/dist/datamodel/fileKinds.js b/dist/datamodel/fileKinds.js index cb3f626..6efc415 100644 --- a/dist/datamodel/fileKinds.js +++ b/dist/datamodel/fileKinds.js @@ -91,9 +91,39 @@ export function isSlddFile(filename) { export function isMatFile(filename) { return extOf(filename) === '.mat'; } -/** True if `filename` names a MATLAB project. */ +/** + * The name of the one file a TOML-format project's entire definition lives in. + * + * The ONE place this name is spelled in the package, and it earns that because it is + * not only a kind test: `ingest` keys the content it hands a session on it, + * `parseProject` dispatches on finding it among a store's entries, and + * `parseTomlProject` names it in the warnings it reports. Three independent literals + * that must agree is the shape this module exists to prevent. + */ +export const TOML_PROJECT_FILE = 'matlab.toml'; +/** True if `filename` names a TOML-format project definition. */ +export function isTomlProjectFile(filename) { + return basenameOf(filename).toLowerCase() === TOML_PROJECT_FILE; +} +/** + * True if `filename` names a MATLAB project. + * + * The only kind test here that answers from EITHER an extension or a NAME, because + * R2026b gave a project two spellings: the long-standing `.prj` marker beside a + * `resources/project/` store, and `matlab.toml` at the project root with no marker and + * no store at all (`matlab.project.DefinitionFiles.Toml` deletes both). Both are a + * project to a host listing a folder, admitting a drop or labelling a tab, so both are + * a project here. + * + * It is that NAME and emphatically not the `.toml` EXTENSION, which is the whole reason + * `isTomlProjectFile` exists rather than another line beside `.prj`. TOML is the + * configuration format of half the tooling a MATLAB repository sits beside, so admitting + * the extension would make every `Cargo.toml`, `pyproject.toml` and `ruff.toml` in a + * workspace a MATLAB project — offered for opening, parsed as a project definition, and + * then reported as a project that declares nothing. + */ export function isProjectFile(filename) { - return extOf(filename) === '.prj'; + return extOf(filename) === '.prj' || isTomlProjectFile(filename); } /** * A project file name with its `.prj` removed — the project's NAME, as distinct from the @@ -115,4 +145,41 @@ export function isProjectFile(filename) { export function projectNameOf(filename) { return filename.replace(/\.prj$/i, ''); } +/** + * The name to call a project whose own definition records none, given the path of the + * marker file that definition was found through. + * + * `projectNameOf`'s warning is exactly why this is one function here rather than a rule + * each host re-derives: the reduction is made on two paths that must not disagree — + * this package makes it when adding a project source to a session, a host makes it + * again for whatever index it builds over `parseProject` — and the result is a label a + * user reads on both, so a drift shows up as one project appearing under two names. + * Until R2026b the rule was small enough to be invisible and was duplicated anyway; + * what made it worth naming is that it is no longer one rule. + * + * For a `matlab.toml` the name is the basename of the marker's PARENT FOLDER, because + * the file is called `matlab.toml` in every project that has one — the stem reduction + * that serves a marker (`MyProj.prj` -> `MyProj`) answers "matlab" for all of them, and + * a host stripping the extension itself would title every such project identically. The + * parent folder is what MATLAB calls a project it was handed the root of. + * + * Anything else delegates to `projectNameOf`, so `.prj` behaviour is bit-for-bit what + * it was before this existed. + * + * Pure string work, splitting on both separators so a Windows path needs no cleanup — + * and deliberately NOT `node:path`, because this module is reachable from the browser + * barrel (see test/moduleBoundaries.test.ts). + */ +export function projectFallbackName(markerPath) { + if (!isTomlProjectFile(markerPath)) { + return projectNameOf(basenameOf(markerPath)); + } + const segments = markerPath.split(/[\\/]/).filter((segment) => segment.length > 0); + const parent = segments.length >= 2 ? segments[segments.length - 2] : ''; + // '' when there is no parent segment to read, and the same for the two segments that + // are a direction rather than a name: a path written relative to the cwd has `.` or + // `..` where the folder name would be, and titling a project with either is worse + // than admitting there is no name here to be had. + return parent === '.' || parent === '..' ? '' : parent; +} //# sourceMappingURL=fileKinds.js.map \ No newline at end of file diff --git a/dist/datamodel/fileKinds.js.map b/dist/datamodel/fileKinds.js.map index 5a1cece..37717f5 100644 --- a/dist/datamodel/fileKinds.js.map +++ b/dist/datamodel/fileKinds.js.map @@ -1 +1 @@ -{"version":3,"file":"fileKinds.js","sourceRoot":"","sources":["../../src/datamodel/fileKinds.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,qCAAqC;AACrC,EAAE;AACF,oFAAoF;AACpF,EAAE;AACF,uFAAuF;AACvF,sFAAsF;AACtF,qFAAqF;AACrF,sFAAsF;AACtF,wFAAwF;AACxF,mFAAmF;AACnF,wFAAwF;AACxF,gCAAgC;AAChC,EAAE;AACF,mFAAmF;AACnF,sFAAsF;AACtF,sFAAsF;AACtF,kDAAkD;AAElD,2EAA2E;AAC3E,MAAM,UAAU,KAAK,CAAC,QAAgB;IACpC,MAAM,GAAG,GAAG,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,GAAG,GAAG,CAAC,CAAC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iD;AACjD,MAAM,UAAU,aAAa,CAAC,QAAgB;IAC5C,OAAO,KAAK,CAAC,QAAQ,CAAC,KAAK,MAAM,CAAC;AACpC,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,aAAa,CAAC,QAAgB;IAC5C,OAAO,QAAQ,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;AACzC,CAAC"} \ No newline at end of file +{"version":3,"file":"fileKinds.js","sourceRoot":"","sources":["../../src/datamodel/fileKinds.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,qCAAqC;AACrC,EAAE;AACF,oFAAoF;AACpF,EAAE;AACF,uFAAuF;AACvF,sFAAsF;AACtF,qFAAqF;AACrF,sFAAsF;AACtF,wFAAwF;AACxF,mFAAmF;AACnF,wFAAwF;AACxF,gCAAgC;AAChC,EAAE;AACF,mFAAmF;AACnF,sFAAsF;AACtF,sFAAsF;AACtF,kDAAkD;AAElD,2EAA2E;AAC3E,MAAM,UAAU,KAAK,CAAC,QAAgB;IACpC,MAAM,GAAG,GAAG,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC;AAC1D,CAAC;AAED,0FAA0F;AAC1F,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC;AAC3C,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;AACxC,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,MAAM,KAAK,GAAG,oBAAoB,CAA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AE,EAAE,CAAC,CAAC;AACzC,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,mBAAmB,CAAC,UAAkB;IACpD,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,EAAE,CAAC;QACnC,OAAO,aAAa,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;IAC/C,CAAC;IACD,MAAM,QAAQ,GAAG,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACnF,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACzE,qFAAqF;IACrF,oFAAoF;IACpF,kFAAkF;IAClF,kDAAkD;IAClD,OAAO,MAAM,KAAK,GAAG,IAAI,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC;AACzD,CAAC"} \ No newline at end of file diff --git a/dist/datamodel/parser/ProjectPage.d.ts b/dist/datamodel/parser/ProjectPage.d.ts index 6ffbfa2..fd327c6 100644 --- a/dist/datamodel/parser/ProjectPage.d.ts +++ b/dist/datamodel/parser/ProjectPage.d.ts @@ -18,10 +18,28 @@ export interface ProjectPageShortcut { export interface ProjectPageLabel { id: string; name: string; - /** Members carrying this label. 0 is meaningful — a defined but unused label. */ - count: number; + /** + * Members carrying this label. 0 is meaningful — a defined but unused label. + * + * `null` when the format records no member list (see `ProjectPage.memberCount`, which + * carries the full reasoning). There are no member assignments to count, so the only + * honest answer is "unknown", and 0 would claim the opposite of what `declaredFiles` + * is about to show on the very same chip — a label declared against three paths, drawn + * as used by nothing. Do not default it. + */ + count: number | null; /** Defined by this project rather than shipped by MATLAB. */ custom: boolean; + /** + * The files or patterns this label was declared AGAINST, as written. + * + * Carried straight through from `ProjectLabel.declaredFiles`, so `[]` on every XML + * layout — those stores assign labels the other way round, per member file, and + * `count` is the whole story there. For a `matlab.toml` project it is the only thing a + * page can say about a label's reach, which is why it stands IN PLACE OF the count + * rather than beside it. + */ + declaredFiles: string[]; } export interface ProjectPageCategory { name: string; @@ -51,10 +69,36 @@ export interface ProjectPage { format: string; /** English for `format` — what a MATLAB user sees in Project Settings. */ formatLabel: string; - /** Every member, folders included: what the project "contains". */ - memberCount: number; - /** Members carrying at least one label — the numerator of label coverage. */ - labelledCount: number; + /** + * Every member, folders included: what the project "contains". `null` when the FORMAT + * records no member list — `ParsedProject.membersEnumerated` false, which today means + * a `matlab.toml` project. + * + * `null` rather than 0, and this is the entire reason the field is nullable: 0 is a + * sentence, "this project contains nothing", and for a format whose members are "every + * file under the project root" that sentence is false about a project holding hundreds + * of them. The maintainer's decision is to declare only what the file declares — no + * folder walk to synthesize a membership the document does not have — so the page shows + * no count at all. A maintainer tidying the nullability away by defaulting to 0 would + * be re-introducing precisely the false claim this exists to remove. + * + * `null` also costs nothing to honour downstream: the consuming webview's `esc()` takes + * `string | number`, so a `null` reaching it is a compile error AT THE CALL SITE, which + * forces a renderer to branch rather than print 'null'. A sentinel like -1 would have + * type-checked and shipped. + * + * A damaged XML store still reports 0 here, which is correct — it enumerated nothing, + * as against a format that enumerates nothing. See `membersEnumerated`. + */ + memberCount: number | null; + /** + * Members carrying at least one label — the numerator of label coverage. `null` under + * the same condition as `memberCount`, and for the same reason: with no denominator + * there is no fraction to show, and "0 of 0 labelled" says something false about a + * project whose labels name files nothing enumerated. What those labels WERE declared + * against is on `ProjectPageLabel.declaredFiles`, which is what a page shows instead. + */ + labelledCount: number | null; /** In run order. */ startup: ProjectPageRun[]; /** In run order. */ diff --git a/dist/datamodel/parser/ProjectPage.d.ts.map b/dist/datamodel/parser/ProjectPage.d.ts.map index 2787795..0ec1c8e 100644 --- a/dist/datamodel/parser/ProjectPage.d.ts.map +++ b/dist/datamodel/parser/ProjectPage.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ProjectPage.d.ts","sourceRoot":"","sources":["../../../src/datamodel/parser/ProjectPage.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,aAAa,EAAqB,MAAM,oBAAoB,CAAC;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,8EAA8E;AAC9E,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,0CAA0C;AAC1C,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,qDAAqD;IACrD,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAC;CACf;AAED,0DAA0D;AAC1D,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,iFAAiF;IACjF,KAAK,EAAE,MAAM,CAAC;IACd,6DAA6D;IAC7D,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,gBAAgB,EAAE,CAAC;CAC5B;AAED,iEAAiE;AACjE,MAAM,WAAW,mBAAmB;IAClC,uDAAuD;IACvD,GAAG,EAAE,MAAM,CAAC;IACZ,yEAAyE;IACzE,KAAK,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,MAAM,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,WAAW,EAAE,MAAM,CAAC;IACpB,mEAAmE;IACnE,WAAW,EAAE,MAAM,CAAC;IACpB,6EAA6E;IAC7E,aAAa,EAAE,MAAM,CAAC;IACtB,oBAAoB;IACpB,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,oBAAoB;IACpB,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,SAAS,EAAE,mBAAmB,EAAE,CAAC;IACjC,4DAA4D;IAC5D,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,SAAS,EAAE,mBAAmB,EAAE,CAAC;IACjC,UAAU,EAAE,mBAAmB,EAAE,CAAC;IAClC,UAAU,EAAE,oBAAoB,EAAE,CAAC;IACnC,QAAQ,EAAE,YAAY,EAAE,CAAC;CAC1B;AAmCD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,aAAa,GAAG,WAAW,CAgCnE"} \ No newline at end of file +{"version":3,"file":"ProjectPage.d.ts","sourceRoot":"","sources":["../../../src/datamodel/parser/ProjectPage.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,aAAa,EAAqB,MAAM,oBAAoB,CAAC;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,8EAA8E;AAC9E,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,0CAA0C;AAC1C,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,qDAAqD;IACrD,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAC;CACf;AAED,0DAA0D;AAC1D,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;;;OAQG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,6DAA6D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jectPage.js b/dist/datamodel/parser/ProjectPage.js index 2af1805..cd16741 100644 --- a/dist/datamodel/parser/ProjectPage.js +++ b/dist/datamodel/parser/ProjectPage.js @@ -65,8 +65,13 @@ export function buildProjectPage(parsed) { name: parsed.name, format: parsed.format, formatLabel: FORMAT_LABEL[parsed.format] ?? parsed.format, - memberCount: parsed.files.length, - labelledCount: parsed.files.filter((f) => f.labels.length > 0).length, + // `null`, not the length of an empty list: a format that records no member list has + // no number to report here, and reporting one derived from `files: []` would state + // something about the project that the document never said. See the two fields. + memberCount: parsed.membersEnumerated ? parsed.files.length : null, + labelledCount: parsed.membersEnumerated + ? parsed.files.filter((f) => f.labels.length > 0).length + : null, startup: runsOf(STARTUP), shutdown: runsOf(SHUTDOWN), shortcuts: shortcutsOf(parsed.entryPoints, groupNames), @@ -124,8 +129,16 @@ function shortcutsOf(entryPoints, groupNames) { * (written by a release that knew it, or by a hand-edited store). Such an id is * counted under a category named for it, so the coverage figure stays consistent * with `labelledCount` instead of quietly excluding files it includes. + * + * Which is also why there are no counts AT ALL when the format records no member list: + * the assignments the counts are made of are the thing that format does not have, so + * every `count` here is `null` and the ordering falls back to the name. The catalog + * itself survives — a `matlab.toml` declares its labels plainly, with the files each was + * declared against — so the page still lists them, just without a number none of them + * has. See `ProjectPage.memberCount` for why that is not 0. */ function categoriesOf(parsed) { + const enumerated = parsed.membersEnumerated; const counts = new Map(); for (const file of parsed.files) { // Per file, not per assignment: `parsed.files` already de-duplicates a file's @@ -150,20 +163,38 @@ function categoriesOf(parsed) { push(l.category, { id: l.id, name: l.name, - count: counts.get(l.id) ?? 0, + count: enumerated ? counts.get(l.id) ?? 0 : null, custom: !l.readOnly, + declaredFiles: l.declaredFiles, }); } - for (const [id, count] of counts) { - if (!defined.has(id)) { - push('', { id, name: id, count, custom: true }); + // The synthetic pass: ids the members carry that the catalog does not define. Guarded + // on `enumerated` rather than left to come out empty on its own — `counts` is built + // from `parsed.files`, which is empty for an unenumerated format, so the loop would + // not run anyway, and a reader should not have to derive that to know this pass has + // nothing to reconcile when there are no assignments to reconcile it against. + if (enumerated) { + for (const [id, count] of counts) { + if (!defined.has(id)) { + // No `declaredFiles`: this id exists only because a member carries it, so there + // is no catalog entry it could have been declared on. + push('', { id, name: id, count, custom: true, declaredFiles: [] }); + } } } // Used labels first, then by name: the seven built-ins ship with every project // and most stay at zero, so catalog order buries the two or three that say // something about THIS project under five that say nothing about any. + // + // Name alone when the counts are `null`, which they are all together or not at all + // since they come from the one `enumerated`: an unknown usage is not a zero usage, so + // there is nothing to put first, and `count ?? 0` here would quietly order every label + // as if it were known to be unused. The `null` test is also what proves to the type + // checker that the subtraction only ever sees numbers. for (const labels of byCategory.values()) { - labels.sort((a, b) => b.count - a.count || a.name.localeCompare(b.name)); + labels.sort((a, b) => a.count === null || b.count === null + ? a.name.localeCompare(b.name) + : b.count - a.count || a.name.localeCompare(b.name)); } return [...byCategory.entries()].map(([name, labels]) => ({ name, labels })); } diff --git a/dist/datamodel/parser/ProjectPage.js.map b/dist/datamodel/parser/ProjectPage.js.map index 4d71002..f15fe59 100644 --- a/dist/datamodel/parser/ProjectPage.js.map +++ b/dist/datamodel/parser/ProjectPage.js.map @@ -1 +1 @@ -{"version":3,"file":"ProjectPage.js","sourceRoot":"","sources":["../../../src/datamodel/parser/ProjectPage.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6EAA6E;AAC7E,gFAAgF;AAChF,mFAAmF;AACnF,mFAAmF;AACnF,mFAAmF;AACnF,mFAAmF;AACnF,4EAA4E;AAC5E,EAAE;AACF,oFAAoF;AACpF,kFAAkF;AAClF,+EAA+E;AAC/E,oFAAoF;AACpF,oFAAoF;AACpF,uDAAuD;AA+EvD;;;;;;GAMG;AACH,MAAM,cAAc,GAA2B;IAC7C,mBAAmB,EAAE,kBAAkB;IACvC,qBAAqB,EAAE,iBAAiB;IACxC,oBAAoB,EAAE,gBAAgB;IACtC,mBAAmB,E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ProjectParser.d.ts index c4c9bc2..ddc2038 100644 --- a/dist/datamodel/parser/ProjectParser.d.ts +++ b/dist/datamodel/parser/ProjectParser.d.ts @@ -19,6 +19,17 @@ export interface ProjectLabel { * itself added is not, which is the only thing distinguishing the two. */ readOnly: boolean; + /** + * The files or patterns this label was declared AGAINST, as written. + * + * Empty on every XML layout, and that is a fact about those layouts rather than a + * gap: a store assigns labels the other way round, per member file + * (`ProjectFile.labels`), so the catalog entry has nothing to point back at. The + * `matlab.toml` format inverts it — the label declares its files, and the format + * records no member list for them to have been declared on — which is why this + * field exists at all and why it is the only place those paths can live. + */ + declaredFiles: string[]; } /** A project-to-project reference. */ export interface ProjectReference { @@ -84,8 +95,33 @@ export interface ParsedProject { * Three are read: `fixedPathV2`, `distributed` and `monolithic`. Anything else is * reported through `warnings` rather than read, because guessing at a layout * produces a project that looks complete and is not. + * + * Plus `toml`, which is the one value here that is NOT a declared `MetadataType`: + * a `matlab.toml` project has no store and nothing in it to declare, so the value + * is this package's own name for the format (see TomlProject.ts). It is in the same + * field because what a consumer does with it is the same — a page titles the view + * with it, a host decides what it can write back — and a second field would make + * every one of them ask twice. */ format: string; + /** + * Whether this FORMAT records a member list — not whether any members were found. + * + * The distinction is the whole point of the field. `files: []` from an XML store is a + * claim about the project: the store enumerates its members and enumerated none, so + * "0 files" is true. `files: []` from a `matlab.toml` is a claim about the format: + * it records no member list at all (MATLAB's rule is that the project root's files + * ARE the members, which is about the filesystem and not about the document), so "0 + * files" would be a sentence the reader is not entitled to say. A host showing a + * count or an empty-state message needs to tell those two apart, and nothing else in + * this result does. + * + * True on every XML path, `emptyResult` included: a damaged store enumerated nothing, + * which is a different thing from a format that enumerates nothing, and the + * `memberCount: 0` a host already shows for a damaged store is correct and must not + * change. + */ + membersEnumerated: boolean; files: ProjectFile[]; /** * Folders added to the MATLAB path, project-root-relative. The project ROOT @@ -113,13 +149,19 @@ export interface ParsedProject { warnings: ParseWarning[]; } /** - * Parse a MATLAB/Simulink Project content store. + * Parse a MATLAB/Simulink Project definition. + * + * `files` maps POSIX relpaths (relative to the project root) to file text. Of an XML + * store only entries under `resources/project/` are read; a `matlab.toml` is read + * wherever in the map it is, and is the whole definition when present. Never throws: on + * any failure it returns a minimally-populated result with the fallback name — and says + * so in `result.warnings`, which is the only thing separating that result from a project + * which genuinely holds nothing. * - * `files` maps POSIX relpaths (relative to the project root) to file text. - * Only entries under `resources/project/` are read. Never throws: on any - * failure it returns a minimally-populated result with the fallback name — and - * says so in `result.warnings`, which is the only thing separating that result - * from a project which genuinely holds nothing. + * `projectName` is the name for a definition that records none, and should come from + * `projectFallbackName` rather than from a reduction of the caller's own: for a + * `matlab.toml` the answer is the parent FOLDER, and stripping an extension there names + * every such project "matlab". */ export declare function parseProject(files: Record, projectName: string): ParsedProject; //# sourceMappingURL=ProjectParser.d.ts.map \ No newline at end of file diff --git a/dist/datamodel/parser/ProjectParser.d.ts.map b/dist/datamodel/parser/ProjectParser.d.ts.map index ab0395b..0d3b55a 100644 --- a/dist/datamodel/parser/ProjectParser.d.ts.map +++ b/dist/datamodel/parser/ProjectParser.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ProjectParser.d.ts","sourceRoot":"","sources":["../../../src/datamodel/parser/ProjectParser.ts"],"names":[],"mappings":"AAGA,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEhE,gDAAgD;AAChD,MAAM,WAAW,WAAW;IAC1B,yEAAyE;IACzE,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,yDAAyD;IACzD,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,yEAAyE;AACzE,MAAM,WAAW,YAAY;IAC3B,+EAA+E;IAC/E,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,sCAAsC;AACtC,MAA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EAAE,MAAM,CAAC,EAAE,WAAW,EAAE,MAAM,GAAG,aAAa,CA8L9F"} \ No newline at end of file +{"version":3,"file":"ProjectParser.d.ts","sourceRoot":"","sources":["../../../src/datamodel/parser/ProjectParser.ts"],"names":[],"mappings":"AAIA,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGhE,gDAAgD;AAChD,MAAM,WAAW,WAAW;IAC1B,yEAAyE;IACzE,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,yDAAyD;IACzD,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,yEAAyE;AACzE,MAAM,WAAW,YAAY;IAC3B,+EAA+E;IAC/E,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;;;;;;;;OASG;IACH,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,sCAAsC;AACtC,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;;;;;;;OAQG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAChC,2DAA2D;IAC3D,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,+EAA+E;IAC/E,IAAI,EAAE,MAAM,CAAC;IACb,uFAAuF;IACvF,IAAI,EAAE,MAAM,CAAC;IACb,6FAA6F;IAC7F,OAAO,EAAE,OAAO,CAAC;IACjB,mFAAmF;IACnF,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,8CAA8C;AAC9C,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,kCAAkC;IAClC,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;;;;;;;;OAaG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;;;;;;;;;;;OAgBG;IACH,iBAAiB,EAAE,OAAO,CAAC;IAC3B,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB;;;;OAIG;IACH,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,oDAAoD;IACpD,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,UAAU,EAAE,gBAAgB,EAAE,CAAC;IAC/B;;;;;OAKG;IACH,WAAW,EAAE,iBAAiB,EAAE,CAAC;IACjC,gBAAgB,EAAE,sBAAsB,EAAE,CAAC;IAC3C,cAAc,EAAE,oBAAoB,EAAE,CAAC;IACvC;;;;OAIG;IACH,QAAQ,EAAE,YAAY,EAAE,CAAC;CAC1B;AAqJD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,EAAE,MAAM,GAAG,aAAa,CA4L9F"} \ No newline at end of file diff --git a/dist/datamodel/parser/ProjectParser.js b/dist/datamodel/parser/ProjectParser.js index 7d8342e..f49d394 100644 --- a/dist/datamodel/parser/ProjectParser.js +++ b/dist/datamodel/parser/ProjectParser.js @@ -1,6 +1,8 @@ // Copyright 2026 The MathWorks, Inc. import { readProjectXml, ATTRIBUTE_PREFIX, TEXT_KEY } from './XmlReader.js'; +import { isTomlProjectFile } from '../fileKinds.js'; import { reasonOf } from './ParseWarning.js'; +import { parseTomlProject } from './TomlProject.js'; const PROJECT_PREFIX = 'resources/project/'; /** The store manifest, which declares the layout the rest of the store is in. */ const MANIFEST = 'Project.xml'; @@ -46,6 +48,9 @@ function emptyResult(name, warnings) { return { name, format: '', + // True even here: this is an XML store that could not be walked, and an XML store + // is a format that enumerates its members. See the field. + membersEnumerated: true, files: [], pathFolders: [], labels: [], @@ -57,18 +62,39 @@ function emptyResult(name, warnings) { }; } /** - * Parse a MATLAB/Simulink Project content store. + * Parse a MATLAB/Simulink Project definition. * - * `files` maps POSIX relpaths (relative to the project root) to file text. - * Only entries under `resources/project/` are read. Never throws: on any - * failure it returns a minimally-populated result with the fallback name — and - * says so in `result.warnings`, which is the only thing separating that result - * from a project which genuinely holds nothing. + * `files` maps POSIX relpaths (relative to the project root) to file text. Of an XML + * store only entries under `resources/project/` are read; a `matlab.toml` is read + * wherever in the map it is, and is the whole definition when present. Never throws: on + * any failure it returns a minimally-populated result with the fallback name — and says + * so in `result.warnings`, which is the only thing separating that result from a project + * which genuinely holds nothing. + * + * `projectName` is the name for a definition that records none, and should come from + * `projectFallbackName` rather than from a reduction of the caller's own: for a + * `matlab.toml` the answer is the parent FOLDER, and stripping an extension there names + * every such project "matlab". */ export function parseProject(files, projectName) { const warnings = []; const result = emptyResult(projectName, warnings); try { + // The TOML format first, before any of the store walking below, because it is not a + // layout of the store this function walks — it is the absence of one. MATLAB writes + // the file at the project ROOT and deletes `resources/` with the `.prj`, so the key + // is normally just `matlab.toml`; matched by basename anyway, since a host building + // this map from a directory may well key it by a longer path. + // + // INSIDE the try, not above it, and that is not incidental: `files` itself is + // whatever a host handed over, and `parseProject(null)` is a documented case that + // must come back as a `source-unreadable` result rather than a throw. The catch is + // what makes that true, so nothing may touch `files` outside it. + for (const [relPath, content] of Object.entries(files)) { + if (isTomlProjectFile(relPath)) { + return parseTomlProject(content, projectName); + } + } // Index every parseable Info doc by its relpath (project-relative). const index = new Map(); // The one document of a `monolithic` store, when this store is one. A store holds @@ -107,27 +133,14 @@ export function parseProject(files, projectName) { // whole result is empty — and a `.prj` always has a store, so reaching here // is either the wrong kind of file or a store that did not survive its trip. // - // Except for one case worth naming separately: a store MATLAB wrote in its - // `matlab.toml` format holds no XML at all, so it lands here looking exactly - // like damage. It is not damaged, it is a format this reader does not read, - // and a user told "nothing readable" would go looking for a corrupt file. - const toml = Object.keys(files).find((k) => k.startsWith(PROJECT_PREFIX) && k.slice(PROJECT_PREFIX.length).endsWith('matlab.toml')); - warnings.push(toml - ? { - // 'source-empty' rather than a code of its own: the code is the kind of - // loss (the source opened and held nothing this reader recognizes) and - // the message is which, per ParseWarningCode's note that the codes are - // about containers and parts and not about any one format. - code: 'source-empty', - message: 'This project stores its metadata as matlab.toml, which this viewer cannot read yet, ' + - 'so this project reads as empty. In MATLAB, Project Settings can save it as XML instead.', - part: toml, - } - : { - code: 'source-empty', - message: 'No readable project entries were found under resources/project/, ' + - 'so this project reads as empty.', - }); + // A `matlab.toml` definition used to land here too, looking exactly like damage + // for want of a reader; it now returns at the top of this function, so what is + // left under this branch really is a store holding nothing readable. + warnings.push({ + code: 'source-empty', + message: 'No readable project entries were found under resources/project/, ' + + 'so this project reads as empty.', + }); return result; } // Which layout the store is in. The KIND of store is settled structurally, by @@ -742,7 +755,15 @@ function readCategories(layout, collection) { // which the project page draws as a built-in. A missing attribute is // writable, which is how a hand-made label in an older store spells it. const ro = labelEnt.def?.['@_ReadOnly']; - out.push({ id, category: categoryName, name, readOnly: ro === 'READ_ONLY' || ro === '1' }); + out.push({ + id, + category: categoryName, + name, + readOnly: ro === 'READ_ONLY' || ro === '1', + // Always empty from a store: it assigns labels per member file, so the + // catalog entry has no file list of its own. See `ProjectLabel.declaredFiles`. + declaredFiles: [], + }); } } } diff --git a/dist/datamodel/parser/ProjectParser.js.map b/dist/datamodel/parser/ProjectParser.js.map index 4653a58..bf102a7 100644 --- a/dist/datamodel/parser/ProjectParser.js.map +++ b/dist/datamodel/parser/ProjectParser.js.map @@ -1 +1 @@ -{"version":3,"file":"ProjectParser.js","sourceRoot":"","sources":["../../../src/datamodel/parser/ProjectParser.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,OAAO,EAAE,cAAc,EAAE,gBAAgB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IAAI,GAAG,EAAE,CAAC;QACR,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC7D,IAAI,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IAC1D,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,IAAI,IAAI,EAAE,CAAC;AACzC,CAAC"} \ No newline at end of file +{"version":3,"file":"ProjectParser.js","sourceRoot":"","sources":["../../../src/datamodel/parser/ProjectParser.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAqB,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AA8JpD,MAAM,cAAc,GAAG,oBAAoB,CAAC;AAE5C,iFAAiF;AACjF,MAAM,QAAQ,GAAG,aAAa,CAAC;AAE/B,iEAAiE;AACjE,MAAM,aAAa,GAAG,aAAa,CAAC;AACpC,MAAM,WAAW,GAAG,aAAa,CAAC;AAClC,MAAM,UAAU,GAAG,YAAY,CAAC;AAEhC;;;;;GAKG;AACH,MAAM,eAAe,GAAG,SAAS,CAAC;AAElC;;;;;;;;;;;GAWG;AACH,MAAM,yBAAyB,GAAG,IAAI,GAAG,CAAC;IACxC,aAAa;IACb,gBAAgB;IAChB,YAAY;IACZ,OAAO;IACP,aAAa;IACb,kBAAkB;IAClB,MAAM;CACP,CAAC,CAAC;AAoFH,SAAS,OAAO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AAC;YACrB,IAAI,CAAC,CAAC,CAAC,CAAC;QACV,CAAC;IACH,CAAC;IAED,0EAA0E;IAC1E,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;QACxB,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;YAClB,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACd,CAAC;IACH,CAAC;IAED,qDAAqD;IACrD,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;AACrD,CAAC;AAED;;;GAGG;AACH,SAAS,gBAAgB,CAAC,GAAW;IACnC,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC;IAC/B,MAAM,EAAE,GAAG,GAAG,CAAC,QAAQ,IAAI,GAAG,IAAI,EAAE,CAAC;IACrC,IAAI,CAAC,EAAE,EAAE,CAAC;QACR,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,IAAI,GAAkB,IAAI,CAAC;IAC/B,IAAI,GAAG,EAAE,CAAC;QACR,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC7D,IAAI,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IAC1D,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,IAAI,IAAI,EAAE,CAAC;AACzC,CAAC"} \ No newline at end of file diff --git a/dist/datamodel/parser/TomlProject.d.ts b/dist/datamodel/parser/TomlProject.d.ts new file mode 100644 index 0000000..721b2b3 --- /dev/null +++ b/dist/datamodel/parser/TomlProject.d.ts @@ -0,0 +1,12 @@ +import type { ParsedProject } from './ProjectParser.js'; +/** + * Read a project whose entire definition is one `matlab.toml`. + * + * `text` is the file's content and `fallbackName` the project's name for a document + * that records none — see `projectFallbackName`, which is where a caller gets one that + * agrees with the rest of the package. Never throws: on a document that will not parse + * it returns an empty project that says so in `warnings`, which is the only thing + * separating that result from a project which genuinely holds nothing. + */ +export declare function parseTomlProject(text: string, fallbackName: string): ParsedProject; +//# sourceMappingURL=TomlProject.d.ts.map \ No newline at end of file diff --git a/dist/datamodel/parser/TomlProject.d.ts.map b/dist/datamodel/parser/TomlProject.d.ts.map new file mode 100644 index 0000000..d9d0589 --- /dev/null +++ b/dist/datamodel/parser/TomlProject.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TomlProject.d.ts","sourceRoot":"","sources":["../../../src/datamodel/parser/TomlProject.ts"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EACV,aAAa,EAKd,MAAM,oBAAoB,CAAC;AAgB5B;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,aAAa,CAiDlF"} \ No newline at end of file diff --git a/dist/datamodel/parser/TomlProject.js b/dist/datamodel/parser/TomlProject.js new file mode 100644 index 0000000..0da48bd --- /dev/null +++ b/dist/datamodel/parser/TomlProject.js @@ -0,0 +1,363 @@ +// src/datamodel/parser/TomlProject.ts +// Copyright 2026 The MathWorks, Inc. +// +// The fourth project metadata format, and the only one that is not XML. +// +// R2026b's `matlab.project.DefinitionFiles.Toml` puts a project's whole definition +// into ONE hand-editable `matlab.toml` at the project root, and deletes both +// `resources/` and the `.prj` marker with it. There is no content store to walk, +// no pointer/def document pairs, no entity UUIDs and no linked lists — so nothing in +// ProjectParser's machinery applies, and this is a separate reader rather than a fourth +// `Layout` in that file. What the two share is the RESULT: `ParsedProject`, so a page, +// a node tree and a host see one project shape whichever of the four it arrived as. +// +// WHAT THE FORMAT DOES NOT RECORD is the thing to keep in mind while reading this. +// MATLAB's own conversion into it warns `MATLAB:Project:Issues:LabelDataLoss`, and the +// parity corpus measures the rest: no member list, no label ownership, no label data +// type, no entity UUIDs, and the Simulink working folders survive as paths with nothing +// saying what they are for. So several fields here are empty or synthetic BY THE +// FORMAT rather than by omission, and each says so where it is built — a maintainer who +// read `files: []` as an oversight and "fixed" it by walking the project folder would +// be inventing a member list MATLAB does not have. +// +// Never throws, like every reader here, and for a sharper reason than the others: this +// is the one format a user EDITS. A number where a path belongs, a string where a table +// belongs, a key spelled the way last year's release spelled it — all of those are +// ordinary states of a real file, so every read goes through a helper that tolerates +// the wrong type, and what could not be read is said in `warnings` instead. +import { parse, TomlError } from 'smol-toml'; +import { basenameOf, extOf, TOML_PROJECT_FILE } from '../fileKinds.js'; +import { reasonOf } from './ParseWarning.js'; +/** This reader's value for `ParsedProject.format`. See that field. */ +const TOML_FORMAT = 'toml'; +/** + * The top-level keys that make a document a project definition at all. + * + * A file carrying none of them declares nothing, which is reported (see the + * `source-empty` warning below) — and this is the list because it is every key this + * reader reads. A document holding only keys NOT on it is a newer release's or a + * hand-written future one, and that is still a project declaring settings, so it must + * not be reported as empty; the test is "none of these", not "nothing we model". + */ +const DECLARING_KEYS = ['name', 'folders', 'dependencies', 'project', 'simulink']; +/** + * Read a project whose entire definition is one `matlab.toml`. + * + * `text` is the file's content and `fallbackName` the project's name for a document + * that records none — see `projectFallbackName`, which is where a caller gets one that + * agrees with the rest of the package. Never throws: on a document that will not parse + * it returns an empty project that says so in `warnings`, which is the only thing + * separating that result from a project which genuinely holds nothing. + */ +export function parseTomlProject(text, fallbackName) { + let doc; + try { + doc = parse(text); + } + catch (err) { + return empty(fallbackName, [ + { + code: 'source-unreadable', + message: `${TOML_PROJECT_FILE} could not be read (${oneLineReason(err)}), ` + + 'so this project reads as empty.', + part: TOML_PROJECT_FILE, + }, + ]); + } + if (!DECLARING_KEYS.some((key) => key in doc)) { + return empty(fallbackName, [ + { + code: 'source-empty', + message: `${TOML_PROJECT_FILE} declares no project settings, so this project reads as empty.`, + part: TOML_PROJECT_FILE, + }, + ]); + } + const project = tableAt(doc, 'project'); + return { + name: stringAt(doc, 'name') || fallbackName, + format: TOML_FORMAT, + // The format records no member list at all — MATLAB's own documentation of it says + // "by default, all files in the project root folder are project files", which is a + // rule about the FILESYSTEM and not a list in this document. So this reader cannot + // answer which files belong, and `membersEnumerated: false` is how it says that + // rather than reporting a project with zero members, which is a different claim. + membersEnumerated: false, + files: [], + pathFolders: asStringArray(valueAt(tableAt(doc, 'folders'), 'path')), + labels: readLabels(tableAt(project, 'labels')), + references: readReferences(tableAt(doc, 'dependencies')), + entryPoints: readEntryPoints(project), + // The format has no equivalent of the XML store's EntryPointGroups: every shortcut + // sits under one `[project.shortcuts]` table with nowhere to name a gallery group. + entryPointGroups: [], + workingFolders: readWorkingFolders(project, tableAt(doc, 'simulink')), + warnings: [], + }; +} +/** + * Why the parse failed, as ONE line. + * + * `reasonOf` alone is not enough here, and this is the only reader where that is true. + * `ParseWarning.message` is documented as one host-renderable line, and smol-toml's + * message is three or more: it appends a code excerpt with a caret under the offending + * character, which is exactly right in a terminal and arrives in a tree row, a tooltip or + * a notification as ASCII art with the diagnosis scrolled off. So the first line — the + * diagnosis — is kept, the excerpt is dropped, and the position the caret was pointing at + * is said in words instead, because a user editing this file by hand needs it. + * + * `reasonOf` still does the work for anything that is not a TomlError: a thrower this + * reader did not anticipate must not become `[object Object]`. + */ +function oneLineReason(err) { + const diagnosis = reasonOf(err).split('\n')[0].trim(); + if (err instanceof TomlError) { + return `${diagnosis} at line ${err.line}, column ${err.column}`; + } + return diagnosis; +} +/** + * The result for a document that could not be read, or that declares nothing. + * + * `format` is reported on both of those paths, where `ProjectParser`'s equivalent + * (`emptyResult`) reports ''. The difference is real: a store that could not be walked + * never said which layout it was in, whereas this format is KNOWN even when the content + * is not — the caller dispatched on the file's NAME to get here. Blanking it would make a + * page that titles the view with the format show no format at all, for the one reason + * that has nothing to do with the format. + */ +function empty(name, warnings) { + return { + name, + format: TOML_FORMAT, + membersEnumerated: false, + files: [], + pathFolders: [], + labels: [], + references: [], + entryPoints: [], + entryPointGroups: [], + workingFolders: [], + warnings, + }; +} +// --------------------------------------------------------------------------------- +// Reading an edited document. +// +// Every access to `doc` goes through one of these four. They take `unknown` and answer +// with a usable value or with nothing, so the readers below contain no type tests and +// no `any` — which is what keeps "the user typed a number here" from being a throw in +// the middle of a walk, leaving a plausible-looking project missing arbitrary parts of +// itself. +/** + * A TOML table, or null for anything else. + * + * The `Array.isArray` test is load-bearing, not a formality: an array of tables — which + * is what `[[dependencies]]` writes — is an object too, and reading one AS a table + * finds every key absent. That would report a document declaring something this reader + * does not model as a document declaring nothing. + */ +function asTable(value) { + if (value === null || typeof value !== 'object' || Array.isArray(value)) { + return null; + } + return value; +} +/** The raw value at `key` of a table, or undefined when there is no table or no key. */ +function valueAt(table, key) { + return table ? table[key] : undefined; +} +/** The table at `key`, or null. `null` in gives `null` out, so these chain. */ +function tableAt(value, key) { + return asTable(valueAt(asTable(value), key)); +} +/** The string at `key`, or '' when it is absent, empty, or not a string. */ +function stringAt(value, key) { + const found = valueAt(asTable(value), key); + return typeof found === 'string' ? found : ''; +} +/** + * A field that may be written as one string or as a list of them, as a list. + * + * MATLAB writes every one of these as a TOML array, and a user editing the file by hand + * writes the single-entry case as a bare string about as often — `startup-files = + * "startup.m"` is valid TOML and means exactly one thing, so refusing it would drop the + * whole field rather than one entry of it. Non-string entries of a real array are + * skipped and not coerced: a number where a path belongs is not a path, and + * `String(42)` would put a member called `42` on a page. + */ +function asStringArray(value) { + if (typeof value === 'string') { + return [value]; + } + if (Array.isArray(value)) { + return value.filter((entry) => typeof entry === 'string'); + } + return []; +} +/** + * A file's basename with its last extension removed — the entry point's `name`. + * + * The three XML layouts record a `Name` attribute beside the `File` one and MATLAB + * writes the stem into it, so `startup_one.m` is the entry point `startup_one` in all + * four formats. This document has only the path, so the name is derived — and it is + * derived to the same string, which is what lets the parity suite compare the two + * parses field by field instead of per format. + */ +function stemOf(file) { + const base = basenameOf(file); + const ext = extOf(base); + // A name that is ALL extension (`.m`, `.gitignore`) has no stem to take, and an + // empty name is not something a gallery can show, so the basename stands in. + return ext && ext.length < base.length ? base.slice(0, -ext.length) : base; +} +// --------------------------------------------------------------------------------- +// The collections. +/** + * `[dependencies]` as project->project references. + * + * Only an entry whose value is a table carrying a string `path` is one, and everything + * else is skipped SILENTLY — which is deliberate and is the one place in this file + * where a warning would be wrong. `[dependencies]` is also where a MATLAB PACKAGE + * dependency goes, with a version constraint rather than a path (`someToolbox = + * "^1.2"`), so a bare string there is a valid entry of a kind this package does not + * model, not a malformed reference. Warning on it would put a count on every project + * that depends on a package — and a count that fires on healthy files is a count a + * host learns to hide. + */ +function readReferences(dependencies) { + const out = []; + for (const [key, value] of Object.entries(dependencies ?? {})) { + const path = stringAt(value, 'path'); + if (!path) { + continue; + } + // The key is both `id` and `name`, where the XML layouts carry a UUID and a + // basename. It is the only identity the format records, and it is the name MATLAB + // shows — a dependency is referred to by its key, not by the folder it resolves to. + out.push({ id: key, name: key, path }); + } + return out; +} +/** + * The startup files, the shutdown files, and the shortcuts — in that order. + * + * NO SORTING, which is the one thing worth stating positively here. `entryPoints` is + * documented as already being in run order, and in the XML layouts that order exists + * only as a linked list: each entry names its predecessor in a nested ``, spelled two different ways for the first entry, and + * `orderEntryPoints` is the walk that recovers it. A TOML array IS ordered, so the + * order is simply the order the keys were read in, and that whole mechanism has no + * counterpart in this file. + * + * The ids are SYNTHETIC. The XML layouts carry MATLAB's own UUID for each entry point + * and this format carries none, so these are built from the kind and the file (or the + * shortcut's key) to be unique within one parse — and that is all they are. They are + * not stable across a rename, and nothing may persist one as a handle on an entry + * point: renaming `startup_one.m` changes its id, where in an XML store it would not. + */ +function readEntryPoints(project) { + const out = []; + for (const kind of ['StartUp', 'Shutdown']) { + const key = kind === 'StartUp' ? 'startup-files' : 'shutdown-files'; + for (const file of asStringArray(valueAt(project, key))) { + // An entry naming no file is skipped, which is the XML reader's own guard + // (`if (!file && !name)`) reached by a different route: the name here is derived + // from the file, so an empty path leaves nothing to show and nothing to open. + if (!file) { + continue; + } + out.push({ + id: `${kind}:${file}`, + name: stemOf(file), + file, + kind, + // Startup and shutdown files are not shortcuts: MATLAB runs them and does not + // list them in the Shortcuts gallery, which is what `visible` answers. + visible: false, + groupId: '', + }); + } + } + for (const [name, value] of Object.entries(asTable(valueAt(project, 'shortcuts')) ?? {})) { + // A shortcut's path comes from a `{ path = "main.m" }` table and ALSO from a bare + // `main = "main.m"`, where the same shape under `[dependencies]` is skipped. The + // asymmetry is in the formats, not here: under `shortcuts` there is nothing else a + // string beside a key could mean, and under `dependencies` there is (a version + // constraint — see readReferences). + const file = typeof value === 'string' ? value : stringAt(value, 'path'); + // Kept even with no path resolved, unlike a startup file with no path: the KEY is + // the shortcut's name, so there is still a gallery entry the project declared, and + // dropping it would make a shortcut written in a shape this reader does not know + // disappear rather than read as a shortcut that needs its target fixed. + out.push({ id: `Basic:${name}`, name, file, kind: 'Basic', visible: true, groupId: '' }); + } + return out; +} +/** + * The folders the project designates for a purpose, under the XML store's own keys. + * + * In EXACTLY this order, which is why they are written out one at a time rather than + * looped: `parseProject` sorts its working folders by key, and these three keys sort + * into precisely this sequence, so emitting them in it is what lets the parity suite + * compare a TOML parse against an XML parse array-to-array with no sort on either side. + * A fourth key added later belongs in its sorted position, not at the end. + * + * The keys are the STORE's spelling and not this file's: `ProjectWorkingFolder.key` is + * documented as the raw purpose name, hosts match on it, and a format that spells the + * cache folder `cache-folder` must not hand a host a second name for one purpose. + */ +function readWorkingFolders(project, simulink) { + const out = []; + const add = (key, ref) => { + // Only when the source is a non-empty string. A purpose the project did not + // designate has no entry at all, where an entry with an empty `ref` would read as + // the project ROOT having been designated for it. + if (ref) { + out.push({ key, ref }); + } + }; + add('ProjectStartupFolder', stringAt(project, 'startup-folder')); + add('SimulinkCacheFolder', stringAt(simulink, 'cache-folder')); + add('SimulinkCodeGenFolder', stringAt(simulink, 'codegen-folder')); + return out; +} +/** + * `[project.labels.]` as the label catalog, with the files each was declared + * against. + * + * `readOnly: false` on every one of them is not a reading of an attribute. The format + * records no ownership at all, and MATLAB's conversion into it drops the built-in + * read-only `Classification` category entirely — the parity corpus measures that, along + * with the `LabelDataLoss` warning MATLAB raises saying so. So every label a document + * in this format can carry is one the project itself declared, which is exactly what + * `readOnly: false` means to the page that draws a built-in label differently. + * + * In FILE ORDER, and not sorted as the XML reader sorts its catalog. The two orders are + * not the same kind of thing: a store's order is its directory order, which means + * nothing and differed between layouts, where this one is the order a person wrote the + * categories down in. + */ +function readLabels(labels) { + const out = []; + for (const [category, value] of Object.entries(labels ?? {})) { + const table = asTable(value); + if (!table) { + continue; + } + for (const [name, declared] of Object.entries(table)) { + // `Category/Name` for an id, where the XML layouts carry a UUID: synthetic, like + // the entry-point ids, and unique because TOML cannot write one category or one + // label key twice. + out.push({ + id: `${category}/${name}`, + category, + name, + readOnly: false, + declaredFiles: asStringArray(declared), + }); + } + } + return out; +} +//# sourceMappingURL=TomlProject.js.map \ No newline at end of file diff --git a/dist/datamodel/parser/TomlProject.js.map b/dist/datamodel/parser/TomlProject.js.map new file mode 100644 index 0000000..615334b --- /dev/null +++ b/dist/datamodel/parser/TomlProject.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TomlProject.js","sourceRoot":"","sources":["../../../src/datamodel/parser/TomlProject.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,qCAAqC;AACrC,EAAE;AACF,wEAAwE;AACxE,EAAE;AACF,mFAAmF;AACnF,6EAA6E;AAC7E,uFAAuF;AACvF,qFAAqF;AACrF,wFAAwF;AACxF,uFAAuF;AACvF,oFAAoF;AACpF,EAAE;AACF,mFAAmF;AACnF,uFAAuF;AACvF,qFAAqF;AACrF,wFAAwF;AACxF,iFAAiF;AACjF,wFAAwF;AACxF,sFAAsF;AACtF,mDAAmD;AACnD,EAAE;AAC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,IAAI;gBACJ,QAAQ,EAAE,KAAK;gBACf,aAAa,EAAE,aAAa,CAAC,QAAQ,CAAC;aACvC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"} \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts index 3a174f4..656d7a5 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -25,6 +25,7 @@ export { parseMdl } from './datamodel/parser/MdlParser.js'; export { parseModel } from './datamodel/parser/ModelParser.js'; export { parseMat } from './datamodel/parser/MatParser.js'; export { parseProject } from './datamodel/parser/ProjectParser.js'; +export { parseTomlProject } from './datamodel/parser/TomlProject.js'; export type { ParsedProject, ProjectFile, ProjectLabel, ProjectReference, ProjectEntryPoint, ProjectEntryPointGroup, ProjectWorkingFolder, } from './datamodel/parser/ProjectParser.js'; export { buildProjectPage } from './datamodel/parser/ProjectPage.js'; export type { ProjectPage, ProjectPageRun, ProjectPageShortcut, ProjectPageLabel, ProjectPageCategory, ProjectPageLocation, ProjectPageReference, } from './datamodel/parser/ProjectPage.js'; @@ -34,7 +35,7 @@ export type { ParsedMat, MatVariable } from './datamodel/parser/MatParser.js'; export type { ParseWarning, ParseWarningCode } from './datamodel/parser/ParseWarning.js'; export { ingest } from './core/ingest.js'; export type { IngestContent, IngestOptions } from './core/ingest.js'; -export { extOf, basenameOf, refBasename, modelNameOf, refModelExt, projectNameOf, isModelFile, isSlddFile, isMatFile, isProjectFile, } from './datamodel/fileKinds.js'; +export { extOf, basenameOf, refBasename, modelNameOf, refModelExt, projectNameOf, projectFallbackName, isModelFile, isSlddFile, isMatFile, isProjectFile, isTomlProjectFile, TOML_PROJECT_FILE, } from './datamodel/fileKinds.js'; export { readSlddContent, slddChunkContent, isJsonTextBytes, normalizeRefNames } from './datamodel/parser/SlddContent.js'; export { scanSldd, type SlddScanResult } from './datamodel/parser/SlddScan.js'; export { scanMat, type MatScanResult } from './datamodel/parser/MatScan.js'; diff --git a/dist/index.d.ts.map b/dist/index.d.ts.map index 63f28f4..98e5fe5 100644 --- a/dist/index.d.ts.map +++ b/dist/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,uCAAuC,CAAC;AAG/C,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC3D,YAAY,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,QAAQ,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,KAAK,WAAW,MAAM,uBAAuB,CAAC;AAGrD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,YAAY,EAAE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAGzE,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAI5D,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAO1D,YAAY,EAAE,cAAc,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAO1F,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAY3D,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AACtG,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,YAAY,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAQjE,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,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kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAKrE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAWzE,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzE,YAAY,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAmBrD,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC1H,YAAY,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACvF,YAAY,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAczE,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAe7D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAqBvE,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AAGzE,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC"} \ No newline at end of file diff --git a/dist/index.js b/dist/index.js index c6a9e14..bcc97ab 100644 --- a/dist/index.js +++ b/dist/index.js @@ -56,6 +56,13 @@ export { parseMdl } from './datamodel/parser/MdlParser.js'; export { parseModel } from './datamodel/parser/ModelParser.js'; export { parseMat } from './datamodel/parser/MatParser.js'; export { parseProject } from './datamodel/parser/ProjectParser.js'; +// The reader for the fourth definition format, whose whole definition is one +// `matlab.toml` and which therefore has no store map to hand `parseProject`. Exported +// beside it for the consumer that has already read the file — a host that watched it +// change, or that holds the text in an editor buffer — and would otherwise have to wrap +// it back up in a one-entry map to get at the same result. `parseProject` still +// dispatches to this when it finds the file, so a host with a folder keeps one call. +export { parseTomlProject } from './datamodel/parser/TomlProject.js'; // The view model behind a project's MAIN PAGE, as opposed to a table of its files: a // `.prj` has no table worth showing (see ProjectPage.ts), and everything a page shows // around the file list — run order, shortcut groups, label coverage — is derived from @@ -79,7 +86,19 @@ export { ingest } from './core/ingest.js'; // takes a project NAME, not a filename, so every caller has to strip the `.prj` first — // this package before it builds a project's node tree, a host before it builds its own // index over the same parse. The result is a label a user reads on both sides. -export { extOf, basenameOf, refBasename, modelNameOf, refModelExt, projectNameOf, isModelFile, isSlddFile, isMatFile, isProjectFile, } from './datamodel/fileKinds.js'; +// `projectFallbackName` is what that reduction BECAME in R2026b, and the reason it is here +// rather than left to each caller. A project is now identified by an extension OR by a +// name: `matlab.toml` at the root is a whole project definition, and every project in that +// format spells its definition file identically — so the strip that answers `MyProj` for a +// marker answers "matlab" for all of them, and a host doing it itself would title every +// such project the same. The rule that works is the parent FOLDER's name, it needs the +// PATH rather than the basename, and it is one rule on two sides exactly as the other three +// are. `isProjectFile` is name-aware for the same reason — `isTomlProjectFile` and +// `TOML_PROJECT_FILE` are published so a host can tell WHICH of the two it has (they take +// different bytes: a zip store, or one text document) without spelling the name a fourth +// time, and without reaching for `.toml` as an extension, which would make every +// `Cargo.toml` in a workspace a MATLAB project. +export { extOf, basenameOf, refBasename, modelNameOf, refModelExt, projectNameOf, projectFallbackName, isModelFile, isSlddFile, isMatFile, isProjectFile, isTomlProjectFile, TOML_PROJECT_FILE, } from './datamodel/fileKinds.js'; // Reading a `.sldd` without a session: which of the two on-disk formats the bytes are, // where the content sits inside the result, and what a reference means. Public because a // consumer that scans dictionaries WITHOUT opening them — to index a folder, to resolve a diff --git a/dist/index.js.map b/dist/index.js.map index 30af86d..3df2ba4 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.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uF;AACvF,oEAAoE;AACpE,EAAE;AACF,mFAAmF;AACnF,wFAAwF;AACxF,0FAA0F;AAC1F,wFAAwF;AACxF,0FAA0F;AAC1F,EAAE;AACF,uFAAuF;AACvF,wFAAwF;AACxF,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAE1H,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAGvF,2FAA2F;AAC3F,4FAA4F;AAC5F,sFAAsF;AACtF,4FAA4F;AAC5F,4FAA4F;AAC5F,uEAAuE;AACvE,EAAE;AACF,0FAA0F;AAC1F,4FAA4F;AAC5F,wFAAwF;AACxF,0FAA0F;AAC1F,6CAA6C;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE7D,2FAA2F;AAC3F,0FAA0F;AAC1F,0FAA0F;AAC1F,0FAA0F;AAC1F,0FAA0F;AAC1F,kDAAkD;AAClD,EAAE;AACF,yFAAyF;AACzF,2FAA2F;AAC3F,qFAAqF;AACrF,2FAA2F;AAC3F,sFAAsF;AACtF,kFAAkF;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAGtD,0FAA0F;AAC1F,6FAA6F;AAC7F,2FAA2F;AAC3F,iFAAiF;AACjF,4FAA4F;AAC5F,4FAA4F;AAC5F,wEAAwE;AACxE,EAAE;AACF,2FAA2F;AAC3F,0FAA0F;AAC1F,sFAAsF;AACtF,0FAA0F;AAC1F,4FAA4F;AAC5F,0FAA0F;AAC1F,oDAAoD;AACpD,EAAE;AACF,6FAA6F;AAC7F,6FAA6F;AAC7F,+EAA+E;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index e044205..6a62284 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,17 @@ { "name": "data-explorer-core", - "version": "1.13.1", + "version": "1.34.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "data-explorer-core", - "version": "1.13.1", + "version": "1.34.0", "license": "BSD-3-Clause", "dependencies": { "fast-xml-parser": "^5.8.0", "fflate": "^0.8.3", + "smol-toml": "^1.9.0", "strnum": "^2.4.1" }, "devDependencies": { @@ -1306,6 +1307,18 @@ "dev": true, "license": "ISC" }, + "node_modules/smol-toml": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.9.0.tgz", + "integrity": "sha512-hpd+HLON7HdZXqYchMM/+LaTTbdK0AU3NngIJ4KVyWbY9bfQqdL9cD+4yf6dUoU2Ap4VsU0JkQi6FxAI1B2mXQ==", + "license": "BSD-3-Clause", + "engines": { + "node": ">= 18" + }, + "funding": { + "url": "https://github.com/sponsors/cyyynthia" + } + }, "node_modules/source-map-js": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", diff --git a/package.json b/package.json index 0030975..e0a36c8 100644 --- a/package.json +++ b/package.json @@ -67,6 +67,7 @@ "dependencies": { "fast-xml-parser": "^5.8.0", "fflate": "^0.8.3", + "smol-toml": "^1.9.0", "strnum": "^2.4.1" }, "devDependencies": { diff --git a/src/core/DataModel.ts b/src/core/DataModel.ts index 651ab61..8ee8228 100644 --- a/src/core/DataModel.ts +++ b/src/core/DataModel.ts @@ -15,7 +15,7 @@ import { serializeBinarySldd } from '../datamodel/parser/BinarySlddSerializer.js // The name reductions and the expression reading, from the leaf modules that hold the // single copy of each. This file used to spell all three itself; the usage index needs // the same three, and a rule stated twice is a rule that drifts (see fileKinds). -import { basenameOf, isMatFile, isSlddFile, modelNameOf, projectNameOf, refBasename } from '../datamodel/fileKinds.js'; +import { basenameOf, isMatFile, isSlddFile, modelNameOf, projectFallbackName, refBasename } from '../datamodel/fileKinds.js'; import { identifiersIn } from '../datamodel/expressions.js'; import { blockKey, blockLabel, joinBlockPath } from '../datamodel/blockIdentity.js'; import { maskDefining } from '../datamodel/maskScope.js'; @@ -412,16 +412,23 @@ function addProjectSource( meta?: Partial, ): ISourceNode { // srcId may be a full path or an opaque URI, so prefer meta.path when the host - // supplied one; either way the node is labelled with the basename, .prj included, - // because the tree shows a file. parseProject wants a project NAME rather than a - // filename for its fallback, hence the strip — note ProjectNode.fromParsed labels - // itself from the basename and never reads parsed.name, so the stripped form only - // shows up if a host calls parseProject itself. - // No `|| srcId` guard on the reduction: `basenameOf` returns the whole string when it - // finds no separator to cut at, so it is falsy only for input that was already empty — + // supplied one; either way the node is labelled with the basename, `.prj` or + // `matlab.toml` included, because the tree shows a file. parseProject wants a project + // NAME rather than a filename for its fallback, hence the reduction — note + // ProjectNode.fromParsed labels itself from the basename and never reads parsed.name, + // so the reduced form only shows up if a host calls parseProject itself. + // + // `projectFallbackName` over the whole PATH, not `projectNameOf` over the basename: + // the two agree on a `.prj`, and on a `matlab.toml` only the first one gets an answer + // worth showing. Every project in that format has a definition file of the same name, + // so stripping an extension titles all of them "matlab"; the rule that does not is the + // parent FOLDER's name, which needs the path and not the basename. + // No `|| srcId` guard on it: `basenameOf` returns the whole string when it finds no + // separator to cut at, so the basename is falsy only for input that was already empty — // in which case srcId is the empty string too and the fallback returned it unchanged. - const basename = basenameOf((meta && meta.path) || srcId); - const parsed = parseProject(files, projectNameOf(basename)); + const path = (meta && meta.path) || srcId; + const basename = basenameOf(path); + const parsed = parseProject(files, projectFallbackName(path)); const projectNode = ProjectNode.fromParsed(parsed, basename); return registerSource(srcId, projectNode, meta, parsed.warnings); } diff --git a/src/core/ingest.ts b/src/core/ingest.ts index da76a8e..93d5289 100644 --- a/src/core/ingest.ts +++ b/src/core/ingest.ts @@ -8,7 +8,16 @@ import { strFromU8 } from 'fflate'; import { unzipEntries } from '../datamodel/parser/Inflate.js'; -import { basenameOf, extOf, isMatFile, isModelFile, isProjectFile, isSlddFile } from '../datamodel/fileKinds.js'; +import { + basenameOf, + extOf, + isMatFile, + isModelFile, + isProjectFile, + isSlddFile, + isTomlProjectFile, + TOML_PROJECT_FILE, +} from '../datamodel/fileKinds.js'; import { readSlddContent } from '../datamodel/parser/SlddContent.js'; import type { ParseWarning } from '../datamodel/parser/ParseWarning.js'; import type { Session } from './DataModel.js'; @@ -76,6 +85,26 @@ export function ingest(session: Session, content: IngestContent, opts: IngestOpt return session.addMatSource(id, requireBinary(content, ext), meta); } + // A `matlab.toml` project BEFORE the `.prj` branch, because the two arrive as + // different kinds of bytes entirely: a `.prj` is a zip whose entries are the store, + // and this is one TOML document that is the whole definition. `isProjectFile` is true + // for both (R2026b gave a project two spellings), so unzipping first would meet a + // text file and fail with "invalid zip data" on a project that is perfectly healthy. + if (isTomlProjectFile(filename)) { + // Bytes are decoded rather than refused: a host reading a file off disk hands over + // bytes without caring which of the five formats it just read, and this is the one + // project format whose content is text. An already-parsed object is the one shape + // this cannot take — there is no parsed form of a project the way there is of a + // dictionary — and `requireBinary` is what says so. + const text = + typeof content === 'string' ? content : strFromU8(new Uint8Array(requireBinary(content, ext))); + // The definition map a project source takes, with its one entry under the name + // `parseProject` dispatches on. The key is the FILE NAME and not `filename`, which + // may be a whole path: either would dispatch (the match is by basename), but the + // part this names in a warning should be the file, not the host's path to it. + return session.addProjectSource(id, { [TOML_PROJECT_FILE]: text }, meta); + } + if (isProjectFile(filename)) { const entries = unzipEntries(new Uint8Array(requireBinary(content, ext))); const files: Record = {}; @@ -83,5 +112,11 @@ export function ingest(session: Session, content: IngestContent, opts: IngestOpt return session.addProjectSource(id, files, meta); } - throw new Error(`ingest: unsupported extension "${ext}" for "${filename}" (expected .sldd/.slx/.mdl/.mat/.prj)`); + // The list names the four extensions AND the one file NAME, because a project is now + // identified either way (see isProjectFile) — and a list that reads as exhaustive while + // omitting one of the five things this function accepts is worse than no list. + throw new Error( + `ingest: unsupported extension "${ext}" for "${filename}" ` + + `(expected .sldd/.slx/.mdl/.mat/.prj, or a file named ${TOML_PROJECT_FILE})`, + ); } diff --git a/src/datamodel/fileKinds.ts b/src/datamodel/fileKinds.ts index 7b60f21..6fad9ca 100644 --- a/src/datamodel/fileKinds.ts +++ b/src/datamodel/fileKinds.ts @@ -100,9 +100,41 @@ export function isMatFile(filename: string): boolean { return extOf(filename) === '.mat'; } -/** True if `filename` names a MATLAB project. */ +/** + * The name of the one file a TOML-format project's entire definition lives in. + * + * The ONE place this name is spelled in the package, and it earns that because it is + * not only a kind test: `ingest` keys the content it hands a session on it, + * `parseProject` dispatches on finding it among a store's entries, and + * `parseTomlProject` names it in the warnings it reports. Three independent literals + * that must agree is the shape this module exists to prevent. + */ +export const TOML_PROJECT_FILE = 'matlab.toml'; + +/** True if `filename` names a TOML-format project definition. */ +export function isTomlProjectFile(filename: string): boolean { + return basenameOf(filename).toLowerCase() === TOML_PROJECT_FILE; +} + +/** + * True if `filename` names a MATLAB project. + * + * The only kind test here that answers from EITHER an extension or a NAME, because + * R2026b gave a project two spellings: the long-standing `.prj` marker beside a + * `resources/project/` store, and `matlab.toml` at the project root with no marker and + * no store at all (`matlab.project.DefinitionFiles.Toml` deletes both). Both are a + * project to a host listing a folder, admitting a drop or labelling a tab, so both are + * a project here. + * + * It is that NAME and emphatically not the `.toml` EXTENSION, which is the whole reason + * `isTomlProjectFile` exists rather than another line beside `.prj`. TOML is the + * configuration format of half the tooling a MATLAB repository sits beside, so admitting + * the extension would make every `Cargo.toml`, `pyproject.toml` and `ruff.toml` in a + * workspace a MATLAB project — offered for opening, parsed as a project definition, and + * then reported as a project that declares nothing. + */ export function isProjectFile(filename: string): boolean { - return extOf(filename) === '.prj'; + return extOf(filename) === '.prj' || isTomlProjectFile(filename); } /** @@ -125,3 +157,41 @@ export function isProjectFile(filename: string): boolean { export function projectNameOf(filename: string): string { return filename.replace(/\.prj$/i, ''); } + +/** + * The name to call a project whose own definition records none, given the path of the + * marker file that definition was found through. + * + * `projectNameOf`'s warning is exactly why this is one function here rather than a rule + * each host re-derives: the reduction is made on two paths that must not disagree — + * this package makes it when adding a project source to a session, a host makes it + * again for whatever index it builds over `parseProject` — and the result is a label a + * user reads on both, so a drift shows up as one project appearing under two names. + * Until R2026b the rule was small enough to be invisible and was duplicated anyway; + * what made it worth naming is that it is no longer one rule. + * + * For a `matlab.toml` the name is the basename of the marker's PARENT FOLDER, because + * the file is called `matlab.toml` in every project that has one — the stem reduction + * that serves a marker (`MyProj.prj` -> `MyProj`) answers "matlab" for all of them, and + * a host stripping the extension itself would title every such project identically. The + * parent folder is what MATLAB calls a project it was handed the root of. + * + * Anything else delegates to `projectNameOf`, so `.prj` behaviour is bit-for-bit what + * it was before this existed. + * + * Pure string work, splitting on both separators so a Windows path needs no cleanup — + * and deliberately NOT `node:path`, because this module is reachable from the browser + * barrel (see test/moduleBoundaries.test.ts). + */ +export function projectFallbackName(markerPath: string): string { + if (!isTomlProjectFile(markerPath)) { + return projectNameOf(basenameOf(markerPath)); + } + const segments = markerPath.split(/[\\/]/).filter((segment) => segment.length > 0); + const parent = segments.length >= 2 ? segments[segments.length - 2] : ''; + // '' when there is no parent segment to read, and the same for the two segments that + // are a direction rather than a name: a path written relative to the cwd has `.` or + // `..` where the folder name would be, and titling a project with either is worse + // than admitting there is no name here to be had. + return parent === '.' || parent === '..' ? '' : parent; +} diff --git a/src/datamodel/parser/ProjectPage.ts b/src/datamodel/parser/ProjectPage.ts index 86752ee..99c33cf 100644 --- a/src/datamodel/parser/ProjectPage.ts +++ b/src/datamodel/parser/ProjectPage.ts @@ -40,10 +40,28 @@ export interface ProjectPageShortcut { export interface ProjectPageLabel { id: string; name: string; - /** Members carrying this label. 0 is meaningful — a defined but unused label. */ - count: number; + /** + * Members carrying this label. 0 is meaningful — a defined but unused label. + * + * `null` when the format records no member list (see `ProjectPage.memberCount`, which + * carries the full reasoning). There are no member assignments to count, so the only + * honest answer is "unknown", and 0 would claim the opposite of what `declaredFiles` + * is about to show on the very same chip — a label declared against three paths, drawn + * as used by nothing. Do not default it. + */ + count: number | null; /** Defined by this project rather than shipped by MATLAB. */ custom: boolean; + /** + * The files or patterns this label was declared AGAINST, as written. + * + * Carried straight through from `ProjectLabel.declaredFiles`, so `[]` on every XML + * layout — those stores assign labels the other way round, per member file, and + * `count` is the whole story there. For a `matlab.toml` project it is the only thing a + * page can say about a label's reach, which is why it stands IN PLACE OF the count + * rather than beside it. + */ + declaredFiles: string[]; } export interface ProjectPageCategory { @@ -77,10 +95,36 @@ export interface ProjectPage { format: string; /** English for `format` — what a MATLAB user sees in Project Settings. */ formatLabel: string; - /** Every member, folders included: what the project "contains". */ - memberCount: number; - /** Members carrying at least one label — the numerator of label coverage. */ - labelledCount: number; + /** + * Every member, folders included: what the project "contains". `null` when the FORMAT + * records no member list — `ParsedProject.membersEnumerated` false, which today means + * a `matlab.toml` project. + * + * `null` rather than 0, and this is the entire reason the field is nullable: 0 is a + * sentence, "this project contains nothing", and for a format whose members are "every + * file under the project root" that sentence is false about a project holding hundreds + * of them. The maintainer's decision is to declare only what the file declares — no + * folder walk to synthesize a membership the document does not have — so the page shows + * no count at all. A maintainer tidying the nullability away by defaulting to 0 would + * be re-introducing precisely the false claim this exists to remove. + * + * `null` also costs nothing to honour downstream: the consuming webview's `esc()` takes + * `string | number`, so a `null` reaching it is a compile error AT THE CALL SITE, which + * forces a renderer to branch rather than print 'null'. A sentinel like -1 would have + * type-checked and shipped. + * + * A damaged XML store still reports 0 here, which is correct — it enumerated nothing, + * as against a format that enumerates nothing. See `membersEnumerated`. + */ + memberCount: number | null; + /** + * Members carrying at least one label — the numerator of label coverage. `null` under + * the same condition as `memberCount`, and for the same reason: with no denominator + * there is no fraction to show, and "0 of 0 labelled" says something false about a + * project whose labels name files nothing enumerated. What those labels WERE declared + * against is on `ProjectPageLabel.declaredFiles`, which is what a page shows instead. + */ + labelledCount: number | null; /** In run order. */ startup: ProjectPageRun[]; /** In run order. */ @@ -149,8 +193,13 @@ export function buildProjectPage(parsed: ParsedProject): ProjectPage { name: parsed.name, format: parsed.format, formatLabel: FORMAT_LABEL[parsed.format] ?? parsed.format, - memberCount: parsed.files.length, - labelledCount: parsed.files.filter((f) => f.labels.length > 0).length, + // `null`, not the length of an empty list: a format that records no member list has + // no number to report here, and reporting one derived from `files: []` would state + // something about the project that the document never said. See the two fields. + memberCount: parsed.membersEnumerated ? parsed.files.length : null, + labelledCount: parsed.membersEnumerated + ? parsed.files.filter((f) => f.labels.length > 0).length + : null, startup: runsOf(STARTUP), shutdown: runsOf(SHUTDOWN), shortcuts: shortcutsOf(parsed.entryPoints, groupNames), @@ -213,8 +262,16 @@ function shortcutsOf( * (written by a release that knew it, or by a hand-edited store). Such an id is * counted under a category named for it, so the coverage figure stays consistent * with `labelledCount` instead of quietly excluding files it includes. + * + * Which is also why there are no counts AT ALL when the format records no member list: + * the assignments the counts are made of are the thing that format does not have, so + * every `count` here is `null` and the ordering falls back to the name. The catalog + * itself survives — a `matlab.toml` declares its labels plainly, with the files each was + * declared against — so the page still lists them, just without a number none of them + * has. See `ProjectPage.memberCount` for why that is not 0. */ function categoriesOf(parsed: ParsedProject): ProjectPageCategory[] { + const enumerated = parsed.membersEnumerated; const counts = new Map(); for (const file of parsed.files) { // Per file, not per assignment: `parsed.files` already de-duplicates a file's @@ -240,21 +297,41 @@ function categoriesOf(parsed: ParsedProject): ProjectPageCategory[] { push(l.category, { id: l.id, name: l.name, - count: counts.get(l.id) ?? 0, + count: enumerated ? counts.get(l.id) ?? 0 : null, custom: !l.readOnly, + declaredFiles: l.declaredFiles, }); } - for (const [id, count] of counts) { - if (!defined.has(id)) { - push('', { id, name: id, count, custom: true }); + // The synthetic pass: ids the members carry that the catalog does not define. Guarded + // on `enumerated` rather than left to come out empty on its own — `counts` is built + // from `parsed.files`, which is empty for an unenumerated format, so the loop would + // not run anyway, and a reader should not have to derive that to know this pass has + // nothing to reconcile when there are no assignments to reconcile it against. + if (enumerated) { + for (const [id, count] of counts) { + if (!defined.has(id)) { + // No `declaredFiles`: this id exists only because a member carries it, so there + // is no catalog entry it could have been declared on. + push('', { id, name: id, count, custom: true, declaredFiles: [] }); + } } } // Used labels first, then by name: the seven built-ins ship with every project // and most stay at zero, so catalog order buries the two or three that say // something about THIS project under five that say nothing about any. + // + // Name alone when the counts are `null`, which they are all together or not at all + // since they come from the one `enumerated`: an unknown usage is not a zero usage, so + // there is nothing to put first, and `count ?? 0` here would quietly order every label + // as if it were known to be unused. The `null` test is also what proves to the type + // checker that the subtraction only ever sees numbers. for (const labels of byCategory.values()) { - labels.sort((a, b) => b.count - a.count || a.name.localeCompare(b.name)); + labels.sort((a, b) => + a.count === null || b.count === null + ? a.name.localeCompare(b.name) + : b.count - a.count || a.name.localeCompare(b.name), + ); } return [...byCategory.entries()].map(([name, labels]) => ({ name, labels })); } diff --git a/src/datamodel/parser/ProjectParser.ts b/src/datamodel/parser/ProjectParser.ts index 5fc6644..eb02929 100644 --- a/src/datamodel/parser/ProjectParser.ts +++ b/src/datamodel/parser/ProjectParser.ts @@ -1,7 +1,9 @@ // Copyright 2026 The MathWorks, Inc. import { readProjectXml, ATTRIBUTE_PREFIX, TEXT_KEY } from './XmlReader.js'; +import { isTomlProjectFile } from '../fileKinds.js'; import { reasonOf, type ParseWarning } from './ParseWarning.js'; +import { parseTomlProject } from './TomlProject.js'; /** A member file (or folder) of the project. */ export interface ProjectFile { @@ -24,6 +26,17 @@ export interface ProjectLabel { * itself added is not, which is the only thing distinguishing the two. */ readOnly: boolean; + /** + * The files or patterns this label was declared AGAINST, as written. + * + * Empty on every XML layout, and that is a fact about those layouts rather than a + * gap: a store assigns labels the other way round, per member file + * (`ProjectFile.labels`), so the catalog entry has nothing to point back at. The + * `matlab.toml` format inverts it — the label declares its files, and the format + * records no member list for them to have been declared on — which is why this + * field exists at all and why it is the only place those paths can live. + */ + declaredFiles: string[]; } /** A project-to-project reference. */ @@ -94,8 +107,33 @@ export interface ParsedProject { * Three are read: `fixedPathV2`, `distributed` and `monolithic`. Anything else is * reported through `warnings` rather than read, because guessing at a layout * produces a project that looks complete and is not. + * + * Plus `toml`, which is the one value here that is NOT a declared `MetadataType`: + * a `matlab.toml` project has no store and nothing in it to declare, so the value + * is this package's own name for the format (see TomlProject.ts). It is in the same + * field because what a consumer does with it is the same — a page titles the view + * with it, a host decides what it can write back — and a second field would make + * every one of them ask twice. */ format: string; + /** + * Whether this FORMAT records a member list — not whether any members were found. + * + * The distinction is the whole point of the field. `files: []` from an XML store is a + * claim about the project: the store enumerates its members and enumerated none, so + * "0 files" is true. `files: []` from a `matlab.toml` is a claim about the format: + * it records no member list at all (MATLAB's rule is that the project root's files + * ARE the members, which is about the filesystem and not about the document), so "0 + * files" would be a sentence the reader is not entitled to say. A host showing a + * count or an empty-state message needs to tell those two apart, and nothing else in + * this result does. + * + * True on every XML path, `emptyResult` included: a damaged store enumerated nothing, + * which is a different thing from a format that enumerates nothing, and the + * `memberCount: 0` a host already shows for a damaged store is correct and must not + * change. + */ + membersEnumerated: boolean; files: ProjectFile[]; /** * Folders added to the MATLAB path, project-root-relative. The project ROOT @@ -256,6 +294,9 @@ function emptyResult(name: string, warnings: ParseWarning[]): ParsedProject { return { name, format: '', + // True even here: this is an XML store that could not be walked, and an XML store + // is a format that enumerates its members. See the field. + membersEnumerated: true, files: [], pathFolders: [], labels: [], @@ -268,19 +309,41 @@ function emptyResult(name: string, warnings: ParseWarning[]): ParsedProject { } /** - * Parse a MATLAB/Simulink Project content store. + * Parse a MATLAB/Simulink Project definition. * - * `files` maps POSIX relpaths (relative to the project root) to file text. - * Only entries under `resources/project/` are read. Never throws: on any - * failure it returns a minimally-populated result with the fallback name — and - * says so in `result.warnings`, which is the only thing separating that result - * from a project which genuinely holds nothing. + * `files` maps POSIX relpaths (relative to the project root) to file text. Of an XML + * store only entries under `resources/project/` are read; a `matlab.toml` is read + * wherever in the map it is, and is the whole definition when present. Never throws: on + * any failure it returns a minimally-populated result with the fallback name — and says + * so in `result.warnings`, which is the only thing separating that result from a project + * which genuinely holds nothing. + * + * `projectName` is the name for a definition that records none, and should come from + * `projectFallbackName` rather than from a reduction of the caller's own: for a + * `matlab.toml` the answer is the parent FOLDER, and stripping an extension there names + * every such project "matlab". */ export function parseProject(files: Record, projectName: string): ParsedProject { const warnings: ParseWarning[] = []; const result = emptyResult(projectName, warnings); try { + // The TOML format first, before any of the store walking below, because it is not a + // layout of the store this function walks — it is the absence of one. MATLAB writes + // the file at the project ROOT and deletes `resources/` with the `.prj`, so the key + // is normally just `matlab.toml`; matched by basename anyway, since a host building + // this map from a directory may well key it by a longer path. + // + // INSIDE the try, not above it, and that is not incidental: `files` itself is + // whatever a host handed over, and `parseProject(null)` is a documented case that + // must come back as a `source-unreadable` result rather than a throw. The catch is + // what makes that true, so nothing may touch `files` outside it. + for (const [relPath, content] of Object.entries(files)) { + if (isTomlProjectFile(relPath)) { + return parseTomlProject(content, projectName); + } + } + // Index every parseable Info doc by its relpath (project-relative). const index = new Map(); // The one document of a `monolithic` store, when this store is one. A store holds @@ -321,33 +384,15 @@ export function parseProject(files: Record, projectName: string) // whole result is empty — and a `.prj` always has a store, so reaching here // is either the wrong kind of file or a store that did not survive its trip. // - // Except for one case worth naming separately: a store MATLAB wrote in its - // `matlab.toml` format holds no XML at all, so it lands here looking exactly - // like damage. It is not damaged, it is a format this reader does not read, - // and a user told "nothing readable" would go looking for a corrupt file. - const toml = Object.keys(files).find( - (k) => k.startsWith(PROJECT_PREFIX) && k.slice(PROJECT_PREFIX.length).endsWith('matlab.toml'), - ); - warnings.push( - toml - ? { - // 'source-empty' rather than a code of its own: the code is the kind of - // loss (the source opened and held nothing this reader recognizes) and - // the message is which, per ParseWarningCode's note that the codes are - // about containers and parts and not about any one format. - code: 'source-empty', - message: - 'This project stores its metadata as matlab.toml, which this viewer cannot read yet, ' + - 'so this project reads as empty. In MATLAB, Project Settings can save it as XML instead.', - part: toml, - } - : { - code: 'source-empty', - message: - 'No readable project entries were found under resources/project/, ' + - 'so this project reads as empty.', - }, - ); + // A `matlab.toml` definition used to land here too, looking exactly like damage + // for want of a reader; it now returns at the top of this function, so what is + // left under this branch really is a store holding nothing readable. + warnings.push({ + code: 'source-empty', + message: + 'No readable project entries were found under resources/project/, ' + + 'so this project reads as empty.', + }); return result; } @@ -1008,7 +1053,15 @@ function readCategories(layout: Layout, collection: Entity): ProjectLabel[] { // which the project page draws as a built-in. A missing attribute is // writable, which is how a hand-made label in an older store spells it. const ro = labelEnt.def?.['@_ReadOnly']; - out.push({ id, category: categoryName, name, readOnly: ro === 'READ_ONLY' || ro === '1' }); + out.push({ + id, + category: categoryName, + name, + readOnly: ro === 'READ_ONLY' || ro === '1', + // Always empty from a store: it assigns labels per member file, so the + // catalog entry has no file list of its own. See `ProjectLabel.declaredFiles`. + declaredFiles: [], + }); } } } diff --git a/src/datamodel/parser/TomlProject.ts b/src/datamodel/parser/TomlProject.ts new file mode 100644 index 0000000..39a9a17 --- /dev/null +++ b/src/datamodel/parser/TomlProject.ts @@ -0,0 +1,397 @@ +// src/datamodel/parser/TomlProject.ts +// Copyright 2026 The MathWorks, Inc. +// +// The fourth project metadata format, and the only one that is not XML. +// +// R2026b's `matlab.project.DefinitionFiles.Toml` puts a project's whole definition +// into ONE hand-editable `matlab.toml` at the project root, and deletes both +// `resources/` and the `.prj` marker with it. There is no content store to walk, +// no pointer/def document pairs, no entity UUIDs and no linked lists — so nothing in +// ProjectParser's machinery applies, and this is a separate reader rather than a fourth +// `Layout` in that file. What the two share is the RESULT: `ParsedProject`, so a page, +// a node tree and a host see one project shape whichever of the four it arrived as. +// +// WHAT THE FORMAT DOES NOT RECORD is the thing to keep in mind while reading this. +// MATLAB's own conversion into it warns `MATLAB:Project:Issues:LabelDataLoss`, and the +// parity corpus measures the rest: no member list, no label ownership, no label data +// type, no entity UUIDs, and the Simulink working folders survive as paths with nothing +// saying what they are for. So several fields here are empty or synthetic BY THE +// FORMAT rather than by omission, and each says so where it is built — a maintainer who +// read `files: []` as an oversight and "fixed" it by walking the project folder would +// be inventing a member list MATLAB does not have. +// +// Never throws, like every reader here, and for a sharper reason than the others: this +// is the one format a user EDITS. A number where a path belongs, a string where a table +// belongs, a key spelled the way last year's release spelled it — all of those are +// ordinary states of a real file, so every read goes through a helper that tolerates +// the wrong type, and what could not be read is said in `warnings` instead. + +import { parse, TomlError } from 'smol-toml'; +import { basenameOf, extOf, TOML_PROJECT_FILE } from '../fileKinds.js'; +import { reasonOf, type ParseWarning } from './ParseWarning.js'; +import type { + ParsedProject, + ProjectEntryPoint, + ProjectLabel, + ProjectReference, + ProjectWorkingFolder, +} from './ProjectParser.js'; + +/** This reader's value for `ParsedProject.format`. See that field. */ +const TOML_FORMAT = 'toml'; + +/** + * The top-level keys that make a document a project definition at all. + * + * A file carrying none of them declares nothing, which is reported (see the + * `source-empty` warning below) — and this is the list because it is every key this + * reader reads. A document holding only keys NOT on it is a newer release's or a + * hand-written future one, and that is still a project declaring settings, so it must + * not be reported as empty; the test is "none of these", not "nothing we model". + */ +const DECLARING_KEYS = ['name', 'folders', 'dependencies', 'project', 'simulink']; + +/** + * Read a project whose entire definition is one `matlab.toml`. + * + * `text` is the file's content and `fallbackName` the project's name for a document + * that records none — see `projectFallbackName`, which is where a caller gets one that + * agrees with the rest of the package. Never throws: on a document that will not parse + * it returns an empty project that says so in `warnings`, which is the only thing + * separating that result from a project which genuinely holds nothing. + */ +export function parseTomlProject(text: string, fallbackName: string): ParsedProject { + let doc: Record; + try { + doc = parse(text); + } catch (err) { + return empty(fallbackName, [ + { + code: 'source-unreadable', + message: + `${TOML_PROJECT_FILE} could not be read (${oneLineReason(err)}), ` + + 'so this project reads as empty.', + part: TOML_PROJECT_FILE, + }, + ]); + } + + if (!DECLARING_KEYS.some((key) => key in doc)) { + return empty(fallbackName, [ + { + code: 'source-empty', + message: + `${TOML_PROJECT_FILE} declares no project settings, so this project reads as empty.`, + part: TOML_PROJECT_FILE, + }, + ]); + } + + const project = tableAt(doc, 'project'); + + return { + name: stringAt(doc, 'name') || fallbackName, + format: TOML_FORMAT, + // The format records no member list at all — MATLAB's own documentation of it says + // "by default, all files in the project root folder are project files", which is a + // rule about the FILESYSTEM and not a list in this document. So this reader cannot + // answer which files belong, and `membersEnumerated: false` is how it says that + // rather than reporting a project with zero members, which is a different claim. + membersEnumerated: false, + files: [], + pathFolders: asStringArray(valueAt(tableAt(doc, 'folders'), 'path')), + labels: readLabels(tableAt(project, 'labels')), + references: readReferences(tableAt(doc, 'dependencies')), + entryPoints: readEntryPoints(project), + // The format has no equivalent of the XML store's EntryPointGroups: every shortcut + // sits under one `[project.shortcuts]` table with nowhere to name a gallery group. + entryPointGroups: [], + workingFolders: readWorkingFolders(project, tableAt(doc, 'simulink')), + warnings: [], + }; +} + +/** + * Why the parse failed, as ONE line. + * + * `reasonOf` alone is not enough here, and this is the only reader where that is true. + * `ParseWarning.message` is documented as one host-renderable line, and smol-toml's + * message is three or more: it appends a code excerpt with a caret under the offending + * character, which is exactly right in a terminal and arrives in a tree row, a tooltip or + * a notification as ASCII art with the diagnosis scrolled off. So the first line — the + * diagnosis — is kept, the excerpt is dropped, and the position the caret was pointing at + * is said in words instead, because a user editing this file by hand needs it. + * + * `reasonOf` still does the work for anything that is not a TomlError: a thrower this + * reader did not anticipate must not become `[object Object]`. + */ +function oneLineReason(err: unknown): string { + const diagnosis = reasonOf(err).split('\n')[0].trim(); + if (err instanceof TomlError) { + return `${diagnosis} at line ${err.line}, column ${err.column}`; + } + return diagnosis; +} + +/** + * The result for a document that could not be read, or that declares nothing. + * + * `format` is reported on both of those paths, where `ProjectParser`'s equivalent + * (`emptyResult`) reports ''. The difference is real: a store that could not be walked + * never said which layout it was in, whereas this format is KNOWN even when the content + * is not — the caller dispatched on the file's NAME to get here. Blanking it would make a + * page that titles the view with the format show no format at all, for the one reason + * that has nothing to do with the format. + */ +function empty(name: string, warnings: ParseWarning[]): ParsedProject { + return { + name, + format: TOML_FORMAT, + membersEnumerated: false, + files: [], + pathFolders: [], + labels: [], + references: [], + entryPoints: [], + entryPointGroups: [], + workingFolders: [], + warnings, + }; +} + +// --------------------------------------------------------------------------------- +// Reading an edited document. +// +// Every access to `doc` goes through one of these four. They take `unknown` and answer +// with a usable value or with nothing, so the readers below contain no type tests and +// no `any` — which is what keeps "the user typed a number here" from being a throw in +// the middle of a walk, leaving a plausible-looking project missing arbitrary parts of +// itself. + +/** + * A TOML table, or null for anything else. + * + * The `Array.isArray` test is load-bearing, not a formality: an array of tables — which + * is what `[[dependencies]]` writes — is an object too, and reading one AS a table + * finds every key absent. That would report a document declaring something this reader + * does not model as a document declaring nothing. + */ +function asTable(value: unknown): Record | null { + if (value === null || typeof value !== 'object' || Array.isArray(value)) { + return null; + } + return value as Record; +} + +/** The raw value at `key` of a table, or undefined when there is no table or no key. */ +function valueAt(table: Record | null, key: string): unknown { + return table ? table[key] : undefined; +} + +/** The table at `key`, or null. `null` in gives `null` out, so these chain. */ +function tableAt(value: unknown, key: string): Record | null { + return asTable(valueAt(asTable(value), key)); +} + +/** The string at `key`, or '' when it is absent, empty, or not a string. */ +function stringAt(value: unknown, key: string): string { + const found = valueAt(asTable(value), key); + return typeof found === 'string' ? found : ''; +} + +/** + * A field that may be written as one string or as a list of them, as a list. + * + * MATLAB writes every one of these as a TOML array, and a user editing the file by hand + * writes the single-entry case as a bare string about as often — `startup-files = + * "startup.m"` is valid TOML and means exactly one thing, so refusing it would drop the + * whole field rather than one entry of it. Non-string entries of a real array are + * skipped and not coerced: a number where a path belongs is not a path, and + * `String(42)` would put a member called `42` on a page. + */ +function asStringArray(value: unknown): string[] { + if (typeof value === 'string') { + return [value]; + } + if (Array.isArray(value)) { + return value.filter((entry): entry is string => typeof entry === 'string'); + } + return []; +} + +/** + * A file's basename with its last extension removed — the entry point's `name`. + * + * The three XML layouts record a `Name` attribute beside the `File` one and MATLAB + * writes the stem into it, so `startup_one.m` is the entry point `startup_one` in all + * four formats. This document has only the path, so the name is derived — and it is + * derived to the same string, which is what lets the parity suite compare the two + * parses field by field instead of per format. + */ +function stemOf(file: string): string { + const base = basenameOf(file); + const ext = extOf(base); + // A name that is ALL extension (`.m`, `.gitignore`) has no stem to take, and an + // empty name is not something a gallery can show, so the basename stands in. + return ext && ext.length < base.length ? base.slice(0, -ext.length) : base; +} + +// --------------------------------------------------------------------------------- +// The collections. + +/** + * `[dependencies]` as project->project references. + * + * Only an entry whose value is a table carrying a string `path` is one, and everything + * else is skipped SILENTLY — which is deliberate and is the one place in this file + * where a warning would be wrong. `[dependencies]` is also where a MATLAB PACKAGE + * dependency goes, with a version constraint rather than a path (`someToolbox = + * "^1.2"`), so a bare string there is a valid entry of a kind this package does not + * model, not a malformed reference. Warning on it would put a count on every project + * that depends on a package — and a count that fires on healthy files is a count a + * host learns to hide. + */ +function readReferences(dependencies: Record | null): ProjectReference[] { + const out: ProjectReference[] = []; + for (const [key, value] of Object.entries(dependencies ?? {})) { + const path = stringAt(value, 'path'); + if (!path) { + continue; + } + // The key is both `id` and `name`, where the XML layouts carry a UUID and a + // basename. It is the only identity the format records, and it is the name MATLAB + // shows — a dependency is referred to by its key, not by the folder it resolves to. + out.push({ id: key, name: key, path }); + } + return out; +} + +/** + * The startup files, the shutdown files, and the shortcuts — in that order. + * + * NO SORTING, which is the one thing worth stating positively here. `entryPoints` is + * documented as already being in run order, and in the XML layouts that order exists + * only as a linked list: each entry names its predecessor in a nested ``, spelled two different ways for the first entry, and + * `orderEntryPoints` is the walk that recovers it. A TOML array IS ordered, so the + * order is simply the order the keys were read in, and that whole mechanism has no + * counterpart in this file. + * + * The ids are SYNTHETIC. The XML layouts carry MATLAB's own UUID for each entry point + * and this format carries none, so these are built from the kind and the file (or the + * shortcut's key) to be unique within one parse — and that is all they are. They are + * not stable across a rename, and nothing may persist one as a handle on an entry + * point: renaming `startup_one.m` changes its id, where in an XML store it would not. + */ +function readEntryPoints(project: Record | null): ProjectEntryPoint[] { + const out: ProjectEntryPoint[] = []; + + for (const kind of ['StartUp', 'Shutdown']) { + const key = kind === 'StartUp' ? 'startup-files' : 'shutdown-files'; + for (const file of asStringArray(valueAt(project, key))) { + // An entry naming no file is skipped, which is the XML reader's own guard + // (`if (!file && !name)`) reached by a different route: the name here is derived + // from the file, so an empty path leaves nothing to show and nothing to open. + if (!file) { + continue; + } + out.push({ + id: `${kind}:${file}`, + name: stemOf(file), + file, + kind, + // Startup and shutdown files are not shortcuts: MATLAB runs them and does not + // list them in the Shortcuts gallery, which is what `visible` answers. + visible: false, + groupId: '', + }); + } + } + + for (const [name, value] of Object.entries(asTable(valueAt(project, 'shortcuts')) ?? {})) { + // A shortcut's path comes from a `{ path = "main.m" }` table and ALSO from a bare + // `main = "main.m"`, where the same shape under `[dependencies]` is skipped. The + // asymmetry is in the formats, not here: under `shortcuts` there is nothing else a + // string beside a key could mean, and under `dependencies` there is (a version + // constraint — see readReferences). + const file = typeof value === 'string' ? value : stringAt(value, 'path'); + // Kept even with no path resolved, unlike a startup file with no path: the KEY is + // the shortcut's name, so there is still a gallery entry the project declared, and + // dropping it would make a shortcut written in a shape this reader does not know + // disappear rather than read as a shortcut that needs its target fixed. + out.push({ id: `Basic:${name}`, name, file, kind: 'Basic', visible: true, groupId: '' }); + } + + return out; +} + +/** + * The folders the project designates for a purpose, under the XML store's own keys. + * + * In EXACTLY this order, which is why they are written out one at a time rather than + * looped: `parseProject` sorts its working folders by key, and these three keys sort + * into precisely this sequence, so emitting them in it is what lets the parity suite + * compare a TOML parse against an XML parse array-to-array with no sort on either side. + * A fourth key added later belongs in its sorted position, not at the end. + * + * The keys are the STORE's spelling and not this file's: `ProjectWorkingFolder.key` is + * documented as the raw purpose name, hosts match on it, and a format that spells the + * cache folder `cache-folder` must not hand a host a second name for one purpose. + */ +function readWorkingFolders( + project: Record | null, + simulink: Record | null, +): ProjectWorkingFolder[] { + const out: ProjectWorkingFolder[] = []; + const add = (key: string, ref: string): void => { + // Only when the source is a non-empty string. A purpose the project did not + // designate has no entry at all, where an entry with an empty `ref` would read as + // the project ROOT having been designated for it. + if (ref) { + out.push({ key, ref }); + } + }; + add('ProjectStartupFolder', stringAt(project, 'startup-folder')); + add('SimulinkCacheFolder', stringAt(simulink, 'cache-folder')); + add('SimulinkCodeGenFolder', stringAt(simulink, 'codegen-folder')); + return out; +} + +/** + * `[project.labels.]` as the label catalog, with the files each was declared + * against. + * + * `readOnly: false` on every one of them is not a reading of an attribute. The format + * records no ownership at all, and MATLAB's conversion into it drops the built-in + * read-only `Classification` category entirely — the parity corpus measures that, along + * with the `LabelDataLoss` warning MATLAB raises saying so. So every label a document + * in this format can carry is one the project itself declared, which is exactly what + * `readOnly: false` means to the page that draws a built-in label differently. + * + * In FILE ORDER, and not sorted as the XML reader sorts its catalog. The two orders are + * not the same kind of thing: a store's order is its directory order, which means + * nothing and differed between layouts, where this one is the order a person wrote the + * categories down in. + */ +function readLabels(labels: Record | null): ProjectLabel[] { + const out: ProjectLabel[] = []; + for (const [category, value] of Object.entries(labels ?? {})) { + const table = asTable(value); + if (!table) { + continue; + } + for (const [name, declared] of Object.entries(table)) { + // `Category/Name` for an id, where the XML layouts carry a UUID: synthetic, like + // the entry-point ids, and unique because TOML cannot write one category or one + // label key twice. + out.push({ + id: `${category}/${name}`, + category, + name, + readOnly: false, + declaredFiles: asStringArray(declared), + }); + } + } + return out; +} diff --git a/src/index.ts b/src/index.ts index 3b6af54..6b7dae0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -81,6 +81,13 @@ export { parseMdl } from './datamodel/parser/MdlParser.js'; export { parseModel } from './datamodel/parser/ModelParser.js'; export { parseMat } from './datamodel/parser/MatParser.js'; export { parseProject } from './datamodel/parser/ProjectParser.js'; +// The reader for the fourth definition format, whose whole definition is one +// `matlab.toml` and which therefore has no store map to hand `parseProject`. Exported +// beside it for the consumer that has already read the file — a host that watched it +// change, or that holds the text in an editor buffer — and would otherwise have to wrap +// it back up in a one-entry map to get at the same result. `parseProject` still +// dispatches to this when it finds the file, so a host with a folder keeps one call. +export { parseTomlProject } from './datamodel/parser/TomlProject.js'; export type { ParsedProject, ProjectFile, @@ -142,6 +149,18 @@ export type { IngestContent, IngestOptions } from './core/ingest.js'; // takes a project NAME, not a filename, so every caller has to strip the `.prj` first — // this package before it builds a project's node tree, a host before it builds its own // index over the same parse. The result is a label a user reads on both sides. +// `projectFallbackName` is what that reduction BECAME in R2026b, and the reason it is here +// rather than left to each caller. A project is now identified by an extension OR by a +// name: `matlab.toml` at the root is a whole project definition, and every project in that +// format spells its definition file identically — so the strip that answers `MyProj` for a +// marker answers "matlab" for all of them, and a host doing it itself would title every +// such project the same. The rule that works is the parent FOLDER's name, it needs the +// PATH rather than the basename, and it is one rule on two sides exactly as the other three +// are. `isProjectFile` is name-aware for the same reason — `isTomlProjectFile` and +// `TOML_PROJECT_FILE` are published so a host can tell WHICH of the two it has (they take +// different bytes: a zip store, or one text document) without spelling the name a fourth +// time, and without reaching for `.toml` as an extension, which would make every +// `Cargo.toml` in a workspace a MATLAB project. export { extOf, basenameOf, @@ -149,10 +168,13 @@ export { modelNameOf, refModelExt, projectNameOf, + projectFallbackName, isModelFile, isSlddFile, isMatFile, isProjectFile, + isTomlProjectFile, + TOML_PROJECT_FILE, } from './datamodel/fileKinds.js'; // Reading a `.sldd` without a session: which of the two on-disk formats the bytes are, diff --git a/test/moduleBoundaries.test.ts b/test/moduleBoundaries.test.ts index 9a2dbd2..42bc258 100644 --- a/test/moduleBoundaries.test.ts +++ b/test/moduleBoundaries.test.ts @@ -161,17 +161,32 @@ describe('the seams that are already clean stay clean', () => { expect(describeEdges(outboundFrom('datamodel/display'))).toEqual([]); }); - it('keeps datamodel/parser/ reaching for nothing but blockIdentity', () => { - // The one allowed edge, twice: `MdlParser` and `SlxParser` both have to name what - // kind of block they just read, and `datamodel/blockIdentity.ts` is the shared - // table they name it against. Allowing it widens the seam by nothing measurable — - // that module imports nothing at all, so it travels alone. - const allowed = 'datamodel/blockIdentity.ts'; - const strays = outboundFrom('datamodel/parser').filter((e) => e.to !== allowed); + it('keeps datamodel/parser/ reaching for nothing but blockIdentity and fileKinds', () => { + // TWO allowed modules, and both are the same kind of thing: a table of rules about + // names that the parsers share with code outside this folder. + // + // `datamodel/blockIdentity.ts` came first — `MdlParser` and `SlxParser` both have + // to name what kind of block they just read, and that is the shared table they name + // it against. `datamodel/fileKinds.ts` was added deliberately, when the project + // reader learned the `matlab.toml` format: the NAME of a project marker and the stem + // reduction over a path are shared with `core/ingest` and with every host, and the + // whole point `fileKinds` makes — its header is about eight copies of + // `endsWith('.sldd')` that disagreed on case — is that a rule like that lives in one + // place. Re-spelling `'matlab.toml'` inside the parser folder to keep this test at + // one allowed module would be the exact defect that module was written to end. + // + // Both widen the seam by nothing measurable: neither imports anything at all, so + // each travels alone. And this adds no folder-level edge — `datamodel/parser -> + // datamodel` already exists, via `blockIdentity`. + const allowed = ['datamodel/blockIdentity.ts', 'datamodel/fileKinds.ts']; + const strays = outboundFrom('datamodel/parser').filter((e) => !allowed.includes(e.to)); expect(describeEdges(strays)).toEqual([]); - // Not a count of them — a check that the exemption is still USED, so the test - // cannot start passing because the seam quietly stopped existing. - expect(outboundFrom('datamodel/parser').length, `and ${allowed} is still reached`).toBeGreaterThan(0); + // Not a count of them — a check that each exemption is still USED, so the test + // cannot start passing because the seam quietly stopped existing. Per module, not in + // total: one of the two going unreached is exactly how an allowance outlives the + // reason for it. + const reached = new Set(outboundFrom('datamodel/parser').map((e) => e.to)); + expect([...reached].sort(), 'and both allowed modules are still reached').toEqual(allowed); }); }); diff --git a/test/parity/project.parity.test.ts b/test/parity/project.parity.test.ts index b2e0284..88a4461 100644 --- a/test/parity/project.parity.test.ts +++ b/test/parity/project.parity.test.ts @@ -15,8 +15,11 @@ // entity: a `…d.xml` definition and a `…p.xml` pointer. // MultiFile the same idea, declared `distributed`, one doc per entity. // Toml a matlab.toml at the project ROOT — and no resources/ and -// NO .prj marker at all. Not read, and not openable either: -// with no .prj there is nothing for a host to be pointed at. +// NO .prj marker at all. Read, by a reader of its own +// (parser/TomlProject.ts), because there is no store here to +// walk; a host is pointed at the matlab.toml itself, the +// marker it would otherwise open having been deleted with +// resources/. // // Everything here is written by test/parity/matlab/gen_project.m; nothing in this // file launches MATLAB, and project_truth.json is the only source of expected @@ -32,8 +35,9 @@ // (`proj.Files`, `proj.StartupFiles`, `proj.Categories`, …) recorded per // format from the CONVERTED project — so MATLAB itself is the one saying all // four shapes describe the same project. -// - ACROSS LAYOUTS: the three XML parses are equal but for the format token. -// This is the claim multi-layout support makes, and the one a +// - ACROSS LAYOUTS: the three XML parses are equal but for the format token, and +// the TOML parse agrees with them field by field on everything the TOML format +// records. This is the claim multi-layout support makes, and the one a // wrong-but-consistent reader cannot satisfy. // // WHY THIS CORPUS EXISTS AT ALL, given a 1,371-line projectParser.test.ts: every @@ -57,6 +61,7 @@ import { fileURLToPath } from 'node:url'; import { parseProject } from '../../src/datamodel/parser/ProjectParser.js'; import type { ParsedProject } from '../../src/datamodel/parser/ProjectParser.js'; +import { TOML_PROJECT_FILE } from '../../src/datamodel/fileKinds.js'; const DIR = fileURLToPath(new URL('./artifacts/project/', import.meta.url)); @@ -181,13 +186,22 @@ const XML_LAYOUTS = LAYOUTS.filter((l) => !l.toml); const rootOf = (format: string): string => join(DIR, format, 'parityProject'); /** - * The project store, read the way the host reads it: every `*.xml` under - * `resources/project/`, keyed by POSIX relpath from the project ROOT. Mirrors - * `readProjectStore` in the vscode extension (src/host/projectStore.ts), which is - * the only caller that builds one of these from a directory. + * The project store, read the way the host reads it: a `matlab.toml` at the project + * root, plus every `*.xml` under `resources/project/`, keyed by POSIX relpath from + * the project ROOT. Mirrors `readProjectStore` in the vscode extension + * (src/host/projectStore.ts), which is the only caller that builds one of these + * from a directory. + * + * The two never coexist — the conversion into Toml deletes `resources/` — so this + * collects both and lets `parseProject` dispatch, which is exactly the position the + * host is in when it is handed a project folder. */ function storeOf(root: string): Record { const out: Record = {}; + const toml = join(root, TOML_PROJECT_FILE); + if (existsSync(toml)) { + out[TOML_PROJECT_FILE] = readFileSync(toml, 'utf8'); + } const base = join(root, 'resources', 'project'); if (!existsSync(base)) { return out; @@ -246,11 +260,14 @@ describe('project definition-file parity', () => { it(`${layout.format} is on disk in the shape that format writes`, () => { const root = rootOf(layout.format); const store = storeOf(root); - expect(Object.keys(store).length).toBe(layout.storeDocs); + // The XML half of what the host collected, which is what `storeDocs` counts: a + // `matlab.toml` is in the same map and is not a store document. + expect(Object.keys(store).filter((k) => k.endsWith('.xml')).length).toBe(layout.storeDocs); + expect(TOML_PROJECT_FILE in store).toBe(layout.toml); const entries = readdirSync(root); expect(entries.some((n) => n.endsWith('.prj'))).toBe(layout.marker); - expect(entries.includes('matlab.toml')).toBe(layout.toml); + expect(entries.includes(TOML_PROJECT_FILE)).toBe(layout.toml); expect(existsSync(join(root, 'resources', 'project'))).toBe(layout.storeDocs > 0); }); } @@ -416,36 +433,125 @@ describe('project definition-file parity', () => { }); } - // ---- Toml: a format this reader does not read, and need not -------------- + // ---- Toml: the one format that is not a store at all --------------------- describe('Toml', () => { const root = rootOf('Toml'); + const t = TRUTH.formats.Toml; + const parsed = parse('Toml'); - it('has no .prj and no store, so there is nothing for a host to open', () => { + it('has no .prj and no store: one matlab.toml at the root is the definition', () => { // The answer to "where did the .prj go": the conversion deletes it along - // with resources/, and `matlab.toml` at the root is the entire project - // definition. A project in this shape never reaches this parser, because the - // extension is registered against `.prj` — this is a missing FILE TYPE, not - // a parse gap. + // with resources/. So a host cannot be pointed at a marker here, and the + // file it opens is the definition itself — which is also why nothing in + // this layout reaches the store walk `parseProject` otherwise is. expect(readdirSync(root).some((n) => n.endsWith('.prj'))).toBe(false); expect(existsSync(join(root, 'resources'))).toBe(false); - expect(existsSync(join(root, 'matlab.toml'))).toBe(true); - expect(readFileSync(join(root, 'matlab.toml'), 'utf8')).toContain('name = "parityProject"'); + expect(existsSync(join(root, TOML_PROJECT_FILE))).toBe(true); + expect(readFileSync(join(root, TOML_PROJECT_FILE), 'utf8')).toContain( + 'name = "parityProject"', + ); }); - it('reads as empty, through the generic warning and not the matlab.toml one', () => { - const parsed = parse('Toml'); + it('reads whole, and reports the format as this package names it', () => { + expect(parsed.warnings).toEqual([]); + expect(parsed.name).toBe(t.name); + expect(parsed.name).not.toBe(FALLBACK_NAME); + // The one `format` value that is NOT a declared `MetadataType`: there is no + // store here to declare one, so it is this package's own name for the format. + expect(t.definitionFilesType).toBe('Toml'); + expect(parsed.format).toBe('toml'); + }); + + it('enumerates NO members, where every XML layout does', () => { + // `files: []` means something different here than it does anywhere else in + // this suite, and `membersEnumerated` is the field that says which. MATLAB's + // rule for this format is that the files in the project root ARE the members + // — about the filesystem, not about the document — so a member list is a + // sentence this reader is not entitled to say. MATLAB itself reports nine + // members for the converted project; the document names none of them. + expect(parsed.membersEnumerated).toBe(false); expect(parsed.files).toEqual([]); - expect(parsed.warnings.map((w) => w.code)).toEqual(['source-empty']); - // Deliberate: the parser's matlab.toml-specific message is keyed on a - // `resources/project/matlab.toml` entry, and R2027a writes the file at the - // project ROOT with no resources/ at all. That branch is for a store an - // older release wrote, so this case lands on the generic message. - expect(parsed.warnings[0].message).toContain('No readable project entries were found'); + expect(t.files.length).toBe(9); + + const xml = parse('SingleFile'); + expect(xml.membersEnumerated).toBe(true); + expect(xml.files.length).toBe(TRUTH.formats.SingleFile.files.length); + }); + + it('holds what MATLAB says the converted project holds, less its member list', () => { + expect(parsed.pathFolders).toEqual(t.pathFolders); + expect(filesOfKind(parsed, 'StartUp')).toEqual(t.startupFiles); + expect(filesOfKind(parsed, 'Shutdown')).toEqual(t.shutdownFiles); + expect(filesOfKind(parsed, 'Basic')).toEqual(t.shortcuts); + expect(parsed.references.map((r) => r.path)).toEqual(t.references.map((r) => r.path)); + const wf = new Map(parsed.workingFolders.map((w) => [w.key, w.ref])); + expect(wf.get('ProjectStartupFolder')).toBe(t.projectStartupFolder); + expect(wf.get('SimulinkCacheFolder')).toBe(t.simulinkCacheFolder); + expect(wf.get('SimulinkCodeGenFolder')).toBe(t.simulinkCodeGenFolder); + }); + + it('defines the one label category that survived, with the file it declares', () => { + // The inverted assignment, and the only place those paths can live: an XML + // store records labels per MEMBER file, and this format has no member list, + // so the label carries the files instead. `readOnly: false` on it is not a + // reading of an attribute — the format records no ownership, which is why + // MATLAB's own conversion dropped the read-only category entirely. + expect(parsed.labels).toEqual([ + { + id: 'Review/Checked', + category: 'Review', + name: 'Checked', + readOnly: false, + declaredFiles: ['utils/helper.m'], + }, + ]); + // The same relationship the XML layout records the other way round, which is + // what makes the `declaredFiles` list a reading of this project rather than + // of this document. + expect(assignedLabels(parse('SingleFile'), 'utils/helper.m')).toContain('Review/Checked'); + }); + + it('reads as the same project as the XML layouts, on everything the format records', () => { + // Not `toEqual` on the whole parse, as the three XML layouts are compared to + // each other, and the exclusions are the point: + // - the IDS. Conversion preserves MATLAB's UUIDs between XML layouts, so + // those compare; this format records no UUID anywhere, so every id here + // is synthetic (`StartUp:startup_one.m`, `Review/Checked`, the + // dependency's own key) and a comparison on one would be a comparison of + // two unrelated naming schemes. + // - `files`, `membersEnumerated` and the label CATALOG, which the format + // does not record — measured above, and in the lossiness test below. + // Everything else must agree, entry-point ORDER included: run order is a + // linked list in a store and an array here, and the two must come out the + // same sequence. + const shape = (p: ParsedProject): unknown => ({ + name: p.name, + pathFolders: p.pathFolders, + entryPoints: p.entryPoints.map((e) => ({ + name: e.name, + file: e.file, + kind: e.kind, + visible: e.visible, + groupId: e.groupId, + })), + entryPointGroups: p.entryPointGroups, + workingFolders: p.workingFolders, + references: p.references.map((r) => ({ name: r.name, path: r.path })), + }); + for (const layout of XML_LAYOUTS) { + expect(shape(parsed), layout.format).toEqual(shape(parse(layout.format))); + } + // And the shortcut's NAME agrees for a reason worth stating: the XML store + // carries a `Name` attribute MATLAB fills with the file's stem, and this + // format has only the key — so the two agree because MATLAB writes the key as + // that same stem, not because either side derived the other. + expect(parsed.entryPoints.filter((e) => e.kind === 'Basic').map((e) => e.name)).toEqual([ + 'main', + ]); }); it('is LOSSY, and MATLAB says so in its own words', () => { - const t = TRUTH.formats.Toml; expect(t.convertWarningId).toBe('MATLAB:Project:Issues:LabelDataLoss'); expect(t.convertWarning).toContain('Unable to preserve label data'); diff --git a/test/projectPage.test.ts b/test/projectPage.test.ts index 6ae4160..325cf98 100644 --- a/test/projectPage.test.ts +++ b/test/projectPage.test.ts @@ -18,6 +18,7 @@ function parsed(over: Partial = {}): ParsedProject { return { name: 'Proj', format: 'fixedPathV2', + membersEnumerated: true, files: [], pathFolders: [], labels: [], @@ -122,10 +123,10 @@ describe('buildProjectPage — the shortcuts gallery', () => { describe('buildProjectPage — labels and coverage', () => { const catalog = [ - { id: 'design', category: 'Classification', name: 'Design', readOnly: true }, - { id: 'test', category: 'Classification', name: 'Test', readOnly: true }, - { id: 'unused', category: 'Classification', name: 'Unused', readOnly: true }, - { id: 'mine', category: 'Classification', name: 'ForUser', readOnly: false }, + { id: 'design', category: 'Classification', name: 'Design', readOnly: true, declaredFiles: [] }, + { id: 'test', category: 'Classification', name: 'Test', readOnly: true, declaredFiles: [] }, + { id: 'unused', category: 'Classification', name: 'Unused', readOnly: true, declaredFiles: [] }, + { id: 'mine', category: 'Classification', name: 'ForUser', readOnly: false, declaredFiles: [] }, ]; it('counts members per label and reports coverage', () => { @@ -193,6 +194,9 @@ describe('buildProjectPage — labels and coverage', () => { name: 'ghost', count: 1, custom: true, + // Nothing declared this id — it exists only because a member carries it — so + // there is no catalog entry it could have been declared on. + declaredFiles: [], }); }); @@ -200,8 +204,8 @@ describe('buildProjectPage — labels and coverage', () => { const page = buildProjectPage( parsed({ labels: [ - { id: 'design', category: 'Classification', name: 'Design', readOnly: true }, - { id: 'rev', category: 'Review', name: 'Reviewed', readOnly: false }, + { id: 'design', category: 'Classification', name: 'Design', readOnly: true, declaredFiles: [] }, + { id: 'rev', category: 'Review', name: 'Reviewed', readOnly: false, declaredFiles: [] }, ], files: [{ path: 'a.m', isFolder: false, labels: ['design', 'rev'] }], }), @@ -214,6 +218,140 @@ describe('buildProjectPage — labels and coverage', () => { it('has no categories at all for a project that defines no labels', () => { expect(buildProjectPage(parsed()).categories).toEqual([]); }); + + it('leaves declaredFiles empty for every label out of an XML store', () => { + // An XML store assigns labels the other way round, per member file, so a catalog + // entry there has no file list of its own and `count` is the whole story. A page + // that found paths here would be showing something no store recorded. + const page = buildProjectPage( + parsed({ + labels: catalog, + files: [{ path: 'a.m', isFolder: false, labels: ['design'] }], + }), + ); + expect(page.categories.flatMap((c) => c.labels).map((l) => l.declaredFiles)).toEqual([ + [], + [], + [], + [], + ]); + }); + + it('still reports 0 members for an XML store that could not be walked', () => { + // The one case the nullability must NOT swallow: a damaged store enumerated + // nothing, which is a true 0, as against a format that enumerates nothing. The + // parser says so by keeping `membersEnumerated` true even in `emptyResult`, and a + // host already shows that 0 — so this is behaviour to preserve, not to unify. + const page = buildProjectPage(parsed({ format: '', files: [] })); + expect(page.memberCount).toBe(0); + expect(page.labelledCount).toBe(0); + }); +}); + +describe('buildProjectPage — a format that records no member list', () => { + // A `matlab.toml` project. MATLAB's rule for it is "every file under the project root + // is a member", which is a statement about the filesystem and not a list in the + // document, and the maintainer's decision is to declare only what the file declares — + // no folder walk to synthesize one. So the page's job here is to show NO count, and + // every assertion below is really the same assertion: a zero would be a false claim + // about a project that may well hold hundreds of files. + + /** Labels as the TOML format carries them: each declaring its own files. */ + const declared = [ + { + id: 'Status/Draft', + category: 'Status', + name: 'Draft', + readOnly: false, + declaredFiles: ['models/*.slx', 'src/a.m'], + }, + { + id: 'Status/Reviewed', + category: 'Status', + name: 'Reviewed', + readOnly: false, + declaredFiles: [], + }, + { + id: 'Status/Archived', + category: 'Status', + name: 'Archived', + readOnly: false, + declaredFiles: ['old/'], + }, + ]; + + /** A parse from a format that enumerates no members: no files, by the format. */ + const unenumerated = (over: Partial = {}) => + parsed({ format: 'toml', membersEnumerated: false, files: [], ...over }); + + it('reports no member count and no coverage instead of zeros', () => { + // `null` is what makes a renderer branch: the webview's `esc()` takes + // `string | number`, so a `null` arriving there fails to compile at the call site. + // A 0 — or a -1 sentinel — would have type-checked and printed a lie. + const page = buildProjectPage(unenumerated({ labels: declared })); + expect(page.memberCount).toBeNull(); + expect(page.labelledCount).toBeNull(); + }); + + it('reports every label usage as unknown rather than as unused', () => { + // A defined-but-unused label legitimately counts 0 in an XML store, so 0 here would + // be indistinguishable from that — and it would contradict the chip beside it, which + // is about to list the three paths the label was declared against. + const page = buildProjectPage(unenumerated({ labels: declared })); + const labels = page.categories.flatMap((c) => c.labels); + expect(labels).toHaveLength(3); + expect(labels.every((l) => l.count === null)).toBe(true); + }); + + it('carries the files each label was declared against through verbatim', () => { + // These paths are what the page shows IN PLACE OF the coverage fraction, so they + // must arrive exactly as the document wrote them — a glob is a glob, a trailing + // slash means a folder, and nothing here is entitled to resolve either. + const page = buildProjectPage(unenumerated({ labels: declared })); + const byName = new Map(page.categories[0].labels.map((l) => [l.name, l.declaredFiles])); + expect(byName.get('Draft')).toEqual(['models/*.slx', 'src/a.m']); + expect(byName.get('Archived')).toEqual(['old/']); + // Declaring nothing is a real state of a hand-edited file, and the label still + // belongs on the page: the project defined it. + expect(byName.get('Reviewed')).toEqual([]); + }); + + it('orders the labels by name alone when there is no usage to order by', () => { + // "Used first" has no meaning without counts, and `count ?? 0` would make the sort + // a no-op that leaves catalog order — so the fallback is explicit. Catalog order + // here is Draft, Reviewed, Archived and declared-file order would be Draft, + // Archived, Reviewed; neither is what alphabetical gives. + const page = buildProjectPage(unenumerated({ labels: declared })); + expect(page.categories[0].labels.map((l) => l.name)).toEqual([ + 'Archived', + 'Draft', + 'Reviewed', + ]); + }); + + it('treats every label in this format as one the project declared', () => { + // Not this file's doing — the format records no ownership, so the reader marks them + // all writable — but the page is where that shows, as the absence of the built-in + // styling a read-only Classification label gets. + const page = buildProjectPage(unenumerated({ labels: declared })); + expect(page.categories[0].labels.every((l) => l.custom)).toBe(true); + }); + + it('leaves the rest of the page exactly as any other format builds it', () => { + // Only the three count fields are conditional. A reader of this change should not + // have to wonder whether the hooks or the path folders went missing with them. + const page = buildProjectPage( + unenumerated({ + pathFolders: ['', 'utils'], + entryPoints: [ep({ name: 'build', file: 'build.m', kind: 'StartUp', visible: false })], + }), + ); + expect(page.formatLabel).toBe('matlab.toml'); + expect(page.pathFolders).toEqual(['', 'utils']); + expect(page.startup).toEqual([{ name: 'build', file: 'build.m' }]); + expect(page.categories).toEqual([]); + }); }); describe('buildProjectPage — the remaining sections', () => { diff --git a/test/projectParser.test.ts b/test/projectParser.test.ts index 06d99bb..278a8e8 100644 --- a/test/projectParser.test.ts +++ b/test/projectParser.test.ts @@ -545,7 +545,7 @@ describe('parseProject — the label catalog', () => { 'fallback', ); expect(parsed.labels).toEqual([ - { id: 'design', category: 'Classification', name: 'Design', readOnly: false }, + { id: 'design', category: 'Classification', name: 'Design', readOnly: false, declaredFiles: [] }, ]); }); @@ -593,7 +593,7 @@ describe('parseProject — the label catalog', () => { 'fallback', ); expect(parsed.labels).toEqual([ - { id: 'design', category: 'FileClassCategory', name: 'Design', readOnly: false }, + { id: 'design', category: 'FileClassCategory', name: 'Design', readOnly: false, declaredFiles: [] }, ]); }); @@ -615,8 +615,8 @@ describe('parseProject — the label catalog', () => { // By category then name, not in store order: see the sort in parseProject — // one project in two metadata layouts handed its catalog over in two orders. expect(parsed.labels).toEqual([ - { id: 'lab2', category: 'Cat', name: 'lab2', readOnly: false }, - { id: 'lab1', category: 'Cat', name: 'Label One', readOnly: false }, + { id: 'lab2', category: 'Cat', name: 'lab2', readOnly: false, declaredFiles: [] }, + { id: 'lab1', category: 'Cat', name: 'Label One', readOnly: false, declaredFiles: [] }, ]); }); }); @@ -1164,8 +1164,8 @@ describe('parseProject — the monolithic layout', () => { it('reads the label catalog and its category name', () => { const parsed = parseProject(monoStore(MONO_BODY), 'fallback'); expect(parsed.labels).toEqual([ - { id: 'design', category: 'Classification', name: 'Design', readOnly: true }, - { id: 'test', category: 'Classification', name: 'Test', readOnly: true }, + { id: 'design', category: 'Classification', name: 'Design', readOnly: true, declaredFiles: [] }, + { id: 'test', category: 'Classification', name: 'Test', readOnly: true, declaredFiles: [] }, ]); }); @@ -1323,12 +1323,15 @@ describe('parseProject — one project, three layouts', () => { // so the thing being compared has to be known to hold the project. expect(fixed).toEqual({ name: 'Parity', + membersEnumerated: true, files: [ { path: 'utils', isFolder: true, labels: [] }, { path: 'utils/helper.m', isFolder: false, labels: ['design'] }, ], pathFolders: ['utils'], - labels: [{ id: 'design', category: 'Classification', name: 'Design', readOnly: true }], + labels: [ + { id: 'design', category: 'Classification', name: 'Design', readOnly: true, declaredFiles: [] }, + ], references: [], entryPoints: [ { @@ -1397,16 +1400,4 @@ describe('parseProject — the declared metadata format', () => { expect(parsed.warnings).toHaveLength(1); expect(parsed.warnings[0].code).toBe('source-empty'); }); - - it('names matlab.toml rather than reporting an empty store', () => { - // A toml store holds no XML at all, so it lands in the same place as a store - // that did not survive its trip. It is not damaged, and a user told "nothing - // readable" would go looking for a corrupt file that does not exist. - const parsed = parseProject({ 'resources/project/matlab.toml': '[project]\nname = "T"\n' }, 'TomlProj'); - expect(parsed.name).toBe('TomlProj'); - expect(parsed.warnings).toHaveLength(1); - expect(parsed.warnings[0].code).toBe('source-empty'); - expect(parsed.warnings[0].message).toContain('matlab.toml'); - expect(parsed.warnings[0].part).toBe('resources/project/matlab.toml'); - }); }); diff --git a/test/tomlProject.test.ts b/test/tomlProject.test.ts new file mode 100644 index 0000000..319ab11 --- /dev/null +++ b/test/tomlProject.test.ts @@ -0,0 +1,594 @@ +// Copyright 2026 The MathWorks, Inc. +// +// The fourth project definition-file format: one hand-editable `matlab.toml` at the +// project root, with no `resources/` store and no `.prj` marker behind it. +// +// TWO SOURCES OF INPUT, and the split is the rule rather than a preference: +// +// - THE PARITY FIXTURE for every assertion of the form "this is what MATLAB writes". +// `test/parity/artifacts/project/Toml/parityProject/matlab.toml` was written by +// `matlab.project.convertDefinitionFiles` and is committed; test/parity/matlab/README.md +// says never to write an expected value by hand when MATLAB can be asked for it, and +// hand-typed TOML standing in for MATLAB's own output is exactly the mistake that +// cost the XML reader three wrong expectations (see project.parity.test.ts). +// +// - INLINE DOCUMENTS for everything MATLAB would not write but a person will, because +// hand editing is the whole point of this format: comments, a `#` inside a string, +// literal strings, dotted keys, a single string where MATLAB writes an array, a +// number where a path belongs, a document that will not parse at all. None of that +// can be harvested — MATLAB does not emit it — so it is typed here, and it is typed +// here ONLY for shapes the fixture cannot carry. +// +// What the cases below are chosen to pin is the set of decisions TomlProject.ts singles +// out in its comments as the ones a future maintainer would "fix" by accident: `files: +// []` is the FORMAT and not a parse failure, the ids are synthetic, the label catalog is +// in file order where the XML one is sorted, a bare string under `[dependencies]` is a +// package version and is skipped in SILENCE, and a shortcut with no resolvable path is +// still a shortcut the project declared. +import { describe, it, expect } from 'vitest'; +import { readFileSync } from 'node:fs'; +import { fileURLToPath } from 'node:url'; + +import { parseTomlProject } from '../src/datamodel/parser/TomlProject.js'; +import { parseProject } from '../src/datamodel/parser/ProjectParser.js'; +import type { ParsedProject } from '../src/datamodel/parser/ProjectParser.js'; + +/** What MATLAB wrote, converting the parity project into this format. */ +const FIXTURE = readFileSync( + fileURLToPath( + new URL('./parity/artifacts/project/Toml/parityProject/matlab.toml', import.meta.url), + ), + 'utf8', +); + +// A name no document here records, so every assertion on `name` is about what the +// document said and not about what was passed in. +const FALLBACK = 'not-the-project-name'; + +const read = (text: string): ParsedProject => parseTomlProject(text, FALLBACK); + +/** The one line `lines` makes, which is how a TOML document is written. */ +const doc = (...lines: string[]): string => lines.join('\n'); + +/** The files of the entry points of one kind, in the order they were read. */ +const filesOf = (parsed: ParsedProject, kind: string): string[] => + parsed.entryPoints.filter((e) => e.kind === kind).map((e) => e.file); + +describe('matlab.toml, as MATLAB writes it', () => { + const parsed = read(FIXTURE); + + it('names itself from the document, and reports the format it was dispatched as', () => { + expect(parsed.name).toBe('parityProject'); + expect(parsed.name).not.toBe(FALLBACK); + expect(parsed.format).toBe('toml'); + expect(parsed.warnings).toEqual([]); + }); + + it('enumerates no members, which is the FORMAT and not a failed parse', () => { + // The distinction `membersEnumerated` exists for. MATLAB's rule is that the files in + // the project root ARE the members, which is a statement about the filesystem and + // not a list in this document — so "0 members" is a sentence this reader is not + // entitled to say, and a maintainer who read `files: []` as an oversight and walked + // the project folder would be inventing a list MATLAB does not have. + expect(parsed.files).toEqual([]); + expect(parsed.membersEnumerated).toBe(false); + // And it is not for want of content: everything else in the document was read. + expect(parsed.pathFolders).toEqual(['utils']); + }); + + it('puts the startup, shutdown and shortcut entries in run order, named by file stem', () => { + // The whole collection, ids included, because the ids are the one field here with no + // counterpart in an XML store: that layout carries MATLAB's own UUID per entry point + // and this format carries none, so these are built from the kind and the file to be + // unique within one parse. Nothing may persist one as a handle — renaming + // startup_one.m changes its id, where in an XML store it would not. + expect(parsed.entryPoints).toEqual([ + { + id: 'StartUp:startup_one.m', + name: 'startup_one', + file: 'startup_one.m', + kind: 'StartUp', + visible: false, + groupId: '', + }, + { + id: 'StartUp:startup_two.m', + name: 'startup_two', + file: 'startup_two.m', + kind: 'StartUp', + visible: false, + groupId: '', + }, + { + id: 'Shutdown:shutdown_parity.m', + name: 'shutdown_parity', + file: 'shutdown_parity.m', + kind: 'Shutdown', + visible: false, + groupId: '', + }, + { id: 'Basic:main', name: 'main', file: 'main.m', kind: 'Basic', visible: true, groupId: '' }, + ]); + // Hidden hooks, shown shortcuts: MATLAB's Shortcuts gallery holds the latter only. + for (const e of parsed.entryPoints) { + expect(e.visible, e.name).toBe(e.kind === 'Basic'); + } + }); + + it('has no entry-point groups, because the format has nowhere to name one', () => { + // Not an empty gallery: every shortcut sits under one `[project.shortcuts]` table, + // so the XML store's EntryPointGroups has no equivalent to be empty OF. + expect(parsed.entryPointGroups).toEqual([]); + }); + + it('designates the working folders under the keys the XML store uses, in that order', () => { + // The STORE's spelling, not the document's: `ProjectWorkingFolder.key` is documented + // as the raw purpose name and hosts match on it, so a format that spells the cache + // folder `cache-folder` must not hand a host a second name for one purpose. The order + // is the one `parseProject` sorts its own into, which is what lets the parity suite + // compare the two parses array-to-array. + expect(parsed.workingFolders).toEqual([ + { key: 'ProjectStartupFolder', ref: 'utils' }, + { key: 'SimulinkCacheFolder', ref: 'cache' }, + { key: 'SimulinkCodeGenFolder', ref: 'codegen' }, + ]); + }); + + it('reads the dependency as a reference, keyed by the name MATLAB shows', () => { + // The key is both id and name, where an XML store carries a UUID and a basename: it + // is the only identity the format records, and a dependency is referred to by its + // key rather than by the folder it resolves to. + expect(parsed.references).toEqual([ + { id: 'parityLib', name: 'parityLib', path: '../parityLib' }, + ]); + }); + + it('keeps the files each label was declared against, which no XML layout can', () => { + // The inversion that `declaredFiles` exists for. A store assigns labels per member + // file, so its catalog entry has nothing to point back at; here the label declares + // its files and the format records no member list for them to have been declared on, + // which makes this the only place those paths can live. + expect(parsed.labels).toEqual([ + { + id: 'Review/Checked', + category: 'Review', + name: 'Checked', + readOnly: false, + declaredFiles: ['utils/helper.m'], + }, + ]); + }); + + it('owns every label it defines, because the format records no ownership', () => { + // `readOnly: false` is not a reading of an attribute. MATLAB's conversion into this + // format drops the whole built-in read-only `Classification` category — the parity + // corpus measures that, and MATLAB raises `LabelDataLoss` saying so — so every label + // a document in this format can carry is one the project itself declared. + expect(parsed.labels.every((l) => !l.readOnly)).toBe(true); + expect(parsed.labels.map((l) => l.category)).not.toContain('Classification'); + }); +}); + +describe('matlab.toml, as a person edits it', () => { + it('reads comments, including a # that is inside a string value', () => { + const parsed = read( + doc( + '# the project this file defines', + 'name = "Commented" # and what it is called', + '', + '[project]', + '# the folder MATLAB starts in', + 'startup-folder = "utils # not a comment"', + ), + ); + expect(parsed.name).toBe('Commented'); + // The `#` is inside the quotes, so it is part of the path and not the start of a + // comment. A reader that stripped comments with a line-wise regex would truncate it. + expect(parsed.workingFolders).toEqual([ + { key: 'ProjectStartupFolder', ref: 'utils # not a comment' }, + ]); + expect(parsed.warnings).toEqual([]); + }); + + it('reads a literal string raw and a basic string escaped', () => { + // The distinction a hand-edited file turns on: a Windows path in single quotes keeps + // its backslashes, where the same text in double quotes is read for escapes. + const parsed = read( + doc( + String.raw`name = 'C:\raw\path'`, + '[project]', + String.raw`startup-folder = "escaped\tcolumn"`, + ), + ); + expect(parsed.name).toBe(String.raw`C:\raw\path`); + expect(parsed.workingFolders).toEqual([ + { key: 'ProjectStartupFolder', ref: 'escaped\tcolumn' }, + ]); + }); + + it('reads a dotted key as the table it is shorthand for', () => { + // `project.startup-folder = "utils"` and a `[project]` table holding + // `startup-folder` are the same document, and a person writing one setting writes + // the first. Nothing in this reader looks at how a table was spelled. + const dotted = read('project.startup-folder = "utils"'); + const sectioned = read(doc('[project]', 'startup-folder = "utils"')); + expect(dotted.workingFolders).toEqual([{ key: 'ProjectStartupFolder', ref: 'utils' }]); + expect(dotted).toEqual(sectioned); + }); + + it('reads a multi-line array with a trailing comma', () => { + // Valid TOML, invisible in MATLAB's own output (it writes one anyway, see the + // fixture), and the shape a person leaves behind after deleting the last entry. + const parsed = read(doc('[folders]', 'path = [', ' "utils",', ' "models",', ']')); + expect(parsed.pathFolders).toEqual(['utils', 'models']); + expect(parsed.warnings).toEqual([]); + }); + + it('reads a single string where MATLAB writes an array', () => { + // `startup-files = "startup.m"` is valid TOML and means exactly one thing, so + // refusing it would drop the whole field rather than one entry of it. + const parsed = read( + doc('[folders]', 'path = "utils"', '[project]', 'startup-files = "startup.m"'), + ); + expect(parsed.pathFolders).toEqual(['utils']); + expect(parsed.entryPoints.map((e) => e.file)).toEqual(['startup.m']); + expect(parsed.warnings).toEqual([]); + }); + + it('falls back to the name the caller passed for a document that records none', () => { + const parsed = read(doc('[folders]', 'path = ["utils"]')); + expect(parsed.name).toBe(FALLBACK); + // A document with no `name` is not a document with no content: `fallbackName` is a + // missing field, not a failed read. + expect(parsed.pathFolders).toEqual(['utils']); + expect(parsed.warnings).toEqual([]); + }); + + it('names an entry point by its file stem, wherever the file sits', () => { + const parsed = read( + doc( + '[project]', + 'startup-files = ["utils/sub/startup_one.m", "Startup.M", "noext", ".gitignore"]', + ), + ); + // The stem, so that the same file is the same entry-point NAME in all four formats: + // the XML layouts record a `Name` attribute beside the `File` one and MATLAB writes + // the stem into it. The extension is matched case-insensitively and the name keeps + // its own case, which is what `Startup.M` is here for. A name that is ALL extension + // has no stem to take, and an entry point with an empty name is not something a + // gallery can show, so the basename stands in. + expect(parsed.entryPoints.map((e) => e.name)).toEqual([ + 'startup_one', + 'Startup', + 'noext', + '.gitignore', + ]); + expect(parsed.entryPoints.map((e) => e.file)).toEqual([ + 'utils/sub/startup_one.m', + 'Startup.M', + 'noext', + '.gitignore', + ]); + }); + + it('skips a startup entry that names no file', () => { + // Nothing to show and nothing to open: the name here is derived from the file, so an + // empty path leaves no entry point to make. (A shortcut is the opposite case — see + // below — because there the KEY is the name.) + const parsed = read(doc('[project]', 'startup-files = ["", "startup.m"]')); + expect(parsed.entryPoints.map((e) => e.file)).toEqual(['startup.m']); + }); + + it('takes a shortcut written as a table OR as a bare string', () => { + const parsed = read( + doc('[project.shortcuts]', 'tabled = {path = "main.m"}', 'bare = "other.m"'), + ); + expect(parsed.entryPoints).toEqual([ + { + id: 'Basic:tabled', + name: 'tabled', + file: 'main.m', + kind: 'Basic', + visible: true, + groupId: '', + }, + { + id: 'Basic:bare', + name: 'bare', + file: 'other.m', + kind: 'Basic', + visible: true, + groupId: '', + }, + ]); + // The asymmetry with `[dependencies]`, where a bare string is skipped, is in the + // formats and not in the reader: under `shortcuts` there is nothing else a string + // beside a key could mean, and under `dependencies` there is. + expect(parsed.warnings).toEqual([]); + }); + + it('keeps a shortcut whose path it could not resolve', () => { + // The key IS the shortcut's name, so there is still a gallery entry the project + // declared. Dropping it would make a shortcut written in a shape this reader does not + // know disappear, rather than read as a shortcut whose target needs fixing. + const parsed = read( + doc('[project.shortcuts]', 'misspelled = {target = "main.m"}', 'numbered = 5'), + ); + expect(parsed.entryPoints.map((e) => ({ name: e.name, file: e.file }))).toEqual([ + { name: 'misspelled', file: '' }, + { name: 'numbered', file: '' }, + ]); + expect(parsed.entryPoints.every((e) => e.kind === 'Basic' && e.visible)).toBe(true); + }); + + it('omits a working folder the document does not designate', () => { + // No entry at all, where an entry with an empty `ref` would read as the project ROOT + // having been designated for that purpose. + const parsed = read( + doc('[project]', 'startup-folder = ""', '[simulink]', 'cache-folder = "c"'), + ); + expect(parsed.workingFolders).toEqual([{ key: 'SimulinkCacheFolder', ref: 'c' }]); + }); + + it('emits the working folders in the STORE’s order, not the document’s', () => { + // `parseProject` sorts its working folders by key, and these three keys sort into + // exactly this sequence — which is what lets the parity suite compare a TOML parse + // against an XML one array-to-array with no sort on either side. MATLAB happens to + // write them in that order too, so the fixture cannot tell the two apart; a + // document a person reordered can. + const parsed = read( + doc( + '[simulink]', + 'codegen-folder = "codegen"', + 'cache-folder = "cache"', + '[project]', + 'startup-folder = "utils"', + ), + ); + expect(parsed.workingFolders).toEqual([ + { key: 'ProjectStartupFolder', ref: 'utils' }, + { key: 'SimulinkCacheFolder', ref: 'cache' }, + { key: 'SimulinkCodeGenFolder', ref: 'codegen' }, + ]); + }); + + it('reads the label catalog in FILE order, not sorted', () => { + // Unlike the XML reader, which sorts its catalog. The two orders are not the same + // kind of thing: a store's order is its directory order, which means nothing and + // differed between layouts, where this one is the order a person wrote the categories + // down in. Spelled here with categories and labels that sort the other way, so a sort + // added later cannot pass. + const parsed = read( + doc( + '[project.labels.Zeta]', + 'Last = ["z.m"]', + 'Alpha = []', + '', + '[project.labels.Aaa]', + 'Only = "single.m"', + ), + ); + expect(parsed.labels).toEqual([ + { id: 'Zeta/Last', category: 'Zeta', name: 'Last', readOnly: false, declaredFiles: ['z.m'] }, + { id: 'Zeta/Alpha', category: 'Zeta', name: 'Alpha', readOnly: false, declaredFiles: [] }, + // A bare string is one declared file, for the same reason it is one path above. + { + id: 'Aaa/Only', + category: 'Aaa', + name: 'Only', + readOnly: false, + declaredFiles: ['single.m'], + }, + ]); + }); + + it('skips a package dependency in SILENCE, warning about nothing', () => { + // `[dependencies]` is also where a MATLAB PACKAGE dependency goes, with a version + // constraint rather than a path, so a bare string there is a valid entry of a kind + // this package does not model — not a malformed reference. This is the one place in + // the reader where a warning would be wrong: it would put a count on every project + // that depends on a package, and a count that fires on healthy files is a count a + // host learns to hide. + const parsed = read( + doc('[dependencies]', 'someToolbox = "^1.2"', 'parityLib = {path = "../parityLib"}'), + ); + expect(parsed.references).toEqual([ + { id: 'parityLib', name: 'parityLib', path: '../parityLib' }, + ]); + expect(parsed.warnings).toEqual([]); + }); +}); + +describe('matlab.toml edited into the wrong shape', () => { + // None of these may throw, and none may coerce: `parseTomlProject` is documented never + // to throw for a sharper reason than the other readers have, because this is the one + // format a user EDITS. A number where a path belongs and a key spelled the way last + // year's release spelled it are ordinary states of a real file. + + it('ignores a value of the wrong type everywhere one can appear', () => { + const parsed = read( + doc( + 'name = 42', + '[folders]', + 'path = 7', + '[project]', + 'startup-folder = 7', + 'startup-files = true', + 'shortcuts = "not a table"', + 'labels = "not a table either"', + '[simulink]', + 'cache-folder = ["an array where a string belongs"]', + ), + ); + expect(parsed.name).toBe(FALLBACK); + expect(parsed.pathFolders).toEqual([]); + expect(parsed.entryPoints).toEqual([]); + expect(parsed.labels).toEqual([]); + expect(parsed.workingFolders).toEqual([]); + // And still the format, still read: the document declared keys, so it is not empty. + expect(parsed.format).toBe('toml'); + expect(parsed.warnings).toEqual([]); + }); + + it('skips a non-string array entry rather than coercing it', () => { + // `String(42)` would put a member called `42` on a page and a path called `42` in a + // host's resolver. A number where a path belongs is not a path. + const parsed = read( + doc( + '[folders]', + 'path = ["utils", 42, true]', + '[project]', + 'startup-files = ["startup.m", 7]', + '[project.labels.Review]', + 'Checked = ["helper.m", 42]', + ), + ); + expect(parsed.pathFolders).toEqual(['utils']); + expect(parsed.entryPoints.map((e) => e.file)).toEqual(['startup.m']); + expect(parsed.labels.map((l) => l.declaredFiles)).toEqual([['helper.m']]); + expect(JSON.stringify(parsed)).not.toContain('42'); + }); + + it('reads an array of tables as declaring nothing, not as declaring none', () => { + // `[[dependencies]]` writes an ARRAY of tables, which is an object too — reading one + // AS a table finds every key absent. The `Array.isArray` guard is what keeps that + // from reporting a document which declares something this reader does not model as a + // document that declares nothing. + const parsed = read( + doc('[[dependencies]]', 'path = "../one"', '[[dependencies]]', 'path = "../two"'), + ); + expect(parsed.references).toEqual([]); + expect(parsed.warnings).toEqual([]); + expect(parsed.format).toBe('toml'); + }); + + it('ignores a TOML value no field here can be, without coercing it', () => { + // TOML has dates, times and integers-with-underscores, and smol-toml hands back a + // Date (and a bigint for a large integer) rather than a string. Neither is a path, + // and neither may reach a page as one — `String(new Date(...))` would put a weekday + // on a project. + const parsed = read( + doc( + 'name = 2026-10-02', + '[project]', + 'startup-folder = 09:30:00', + 'startup-files = [2026-10-02]', + '[project.shortcuts]', + 'listed = [{path = "main.m"}]', + ), + ); + expect(parsed.name).toBe(FALLBACK); + expect(parsed.workingFolders).toEqual([]); + expect(filesOf(parsed, 'StartUp')).toEqual([]); + // The shortcut survives on its key, as any unresolvable one does, and its file is + // empty rather than the stringification of an array of tables. + expect(parsed.entryPoints.map((e) => ({ name: e.name, file: e.file }))).toEqual([ + { name: 'listed', file: '' }, + ]); + expect(parsed.warnings).toEqual([]); + }); + + it('reads a label category that is not a table as no labels at all', () => { + const parsed = read( + doc('[project.labels]', 'Review = "not a table"', '[project.labels.Real]', 'Checked = []'), + ); + expect(parsed.labels.map((l) => l.id)).toEqual(['Real/Checked']); + }); +}); + +describe('matlab.toml that could not be read', () => { + it('reports a document that will not parse, in ONE line that says where', () => { + const parsed = read('name = "unterminated'); + expect(parsed.warnings).toHaveLength(1); + const [warning] = parsed.warnings; + expect(warning.code).toBe('source-unreadable'); + expect(warning.part).toBe('matlab.toml'); + // ONE line, deliberately. smol-toml appends a code excerpt with a caret under the + // offending character, which is right in a terminal and arrives in a tree row, a + // tooltip or a notification as ASCII art with the diagnosis scrolled off. So the + // excerpt is dropped and the position the caret pointed at is said in words instead, + // because a user editing this file by hand needs it. + expect(warning.message.split('\n')).toHaveLength(1); + expect(warning.message).not.toContain('^'); + expect(warning.message).toContain('unfinished string'); + expect(warning.message).toContain('at line 1, column 8'); + expect(warning.message).toContain('matlab.toml'); + }); + + it('says where in words for a failure further into the document', () => { + // The position is read off the error rather than assumed to be the first line, which + // is the only thing that makes it worth printing. + const parsed = read(doc('name = "fine"', '[project]', 'startup-files = [,]')); + expect(parsed.warnings[0].code).toBe('source-unreadable'); + expect(parsed.warnings[0].message).toMatch(/at line 3, column \d+/); + expect(parsed.warnings[0].message.split('\n')).toHaveLength(1); + }); + + it('reports a document carrying none of the keys that declare a project', () => { + const parsed = read(doc('# a TOML file, but not this one', 'unrelated = true')); + expect(parsed.warnings.map((w) => w.code)).toEqual(['source-empty']); + expect(parsed.warnings[0].message).toContain('declares no project settings'); + expect(parsed.warnings[0].part).toBe('matlab.toml'); + }); + + it('reports an empty file as empty', () => { + expect(read('').warnings.map((w) => w.code)).toEqual(['source-empty']); + expect(read('\n\n# nothing but a comment\n').warnings.map((w) => w.code)).toEqual([ + 'source-empty', + ]); + }); + + it('does NOT report a document whose only keys are ones this reader does not model', () => { + // A newer release's file, or a hand-written future one: it declares project settings, + // so it must not be reported as empty. The test is "none of the five known keys", + // which `name` alone satisfies here. + const parsed = read(doc('name = "Future"', 'quantum-folders = ["q"]')); + expect(parsed.warnings).toEqual([]); + expect(parsed.name).toBe('Future'); + }); + + it('still reports the format on BOTH failure paths, and still enumerates no members', () => { + // Where `ProjectParser`'s equivalent reports ''. The difference is real: a store that + // could not be walked never said which layout it was in, whereas this format is KNOWN + // even when the content is not — the caller dispatched on the file's NAME to get + // here. Blanking it would make a page that titles the view with the format show no + // format at all, for the one reason that has nothing to do with the format. + for (const parsed of [read('name = "unterminated'), read('unrelated = true')]) { + expect(parsed.format).toBe('toml'); + expect(parsed.membersEnumerated).toBe(false); + expect(parsed.files).toEqual([]); + expect(parsed.name).toBe(FALLBACK); + // Empty but complete: every collection is an array, so nothing downstream guards. + expect(parsed.pathFolders).toEqual([]); + expect(parsed.labels).toEqual([]); + expect(parsed.references).toEqual([]); + expect(parsed.entryPoints).toEqual([]); + expect(parsed.entryPointGroups).toEqual([]); + expect(parsed.workingFolders).toEqual([]); + } + }); +}); + +describe('matlab.toml through parseProject', () => { + it('is dispatched on by name, and keeps the fallback name it was handed', () => { + // The name a caller passes comes from `projectFallbackName`, which for a + // `matlab.toml` is the parent FOLDER's basename — the file is called `matlab.toml` in + // every project that has one, so a stem reduction would title all of them "matlab". + // This is the seam where that name arrives: a document recording no `name` must come + // back under the folder's. + const parsed = parseProject( + { 'matlab.toml': doc('[folders]', 'path = ["utils"]') }, + 'FolderName', + ); + expect(parsed.name).toBe('FolderName'); + expect(parsed.format).toBe('toml'); + expect(parsed.membersEnumerated).toBe(false); + expect(parsed.pathFolders).toEqual(['utils']); + }); + + it('reads the parity fixture identically through either entry point', () => { + expect(parseProject({ 'matlab.toml': FIXTURE }, FALLBACK)).toEqual( + parseTomlProject(FIXTURE, FALLBACK), + ); + }); +});