Skip to content

cb glue: the aliased TypeDecls carry their binding location - #44

Closed
aleksisch wants to merge 1 commit into
borisbat:masterfrom
aleksisch:aleksisch/typedecl-binding-location
Closed

cb glue: the aliased TypeDecls carry their binding location#44
aleksisch wants to merge 1 commit into
borisbat:masterfrom
aleksisch:aleksisch/typedecl-binding-location

Conversation

@aleksisch

Copy link
Copy Markdown
Collaborator

daslang is removing TypeDecl(Type) — the constructor that leaves a type with no source location. The rule there is now: a non-null TypeDecl has an at, and a type minted by a C++ binding says where it came from with cppBindingLineInfo() (the same call daslang's own typeFactory templates and Module::addAlias use).

This repo's three glue types were callers:

src/cb_dasIMGUI_NODE_EDITOR.h:11   NodeId
src/cb_dasIMGUI_NODE_EDITOR.h:34   LinkId
src/cb_dasIMGUI_NODE_EDITOR.h:57   PinId

cppBindingLineInfo has been in daScript/simulate/debug_info.h since 2026-08-12, so this builds against daslang master today, before the constructor removal lands. Without it, the daslang PR turns the fatman and wasmboy lanes red — both clone this repo.

🤖 Generated with Claude Code

aleksisch added a commit to GaijinEntertainment/daScript that referenced this pull request Aug 26, 2026
Both lanes clone borisbat/dasImguiNodeEditor at run time, and its glue still
calls the TypeDecl(Type) constructor this branch removes - three typeFactory
types in src/cb_dasIMGUI_NODE_EDITOR.h. The fix is open upstream as
borisbat/dasImguiNodeEditor#44; until it lands the lanes cannot compile.

This commit points both clones at that PR's branch so the rest of the change is
reviewable in green. REVERT IT before merge - it makes CI depend on a fork.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@aleksisch
aleksisch force-pushed the aleksisch/typedecl-binding-location branch from 7cba2bc to e0f1f29 Compare August 26, 2026 13:22
…d into

daslang removed `TypeDecl(Type)` - the constructor that leaves a type with no
source location - so the three glue types here (NodeId / LinkId / PinId) stamp
cppBindingLineInfo(), the call daslang's own typeFactory templates use.

Fixing the build surfaced why every tutorial-driving integration test was red,
and it was not the constructor: NODEEDITOR001 fired on `begin_delete`, the very
wrapper it tells consumers to use. It told a raw call from a wrapper body by
comparing fileInfo, and a block-taking wrapper is inlined during inference with
the CALL SITE's location, so both files matched. The inliner marks spliced nodes
generated and a hand-written call is not - measured on the failing app:
SetNodePosition (the user's own) gen=false, BeginDelete / EndDelete (spliced from
begin_delete) gen=true. With that flag in the guard the app compiles again; it
had been dying at `initial compile FAILED`, which left the harness polling a
snapshot with no widget registry until it timed out.

test_clipboard_tutorial then failed on macOS only: it fed `Super` under
ConfigMacOSXBehaviors, but dasImgui already pre-swaps Ctrl/Super for synth keys
to cancel ImGui's AddKeyEvent swap (imgui_boost_runtime.das - "a synth Ctrl lands
as io.KeyCtrl on every platform"), so Super double-swapped and no chord fired -
Ctrl+D left the node count at 2 where 3 was expected. The chord is Ctrl on every
platform now, matching the tutorial it drives.

Also the three style findings on the touched file: the comment fits one line
(STYLE015), the emitted message drops its em dash (STYLE039), and the unused
`require strings` goes (STYLE030).

Verified on Linux: integration dir 23 tests / 23 passed (from 8 failing), lint
clean on both touched files, the negative fixture failed_node_editor_lint_raw
still reports. The macOS chord path is NOT verified locally - no macOS box here;
the macos-latest lane is its proof.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant