Skip to content

Commit 4e5bcf9

Browse files
committed
Merge branch 'master' of github.com:GaijinEntertainment/daScript
2 parents 86f5f93 + 9628c82 commit 4e5bcf9

37 files changed

Lines changed: 4647 additions & 161 deletions

.github/workflows/release.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,12 @@ jobs:
196196
cmake)
197197
case "${{ matrix.target }}${{ matrix.architecture }}" in
198198
linux64)
199-
cmake --no-warn-unused-cli -B./build -DCMAKE_BUILD_TYPE:STRING=${{ matrix.cmake_preset }} \
199+
# Match build.yml: use clang. The default ubuntu-24.04 g++ (GCC 13.3)
200+
# rejects AOT-generated patterns like `struct User { TTuple<…,Profile> Profile; }`
201+
# with -Wchanges-meaning, even though daslib/aot_cpp.das now emits
202+
# elaborated `struct Profile` to avoid that — keeping clang consistent
203+
# across CI eliminates the divergence.
204+
CC=clang CXX=clang++ cmake --no-warn-unused-cli -B./build -DCMAKE_BUILD_TYPE:STRING=${{ matrix.cmake_preset }} \
200205
-G "${{ matrix.cmake_generator }}" $ACTIVE_MODULES
201206
cmake --build ./build --config ${{ matrix.cmake_preset }} --parallel
202207
;;

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ _aot_generated/
2929

3030
opencoede.json
3131

32+
# blind-mouse — ignore the regenerable SQLite index, but check in the .md
33+
# corpus under mouse-data/docs/ so curated answers ship in PRs.
34+
mouse-data/index.db
35+
mouse-data/index.db-journal
36+
mouse-data/*.db-wal
37+
mouse-data/*.db-shm
38+
3239
modules/dasSFML/libsfml/
3340
site/
3441
doc/sphinx-build/

CLAUDE.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,21 @@ Same applies to lint/format: `mcp__daslang__lint` / `format_file`, not shell `bi
3535

3636
Fall back to `Bash`/`Grep`/`Read` only when the MCP tool reports an error or the question is genuinely outside MCP coverage (RST prose, CMake, Python tooling).
3737

38+
## Asking blind-mouse
39+
40+
Before doing significant research on a "how do I X?" / "what's the pattern for Y?" / "why does Z behave this way?" question, ask `mouse__ask`. blind-mouse (`utils/mouse/`) is a personal Q&A cache backed by curated `.md` answers — full vision in `utils/mouse/OVERVIEW.md`. Same deferred-tool dance as the daslang MCP: `ToolSearch select:mcp__mouse__<tool>` → invoke.
41+
42+
**During plan mode / planning phase, ask the mouse early and often.** Planning is exactly the phase where prior-session research has the highest leverage: each "what's the pattern for X" / "where do we usually put Y" / "why did we pick Z" answer that's already in the cache saves a research detour, and each new finding worth keeping is one `mouse__add` away from being free next time. Concrete planning-phase prompts: design questions ("what's the right pattern for adding a new `[sql_*]` annotation?"), prior-art questions ("have we hit this glob-vs-rfind path bug before?"), gotcha-recall ("what's the const-stripping reinterpret incantation?"), trade-off recall ("why did we pick (a) over (b) last time?"). If the cache has nothing useful, do the research yourself — then `mouse__add` the answer before moving on, even if rough. The cost of writing a brief `.md` is far smaller than re-researching the same thing.
43+
44+
| Reach for the mouse when… | Don't, when… |
45+
|---|---|
46+
| Planning a non-trivial change — sweep `mouse__ask` across the open questions before diving in | symbol lookup — use the daslang MCP (`find_symbol`, `grep_usage`, `find_references`) |
47+
| "how do I write a `[typefunction]` macro?" / "what's the right pattern for X?" / "why does Y behave this way?" | categorical conventions — those belong in `skills/*.md` / `CLAUDE.md` |
48+
| Discovered facts that don't fit any `skills/*.md` slot | project state, branch status, who's doing what — use git/issues/memory |
49+
| Recurring questions you remember answering before but forget the answer | |
50+
51+
If `mouse__ask` returns nothing relevant and you do the research yourself, finish with `mouse__add` so the next session doesn't redo the work. If a returned answer is stale or wrong, edit the `.md` directly under `mouse-data/docs/` (it's a regular file, `Edit` works) and bump `last_verified`.
52+
3853
## Skill Files (REQUIRED)
3954

4055
Task-specific instructions are split into skill files under `skills/`. You MUST read the relevant skill file(s) before performing the corresponding task.

CMakeLists.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1559,6 +1559,20 @@ install(DIRECTORY ${PROJECT_SOURCE_DIR}/utils/find-dupe/tests/
15591559
FILES_MATCHING PATTERN "*.das"
15601560
)
15611561

1562+
# Install blind-mouse (personal Q&A cache MCP server).
1563+
file(GLOB DAS_MOUSE_FILES ${PROJECT_SOURCE_DIR}/utils/mouse/*.das)
1564+
install(FILES ${DAS_MOUSE_FILES} DESTINATION utils/mouse)
1565+
install(FILES
1566+
${PROJECT_SOURCE_DIR}/utils/mouse/README.md
1567+
${PROJECT_SOURCE_DIR}/utils/mouse/OVERVIEW.md
1568+
${PROJECT_SOURCE_DIR}/utils/mouse/.das_package
1569+
DESTINATION utils/mouse
1570+
)
1571+
install(DIRECTORY ${PROJECT_SOURCE_DIR}/utils/mouse/tests/
1572+
DESTINATION utils/mouse/tests
1573+
FILES_MATCHING PATTERN "*.das" PATTERN "*.md"
1574+
)
1575+
15621576
# Install daspkg (package manager)
15631577
file(GLOB DAS_DASPKG_FILES ${PROJECT_SOURCE_DIR}/utils/daspkg/*.das)
15641578
install(FILES ${DAS_DASPKG_FILES} DESTINATION utils/daspkg)

daslib/aot_cpp.das

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,10 +342,15 @@ def describeCppTypeEx(typeDecl : TypeDeclPtr;
342342
}
343343
} elif (baseType == Type.tStructure) {
344344
if (typeDecl.structType != null) {
345+
// Elaborated-type-specifier (`struct X`) keeps GCC's -Wchanges-meaning
346+
// happy when a field name shadows the struct name in the same scope —
347+
// e.g. `struct User { TTuple<...,struct Profile> Profile; }`. Valid in
348+
// every C++ context where a bare struct name is, including template args
349+
// and qualified names.
345350
if (typeDecl.structType._module.name.empty()) {
346-
write(writer, "{aotStructName(typeDecl.structType)}")
351+
write(writer, "struct {aotStructName(typeDecl.structType)}")
347352
} else {
348-
write(writer, "{aotModuleName(typeDecl.structType._module)}::{aotStructName(typeDecl.structType)}")
353+
write(writer, "struct {aotModuleName(typeDecl.structType._module)}::{aotStructName(typeDecl.structType)}")
349354
}
350355
} else {
351356
write(writer, "DAS_COMMENT(unspecified structure) ");

0 commit comments

Comments
 (0)