Skip to content

Commit b4258ee

Browse files
borisbatclaude
andauthored
install: ship what the docs promise + close the smoke-test hole that hid it (#3571)
* install: ship what the docs promise + close the smoke-test hole that hid it Audited `cmake --install` coverage against the tree. Seven gaps broke workflows the *shipped* docs tell users to follow; the worst is that `utils/mcp/setup.das` has never been installed, while the installed `utils/mcp/README.md` and the shipped `skills/mcp_tools.md` both document running it. The MCP bootstrap was impossible from a bundle through 0.6.4. Root cause of the class: ci/smoke_test_bundle.sh compiled 9 of the 14 installed .das entry points, and setup.das sat in the gap, so nothing ever noticed. All 14 are covered now (12 checks -> 17). Ship what was missing: - utils/mcp/setup.das + mcp_supervisor.py (the documented bootstrap). - utils/mcp/tests/ non-.das fixtures. `FILES_MATCHING PATTERN "*.das"` dropped _fixture_cpp_outline.h and _pretend_root/.../.das_module, both required by the installed test_tools.das, so the suite shipped unable to run those cases. - utils/lint/tests/ (77 files), so a bundle can self-check the linter. Verified: 51 tests, 51 passed via dastest inside the install tree. - examples/daStrudel/sfx_lab sounds/*.sfx + .das_package. The scripts read these via get_das_root(); shipping the scripts alone left them broken. - examples/graphics per-example .das_package + .gitignore. Each subdir is a daspkg -project-root whose release_main points at the shared source one level up, so the non-recursive glob dropped the load-bearing manifests. - examples/benchmarks/, documented in the installed examples/README.md. - aot_testing / llvm_tune / perf_lint / style_lint skills, cross-referenced by already-shipped skills. tutorials.md deliberately stays repo-only and the one reference to it (skills/xml.md) is reworded instead, since shipping it would drag in documentation_rst.md and onward. - tree-sitter-daslang/zed-daslang/, which install/README.md points users at. - CHANGELIST.md: a versioned bundle had no release notes. - integration_cpp_23 in the standalone tutorial recipe. The source shipped with no way to build it; handle_registry.h was already installed. Decouple tutorial data install from DAS_TUTORIAL_DISABLED. The install rules for all 79 C/C++ integration tutorial sources lived inside the gated include(), so "don't build the tutorial executables" silently also meant "don't ship the tutorial sources". release.yml never sets the flag, so shipping was fine today. Verified by flipping it: 50 integration-source refs survive in the install script. Hygiene: - Drop `FLEX(utils/dasFsormatter/ds_lexer.lpp)`: typo'd dir that does not exist, and dasFormatter has no .lpp at all. Inert only because no target consumed the output path. - examples/daspkg used a hardcoded DESTINATION instead of DAS_INSTALL_EXAMPLESDIR, and neither it nor examples/games excluded modules/ or build output, so a dev tree would ship daspkg junk. - file(STRINGS) on install/skills.list now passes ENCODING UTF-8. Without it, non-ASCII bytes act as separators: an em-dash in a comment splits the line and the tail is read as a skill filename, failing the guard with a nonsense path. Also fix the dasHV tutorial artifact that got committed: the server saves {upload_dir}/_testfile.txt but cleanup_upload_dir removed {dir}/testfile.txt (no underscore), so the file survived, remove(dir) failed on a non-empty dir, and _upload_test/_testfile.txt landed in git. Fix the name, untrack the file, gitignore the run dirs. Correct the Zed extension path in both READMEs (zed-daslang/, not editors/zed/). Record the durable rules in skills/install_instructions.md: the shipped-skill closure invariant with a check script, and the ASCII-only rule for skills.list. Verified end to end: release-flag bundle installed to a scratch prefix and diffed against the pre-fix bundle -- exactly 134 files added, nothing unintended; smoke test 17/17; zero dangling skill-to-skill references across 33 shipped skills. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WiXc1jvihNmEnU7DDQidvt * skills: make the SDK self-contained — one source per doc, and mark what can't ship Follow-up to the install audit in this PR. The shipped skills sent readers to 70 repo paths that a bundle never contains. Two problems were tangled together there, and they need opposite fixes. Where the skill relies on the content, the content now SHIPS, as markdown, with exactly one source file. Teach Sphinx to read markdown (myst-parser==2.0.0, the last line supporting sphinx 7.2.6) and each .rst becomes a ~13-line pointer that includes the .md via `.. include:: ... :parser: myst_parser.sphinx_`. daslang.io and the SDK then read the same bytes, so they cannot drift, and there is no generated artifact to keep in sync. Converted this way, and added to install/skills.list: skills/design_philosophy.md (was reference/design_philosophy.rst) skills/tune.md (was reference/tune.rst) skills/profiler.md (was reference/utils/profiler.rst) skills/linq_fold_patterns.md (was reference/linq_fold_patterns.rst) skills/detect_dupe_reference.md (was reference/utils/detect_dupe.rst) Two of those RST pages share a stem with an existing shipped skill, because they are the same topic twice. They are NOT the same case. memory_leak_detection.md said outright that its RST "covers the same material in docs style", so that pointer is simply reworded and nothing new ships — four of its five references now resolve to skills/profiler.md, inside the bundle. detect_dupe.rst is genuinely fuller than its skill (541 lines, five flag tables), so it ships under a non-colliding name. Breadcrumb pointers in json.md / regex.md / das_macros.md ("RST companion at", "generated stdlib reference at" — two of them naming stdlib/generated files that do not exist in a fresh checkout) point at the published page instead. Where the path is engine internals, the answer is the reverse of shipping it. src/, tests/, benchmarks/ and modules/*/src are never going into a bundle, so the line now says so with a repo-only token, and the reader skips it instead of hunting a path that is not there. 21 refs marked: two heading retitles cover 7 (cpp_integration's "C++ Codebase Notes", jobque_debugging's "Key files"), and 12 one-off prose mentions are marked inline so the sentence stays with the point it supports. Enforced per-PR by ci/check_shipped_skill_refs.awk, run from ci/smoke_test_bundle.sh (build.yml's bundle_smoke job, which triggers on pull_request) — no new CI wiring. Smoke test 17 -> 18 checks. Exemption is SECTION-scoped and resets at each heading: a trailing-marker rule would leak the exemption through the rest of the file, which is wrong for cpp_integration.md where the internals section sits mid-file. Fenced blocks are exempt because they quote tool output verbatim, including a compiler warning that literally prints a doc/source path. tests/ is deliberately not in the pattern yet (53 refs, 24 of them in aot_testing.md) — that class still needs sorting into inline-the-snippet vs quarantine, and the awk says so. Verified, not assumed: * docs built with CI's exact command (sphinx-build -W --keep-going): ZERO new warnings, six removed, against a 282-line baseline. Page labels had to move into the .rst stubs, because a MyST (label)= target does NOT register in Sphinx's std domain when the markdown arrives through an include with :parser:; and two bare :ref: uses needed explicit link text once the title moved into the markdown. * the checker negative-tested: clean passes; an unmarked src/ path fails with file:line; the same line marked repo-only passes; a fenced path is ignored. * doc/source citations from shipped skills: 9 -> 1, and that one is a compiler warning quoted inside a fence, which must stay verbatim. * bundle reinstalled; 38 skills ship; zero dangling skill-to-skill references. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WiXc1jvihNmEnU7DDQidvt * skills: gate the mechanical failures, split writing_tests, document how to write a skill Three pieces: a per-PR gate for what a script can check, a review skill for what it can't, and a CLAUDE.md section so the decision gets made before the writing. ci/check_shipped_skills.py replaces the awk from the previous commit. The link check needs to tell a missing file from a directory, which awk cannot do portably, so this is Python — invoked from ci/smoke_test_bundle.sh and skipped (not failed) when no interpreter is present, so the script stays runnable on a bare box. Five classes, all in a SHIPPED skill: * src/, doc/source/, benchmarks/, modules/*/{src,tests,tutorial,harness} * bin/Release|Debug/... -- the Windows repo layout; a bundle has bin/daslang * daslang.exe <script> -- .exe is Windows-only * C:\Users\..., /home/<name>/..., AppData -- someone's machine in a doc * a relative link whose target is absent from the bundle * skills/<other>.md where <other> is not shipped (the closure invariant, ported over) It found 34 real hits, all now fixed. 14 were bin/Release/daslang.exe -- including the first three lines of das_formatting.md, i.e. instructions that are wrong on two of three platforms. 8 were dead links, 3 named generated .rst that exists nowhere, 9 were .exe invocations. Narrowness was the hard part, and two of my own patterns were wrong before they were right. A naive absolute-path regex matched every http:// URL (77 false hits) and the \\-UNC branch matched \\d and \\s in regex prose; that check is now scoped to machine-local paths only, so the 17 deliberate C:/DummyRoot examples in external_module_debugging.md stay quiet. The link resolver joined against the bundle root while links are authored relative to skills/, which made 19 live links look dead. And the .exe check flagged prose ("shared across `daslang.exe` and every module DLL") until it required the next token to be a flag or a real file. A gate that cries wolf gets muted, and then it is worse than no gate — so all 21 shapes are negative-tested: 9 must-fail, 10 false-positive shapes that must stay quiet, plus a check that a section-scoped repo-only marker RESETS at the next heading instead of leaking down the file. Also fixed while wiring it up: `command -v python3` finds the Windows Store shim, which is on PATH but exits "Permission denied". The probe now executes the interpreter. Split writing_tests.md, which was two audiences in one file. The universal dastest guidance stays and ships; the repo's own harness — AOT registration for a new tests/ dir, the tests/.das_test gating filter and its root-path caveat, per-folder sweep gating, deep-engine model-test rules — moves to skills/tests_in_repo.md, deliberately NOT shipped. The shipped half also now points at dastest/tests, which ships and doubles as a worked example, instead of tests/linq, which does not. My first draft of the shipped file referenced skills/tests_in_repo.md — the exact closure violation documented one commit earlier — which is why the closure check is now enforced by the script rather than living as a shell snippet in a doc. New skills/writing_skills.md (repo-only) covers what no script can: pick the audience BEFORE writing, because a mixed file serves neither and splitting it afterwards is a reorganization rather than a cut (aot_testing.md is the standing example, still unsplit); check whether an existing skill or doc/source page already owns the topic, since two documents drifting apart beats one imperfect one; verify syntax claims by probe rather than recall; and never silence the gate with a marker when the honest answer is a split. CLAUDE.md gains a short "Writing a new skill" section pointing at it, plus a table row. Verified: smoke test 18 checks green; gate exits 0 against the reinstalled bundle; 38 skills ship; tests_in_repo.md and writing_skills.md correctly absent from it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WiXc1jvihNmEnU7DDQidvt * skills: don't ship aot_testing.md, and gate tests/ now that nothing needs it aot_testing.md is the daslang repo's AOT test harness -- the test_aot binary, tests/aot registration, libDaScriptAot regeneration, CI wiring. An SDK user has no way to act on any of it, so it is not their skill and it no longer ships. That is simpler and more honest than the split I was heading for, and it reverts churn: the six edits I had made to that file were all gate-appeasement, including turning bin/Release/daslang.exe into bin/daslang, which is a REGRESSION for Windows repo devs whose layout really is bin/Release. The file is now byte-identical to master again. The only shipped skill that referenced it was cpp_integration.md. Rather than drop the pointer, that section now carries the actionable part inline -- generate stubs with `bin/daslang -aot in.das out.cpp`, add -aot-macros for macros, regenerate on error[50101] -- and names aot_testing.md as repo-only for the harness itself. install/ CLAUDE.md loses its row; install/skills.list explains WHY the file is absent, so the next person does not re-add it to satisfy the closure invariant. With aot_testing.md out and writing_tests.md already split, tests/ can finally join the gate pattern. That surfaced 10 more refs in shipped skills, all worked-example pointers into the repo test corpus (das_macros, dashv, daslib_modules, llvm_tune, xml, plus two in my own new prose) -- each now marked rather than deleted, since they are useful to a repo reader and simply absent for an SDK one. The marker is now PARAGRAPH-scoped, not line-scoped. Two of those last ten hits were text I had just written, where the marker landed one line away from the path because the sentence wrapped -- twice. Scoping per-line means an author has to reflow prose to satisfy the gate, which is exactly how a gate earns being muted. A marker anywhere in a paragraph now covers it; the exemption still does not leak across a blank line, and heading-scoped and line-scoped markers are unchanged. Verified both directions. Two process traps hit while doing this, both worth knowing: * `cmake --install` is ADDITIVE. Un-shipping a file leaves the old copy in the prefix, so the gate ran green against a bundle that still contained aot_testing.md. Removing the prefix first is the only way to see the real shipped set. * install/skills.list is read at CONFIGURE time via file(STRINGS). Editing it and running only `cmake --install` installs the OLD list. Reconfigure first. Verified: fresh install ships 37 skills with aot_testing.md absent; gate exits 0; smoke test 18 checks green; the full negative-test suite still passes (9 must-fail classes, 10 false-positive shapes that must stay quiet, section-marker reset, and the two new paragraph-scope cases). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WiXc1jvihNmEnU7DDQidvt Also adds ci/reinstall_bundle.sh: reconfigure + wipe prefix + install + verify in one command, so the loop is a single reviewable invocation instead of an ad-hoc `rm -rf`. It guards the delete -- refuses anything that is not absent or recognizably an installed bundle, and refuses a source checkout outright -- and its comments encode the two traps above so the next person does not rediscover them. --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 91b9a69 commit b4258ee

60 files changed

Lines changed: 2991 additions & 2358 deletions

Some content is hidden

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

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,13 @@ utils/**/modules/
126126
examples/games/sequence/modules/.daspkg.log
127127
tutorials/integration/cpp/_standalone_ctx_generated/standalone_context.das.cpp
128128
tutorials/integration/cpp/_standalone_ctx_generated/standalone_context.das.h
129+
# dasHV tutorials 04/05 create these under get_das_root() at run time and clean
130+
# them up on exit; they are run artifacts, never fixtures.
131+
tutorials/dasHV/_upload_test/
132+
tutorials/dasHV/_static_test/
133+
tutorials/dasHV/_testfile.txt
134+
# dasAudio tutorial 07 writes its wav outputs beside the tutorial source.
135+
tutorials/dasAudio/_tutorial_*.wav
129136
# shared-module PDBs — Release now emits /Z7+/DEBUG side PDBs for every module
130137
# (was an enumerated list; the glob covers the modules that only started getting PDBs)
131138
modules/**/*.pdb

CLAUDE.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
This is the [daslang](https://daslang.io/) programming language repository (GaijinEntertainment/daScript). daslang (formerly daScript) is a high-performance statically-typed scripting language for games and real-time applications. The repository and many C++ API names still use the old "daScript" spelling.
66

7-
For the **why** — design principles, three-tier execution model, the macros-as-design-lens rule — read `skills/project_overview.md`. The full long-form rationale lives in `doc/source/reference/design_philosophy.rst`.
7+
For the **why** — design principles, three-tier execution model, the macros-as-design-lens rule — read `skills/project_overview.md`. The full long-form rationale lives in `skills/design_philosophy.md`, which is also the single source `doc/source/reference/design_philosophy.rst` includes for daslang.io — edit the `.md`, never a copy.
88

99
## Build & Run
1010

@@ -55,7 +55,8 @@ Task-specific instructions are split into skill files under `skills/`. You MUST
5555
| `skills/build_and_debug.md` | Build flags, AOT build commands, exit-code/crash diagnosis, `options log_infer_passes` |
5656
| `skills/mcp_tools.md` | Full MCP tool table + live-API reference |
5757
| `skills/das_formatting.md` | Creating or modifying any `.das` file |
58-
| `skills/writing_tests.md` | Writing or editing test files under `tests/` |
58+
| `skills/writing_tests.md` | Writing or editing any dastest test (ships in the SDK; applies everywhere) |
59+
| `skills/tests_in_repo.md` | Adding/moving tests **in this repo** — AOT registration for a new `tests/` dir, the `tests/.das_test` gating filter, deep-engine model-test rules. Repo-only; deliberately not shipped |
5960
| `skills/writing_cpp_tests.md` | Writing or editing C++ tests under `tests-cpp/` (doctest, leak guards, ctest wiring) |
6061
| `skills/documentation_rst.md` | Editing RST in `doc/source/`, `//!` doc-comments in `daslib/*.das`, tutorial RST pages |
6162
| `skills/tutorials.md` | Anything that looks like a tutorial — they live under `/tutorials/<area>/`, NEVER `modules/<X>/tutorial/` |
@@ -69,6 +70,7 @@ Task-specific instructions are split into skill files under `skills/`. You MUST
6970
| `skills/dynamic_modules.md` | `.das_module` descriptors, adding modules under `modules/` |
7071
| `skills/external_module_debugging.md` | Working on an external daslang module (dasImgui, dasPUGIXML, dasSQLITE, etc.) locally — need to run/lint/test from a standalone daslang.exe or via MCP before push-to-CI. Covers the `<DummyRoot>/modules/<your-module>` junction pattern + `project_root` MCP arg |
7172
| `skills/install_instructions.md` | Updating `install/CLAUDE.md` or `install/skills/` for the shipped SDK |
73+
| `skills/writing_skills.md` | Adding a `skills/*.md` file, moving content between skills, or reviewing a skill change — the audience decision (SDK vs repo-only), the shipping gate, and the review checklist for what the gate can't check |
7274
| `skills/aot_testing.md` | AOT test files, `test_aot` binary, `Module::aotRequire()`, AOT hash mismatches |
7375
| `skills/llvm_tune.md` | The `[tune]` kernel-tuning framework — `[tune_perm]`/`[tune_scope]`/`[tune_policy]`/`--tune`, per-box manifests, the runtime-tune-and-re-exec model, the AOT/-exe gates, adding a kernel family (`modules/dasLLVM/daslib/llvm_tune.das`) |
7476
| `skills/visitor_gen_bind.md` | Adding `Visitor` virtual methods / `canVisit*` gates / `gen_bind.das` regen |
@@ -116,6 +118,14 @@ When you discover something new about daslang syntax, semantics, or conventions
116118

117119
**Doc improvements at stopping points.** Propose-first applies only to what's left: restructuring, removing existing guidance, **or proposing a new skill file when you see a recurring pattern that no existing skill covers**. Doc edits direct future Claude behavior, so structural diffs still get review — but factual drift must be self-healing, not queued behind it.
118120

121+
### Writing a new skill
122+
123+
Read `skills/writing_skills.md` first — it carries the full checklist. The three things that matter most:
124+
125+
1. **Decide the audience before writing.** Skills named in `install/skills.list` are copied verbatim into the SDK bundle, where `src/`, `tests/`, `benchmarks/`, `doc/source/` and `modules/*/src` **do not exist**. A skill that mixes SDK-usable content with repo plumbing serves neither audience and is painful to split later. Ship it and push repo bits into a `(repo-only)` section, or keep the whole file repo-only and leave it off the list.
126+
2. **Never fix an audience mismatch by shipping `src/` or `tests/`.** Mark the line `repo-only` instead (works on a line, or on a heading to cover a whole section). `python3 ci/check_shipped_skills.py <bundle> install/skills.list` enforces this per-PR via `ci/smoke_test_bundle.sh`; it also catches `bin/Release/…` paths, `daslang.exe` invocations, machine-local paths, dead relative links, and references to skills that aren't shipped.
127+
3. **Register it in all the places.** `skills/<name>.md`, plus a row in the top-level `CLAUDE.md` table; if shipped, also `install/skills.list` **and** a row in `install/CLAUDE.md`. A skill with no trigger row is a skill nobody opens.
128+
119129
## daslang Language — Gen2 Syntax (REQUIRED)
120130

121131
**gen2 is the DEFAULT parser** — every `.das` file parses as gen2 unless it explicitly opts out with `options gen2 = false` (the only gen1 discriminator; the `options gen2` markers around the tree are historical no-ops — NEVER infer gen1 from their absence). All code MUST use gen2 syntax; house style still adds `options gen2` at the top of new files. Key rules:

CMakeLists.txt

Lines changed: 76 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,6 @@ FLEX(src/parser/ds_lexer.lpp)
821821
FLEX(src/parser/ds2_lexer.lpp)
822822
BISON(src/parser/ds_parser.ypp)
823823
BISON(src/parser/ds2_parser.ypp)
824-
FLEX(utils/dasFsormatter/ds_lexer.lpp)
825824
BISON(utils/dasFormatter/ds_parser.ypp)
826825

827826
SET(PARSER_GENERATED_SRC
@@ -1799,12 +1798,17 @@ install(FILES
17991798
install(FILES ${PROJECT_SOURCE_DIR}/install/README.md DESTINATION ${DAS_INSTALL_DOCDIR})
18001799
install(FILES ${PROJECT_SOURCE_DIR}/install/CLAUDE.md DESTINATION ${DAS_INSTALL_DOCDIR})
18011800
install(FILES ${PROJECT_SOURCE_DIR}/GETTING_STARTED.md DESTINATION ${DAS_INSTALL_DOCDIR})
1801+
# Release notes — a versioned bundle with no changelog leaves users diffing binaries.
1802+
install(FILES ${PROJECT_SOURCE_DIR}/CHANGELIST.md DESTINATION ${DAS_INSTALL_DOCDIR})
18021803
install(FILES ${PROJECT_SOURCE_DIR}/install/.gitignore DESTINATION ${DAS_INSTALL_DOCDIR})
18031804

18041805
# Skills shipped to the SDK — the manifest install/skills.list names which
18051806
# files from skills/ get copied into the install tree under skills/. Keeps
18061807
# top-level skills/ as the single source of truth (no install/skills/ mirror).
1807-
file(STRINGS ${PROJECT_SOURCE_DIR}/install/skills.list SHIPPED_SKILLS_RAW)
1808+
# ENCODING UTF-8: without it file(STRINGS) treats non-ASCII bytes as separators,
1809+
# so a stray em-dash in a comment splits the line and the tail is read as a
1810+
# filename, failing the check below with a nonsense path.
1811+
file(STRINGS ${PROJECT_SOURCE_DIR}/install/skills.list SHIPPED_SKILLS_RAW ENCODING UTF-8)
18081812
set(SHIPPED_SKILLS "")
18091813
foreach(LINE IN LISTS SHIPPED_SKILLS_RAW)
18101814
string(STRIP "${LINE}" LINE)
@@ -1848,6 +1852,10 @@ install(DIRECTORY ${PROJECT_SOURCE_DIR}/utils/requirefix/testdata/
18481852
# cpp_main.das — cpp/agnostic-subset entry point
18491853
# mcp_core.das — transport-neutral core protocol_core requires
18501854
# protocol_core.das + registry_das.das + registry_cpp.das — shared dispatch + tool registry
1855+
# setup.das — bootstrap for a fresh tree; the installed README and the
1856+
# shipped skills/mcp_tools.md both document running it, so it
1857+
# must ship (it was missing through 0.6.4)
1858+
# mcp_supervisor.py — the stdio supervisor setup.das writes into .mcp.json
18511859
install(FILES
18521860
${PROJECT_SOURCE_DIR}/utils/mcp/main.das
18531861
${PROJECT_SOURCE_DIR}/utils/mcp/cpp_main.das
@@ -1856,6 +1864,8 @@ install(FILES
18561864
${PROJECT_SOURCE_DIR}/utils/mcp/registry_das.das
18571865
${PROJECT_SOURCE_DIR}/utils/mcp/registry_cpp.das
18581866
${PROJECT_SOURCE_DIR}/utils/mcp/cpp_search_config.das
1867+
${PROJECT_SOURCE_DIR}/utils/mcp/setup.das
1868+
${PROJECT_SOURCE_DIR}/utils/mcp/mcp_supervisor.py
18591869
${PROJECT_SOURCE_DIR}/utils/mcp/daslang-mcp-msvc.cmd
18601870
${PROJECT_SOURCE_DIR}/utils/mcp/README.md
18611871
DESTINATION utils/mcp
@@ -1868,9 +1878,15 @@ install(FILES
18681878
${PROJECT_SOURCE_DIR}/utils/mcp/test_tools.das
18691879
DESTINATION utils/mcp
18701880
)
1881+
# The installed test_tools.das drives two non-.das fixtures — _fixture_cpp_outline.h
1882+
# (cpp_outline) and _pretend_root/modules/pretend_mod/.das_module (project_root) — so a
1883+
# bare "*.das" filter ships the suite in a state where those cases cannot run.
18711884
install(DIRECTORY ${PROJECT_SOURCE_DIR}/utils/mcp/tests/
18721885
DESTINATION utils/mcp/tests
1873-
FILES_MATCHING PATTERN "*.das"
1886+
FILES_MATCHING
1887+
PATTERN "*.das"
1888+
PATTERN "*.h"
1889+
PATTERN ".das_module"
18741890
)
18751891

18761892
# Install LSP server (Claude Code plugin: push diagnostics after every edit +
@@ -1909,8 +1925,13 @@ file(GLOB DAS_BENCHCTL_FILES ${PROJECT_SOURCE_DIR}/utils/benchctl/*.das)
19091925
install(FILES ${DAS_BENCHCTL_FILES} DESTINATION utils/benchctl)
19101926
install(FILES ${PROJECT_SOURCE_DIR}/utils/benchctl/README.md DESTINATION utils/benchctl)
19111927

1912-
# Install lint (unified linter)
1928+
# Install lint (unified linter) + its rule-coverage suite, so a shipped SDK can
1929+
# self-check the linter the same way run_utils_tests does in-tree.
19131930
install(FILES ${PROJECT_SOURCE_DIR}/utils/lint/main.das DESTINATION utils/lint)
1931+
install(DIRECTORY ${PROJECT_SOURCE_DIR}/utils/lint/tests/
1932+
DESTINATION utils/lint/tests
1933+
FILES_MATCHING PATTERN "*.das"
1934+
)
19141935

19151936
# Install hygiene (comment/doc hygiene checker)
19161937
file(GLOB DAS_HYGIENE_FILES ${PROJECT_SOURCE_DIR}/utils/hygiene/*.das)
@@ -1974,9 +1995,20 @@ install(FILES
19741995
DESTINATION utils/das-fmt
19751996
)
19761997

1977-
# Install daspkg examples
1998+
# Install daspkg examples. Whole-dir install, so exclude everything daspkg
1999+
# generates in a working tree — modules/ (fetched deps), the lock file, build
2000+
# output and shared modules would otherwise all land in the bundle.
19782001
install(DIRECTORY ${PROJECT_SOURCE_DIR}/examples/daspkg/
1979-
DESTINATION examples/daspkg
2002+
DESTINATION ${DAS_INSTALL_EXAMPLESDIR}/daspkg
2003+
PATTERN "modules" EXCLUDE
2004+
PATTERN "_build" EXCLUDE
2005+
PATTERN ".daspkg_cache" EXCLUDE
2006+
PATTERN ".daspkg_tmp" EXCLUDE
2007+
PATTERN ".jitted_scripts" EXCLUDE
2008+
PATTERN "_aot_generated" EXCLUDE
2009+
PATTERN "daspkg.lock" EXCLUDE
2010+
PATTERN ".daspkg.log" EXCLUDE
2011+
PATTERN "*.shared_module" EXCLUDE
19802012
)
19812013

19822014
# Install daslive examples
@@ -1994,6 +2026,9 @@ install(DIRECTORY ${PROJECT_SOURCE_DIR}/examples/daslive/
19942026
# Install game examples with their full directory structure.
19952027
install(DIRECTORY ${PROJECT_SOURCE_DIR}/examples/games/
19962028
DESTINATION ${DAS_INSTALL_EXAMPLESDIR}/games
2029+
PATTERN "modules" EXCLUDE
2030+
PATTERN "_build" EXCLUDE
2031+
PATTERN "*.shared_module" EXCLUDE
19972032
PATTERN ".daspkg_cache" EXCLUDE
19982033
PATTERN ".daspkg_tmp" EXCLUDE
19992034
PATTERN ".daspkg.log" EXCLUDE
@@ -2062,13 +2097,37 @@ install(FILES ${DAS_DEBUGAPI_EXAMPLES}
20622097
DESTINATION ${DAS_INSTALL_EXAMPLESDIR}/debugapi
20632098
)
20642099

2065-
file(GLOB DAS_GRAPHICS_EXAMPLES
2066-
${PROJECT_SOURCE_DIR}/examples/graphics/*.das
2067-
${PROJECT_SOURCE_DIR}/examples/graphics/.das_package
2068-
${PROJECT_SOURCE_DIR}/examples/graphics/README.md
2069-
)
2070-
install(FILES ${DAS_GRAPHICS_EXAMPLES}
2100+
# Each per-example subdir (furier/, path_tracer_lab/, physarum_lab/) is a daspkg
2101+
# -project-root: its own .das_package names the package and points release_main at the
2102+
# shared source one level up, so those manifests are load-bearing for the cross-compile
2103+
# path and must ship beside the .das. modules/ holds the daspkg-installed dasImgui dep
2104+
# (a gitignored build artifact), so it stays excluded.
2105+
install(DIRECTORY ${PROJECT_SOURCE_DIR}/examples/graphics/
20712106
DESTINATION ${DAS_INSTALL_EXAMPLESDIR}/graphics
2107+
FILES_MATCHING
2108+
PATTERN "*.das"
2109+
PATTERN ".das_package"
2110+
PATTERN ".gitignore"
2111+
PATTERN "README.md"
2112+
PATTERN "modules" EXCLUDE
2113+
PATTERN ".daspkg_cache" EXCLUDE
2114+
PATTERN ".jitted_scripts" EXCLUDE
2115+
PATTERN "_aot_generated" EXCLUDE
2116+
)
2117+
2118+
# Install the SQL benchmark lanes. The installed examples/README.md documents this
2119+
# folder and links its README, so it has to ship; the DuckDB/PostgreSQL providers are
2120+
# daspkg-installed into modules/ from the folder's .das_package at run time (the SQLite
2121+
# lane and the array baseline work against the bundled dasSQLITE alone).
2122+
install(DIRECTORY ${PROJECT_SOURCE_DIR}/examples/benchmarks/
2123+
DESTINATION ${DAS_INSTALL_EXAMPLESDIR}/benchmarks
2124+
FILES_MATCHING
2125+
PATTERN "*.das"
2126+
PATTERN "*.md"
2127+
PATTERN ".das_package"
2128+
PATTERN "modules" EXCLUDE
2129+
PATTERN ".daspkg_cache" EXCLUDE
2130+
PATTERN ".jitted_scripts" EXCLUDE
20722131
)
20732132

20742133
# Install node-editor example
@@ -2279,6 +2338,11 @@ if(NOT ${DAS_TREE_SITTER_DISABLED})
22792338
tree-sitter-daslang/queries/highlights.scm
22802339
DESTINATION tree-sitter-daslang/queries
22812340
)
2341+
# The Zed extension — the installed install/README.md points users at this
2342+
# directory, so it has to travel with the bundle.
2343+
install(DIRECTORY tree-sitter-daslang/zed-daslang/
2344+
DESTINATION tree-sitter-daslang/zed-daslang
2345+
)
22822346
# Install platform-specific sgconfig.yml for ast-grep (used by grep_usage and outline MCP tools)
22832347
install(FILES "${SGCONFIG_TEMPLATE}" DESTINATION . RENAME sgconfig.yml)
22842348
install(FILES

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ A full tree-sitter grammar for daslang lives in [`tree-sitter-daslang/`](tree-si
107107
Use it for:
108108
- **Syntax highlighting**`queries/highlights.scm` included, works in editors that support tree-sitter (Neovim, Helix, Zed)
109109
- **Parse-aware search** — via [ast-grep](https://ast-grep.github.io/) (`sg`) for structural code search across `.das` files
110-
- **Editor extensions**`tree-sitter-daslang/editors/zed/` includes a Zed extension
110+
- **Editor extensions**`tree-sitter-daslang/zed-daslang/` includes a Zed extension
111111

112112
Build the grammar:
113113
```sh

0 commit comments

Comments
 (0)