[pull] master from GaijinEntertainment:master#995
Merged
Conversation
The step globbed `modules/dasImgui/example/*.das` (singular, flat), but the dasImgui repo reorganized to `examples/` (plural) with `features/` / `imgui_demo/` / `save_demo/` / `tutorial/` subdirs. Bash's unmatched glob was iterating the literal pattern, and daslang then failed with `error[20605]: missing prerequisite`. dasImgui has its own CI for example dry-runs, so the daslang side is redundant. Drop the step. The "Install dasImgui (daspkg)" + "Run self-binder (bind_imgui.das)" pair stays — that one's still meaningful on the daslang side (catches daslang binder drift against the dasImgui bindings). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…imgui-example-dryrun ci: drop dasImgui example dry-run from extended_checks
Sweep all .das under /utils, /modules, /tutorials to zero actionable
lint warnings; remaining 77 warnings + 3 errors are transitive from
daslib (sqlite_linq/linq/decs) or environment-dependent (ClangBind).
Touched 144 .das + 19 .rst files. Rules swept (fix where safe; nolint
with rationale where the construct is intentional, e.g. tutorials
demonstrating a specific form):
STYLE005 brace-around-single-terminator (if (x) { return Y })
STYLE012 array push runs (var arr; push;push;push)
STYLE013 struct + field-by-field assigns (use named-arg constructor)
STYLE016 adjacent guards combine via ||
STYLE017 ternary on bool (use && / ||)
STYLE018 literal bool comparison
STYLE020 from_JV(...) -> ?? on JV scalar
STYLE021 insert-many on JV table -> JV((k=v,...))
STYLE022 bitfield-as-field (foo |= BfT.bit -> foo.bit = true)
STYLE023 bitfield-as-field read (uint(bf & BfT.m) != 0u -> bf.m)
PERF001 string += in loop -> build_string()
PERF003 length(string) > 0 -> !empty(string)
PERF006 repeated container index -> assume
PERF007 starts_with on das_string -> peek()
PERF012 string(das_string) cast in inner loop -> peek()
PERF013 ternary assignment patterns
PERF015 .. PERF017 length(x) {==,<=,>} 0 -> empty/non-empty
PERF018 for (i in range(length(X))) -> for (c in X)
LINT001 dead code (unreachable after return)
LINT002 unused variables
LINT003 var -> let when never reassigned
LINT005 redundant reinterpret
LINT009 then == else
LINT007 nolint annotations on tutorials demonstrating == / >=
RST tutorials updated to teach lint-clean idioms (brace-removal in
04/05/12/24/38/42/52/dasAudio_07; bitfield, counter++, max() in
09/20/51; macro_verify length==0 -> empty in 01_call/14_pass/...; for
range -> for c in 11_reader; bitfield-as-field in 04/06).
Validation: lint-touched-files (144) -> 0 actionable, dastest 7428/0/6
pass (interpreter), AOT build + test_aot 7428/0/6 pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
doc: 09_for_loop_macro.rst literalinclude :lines: ranges shifted by brace removal in for_loop_macro_mod.das (file shrank from 81 to 75 lines). Realign 4 ranges to current line numbers. llvm_debug: drop double-negative `!(a != b)` -> direct `==` (Copilot). parser_generator: fix "Suburle" typo -> "Subrule" in TODO abort() message (Copilot). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Intro post for the lint / perf_lint / style_lint trio and the imgui_lint motivation arc. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…horsemen site/blog: add "The three horsemen" post
`let x = 10` makes x a compile-time constant; daslang folds the `if (x > 5)` and `if (x > 20)` branches at parse time, so dascov emits no BRDA records for lines 6/7 and `test_nested_branch` fails. The original `var x = 10` is required for the fixture to test runtime branch coverage. Reapply with nolint:LINT003 + rationale. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Closes the 12-gap audit from the daslang.io Forge sweep: - _static/custom-patch.css — additive overlay covering G1-G11 (bare links, admonition title colors, dashed table rows, sticky-nav scroll padding, hover-only headerlink arrow, branded selection, kbd styling, list marker colors, 720px prose cap, heading scale, rounded code-block border fix) plus an un-tokenized signature fallback in place of the G13a CSS band-aid. - conf.py — load custom-patch.css after custom.css. - daslang.py — G13b: tokenize function signatures with DaslangLexer so arglist + return type render with the same Pygments classes as code blocks (types in blue, params in fg, punctuation dim). Sphinx build verified locally (build succeeded, 2 unrelated warnings; 100 G13b token spans in reference/language/builtin_functions.html). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…utils-modules-tutorials lint: zero in-scope warnings under utils/, modules/, tutorials/
docs: Forge style refinements (G1-G11, G13b)
Follow-up to #2662. Mechanical fixes to daslib + module templates whose PERF017/PERF018/STYLE005/PERF015 warnings only fired through instantiation chains and were attributed to consumer tutorials/utils. daslib/linq.das L850 ternary min -> min(a,b) [PERF015] L1905 length(src) != 0 -> !empty(src) [PERF017] L1964 length(src) == 0 -> empty(src) [PERF017] L2375 length(src) == 0 -> empty(src) [PERF017] (first) L2399 length(src) == 0 -> empty(src) [PERF017] (first_or_default) L2748 chunk.length() > 0 -> !empty(chunk) [PERF017] daslib/decs.das L723 length(src) > 0 -> !empty(src) [PERF017] (decs_array) L1221 length(src) > 0 -> !empty(src) [PERF017] daslib/algorithm.das L411,422 for (i in range(length(a))) a[i] := value -> for (e in a) e := value [PERF018] (fill) L489,501,513,525 length(a) == 0 -> empty(a) [PERF017] (min_element / max_element) L564 while (length(unsorted) > 0) -> while (!empty(unsorted)) [PERF017] L568 length(.before) == 0 -> empty(.before) [PERF017] daslib/aot_cpp.das L444 braced single-return collapse [STYLE005] modules/dasOpenGL/opengl/opengl_boost.das L146 assert(length(arr) > 0) -> assert(!empty(arr)) [PERF017] (glBufferData template) modules/dasPEG/peg/parser_generator.das L1070 assert(length(action_block) > 0, ...) -> assert(!empty(action_block), ...) [PERF017] modules/dasPEG/peg/peg.das L128,178 braced single-return collapse [STYLE005] (match_decimal_literal, match_double_literal) modules/dasSQLITE/daslib/sqlite_boost.das L1132 for (i in range(length(want))) { let w = want[i] ... } -> for (w in want) { ... } [PERF018] (try_check_schema) Validation: lint on tutorials+modules+utils drops 116 -> 86 issues; remaining 86 are lint test fixtures (intentional) + dasImgui (separate repo). 8033/8039 dastest pass, 7422/7428 test_aot pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…-transitives lint: fix transitive PERF/STYLE warnings in daslib + modules
POSIX `dlopen(lib, RTLD_LAZY)` defaults to RTLD_LOCAL — symbols loaded
from each `.shared_module` stay private to that .so. This breaks any
host executable that expects to bind module-exported C symbols via
`dlsym(RTLD_DEFAULT, name)`:
* `daslang-live` looks up `live_host_*` C symbols (init/update/
shutdown driver, exit/reload flags, dt/uptime/fps setters) via
`dlsym(RTLD_DEFAULT, ...)` at startup (utils/daslang-live/main.cpp:
76-84, 87-108). Without RTLD_GLOBAL the lookup returns nullptr and
daslang-live prints `WARNING: could not find live_host DLL exports`
/ `lifecycle functions will use defaults` — every host integration
test that spawns daslang-live then hangs at the readiness gate.
* Windows path uses `GetModuleHandleA(...)` which sees every loaded
DLL regardless of flags, so the bug never surfaced on Windows.
daslang's main CI ran `live_host` tests against `daslang_static`
(symbols statically linked into the process), which also masks the
issue — only the dynamically-linked `daslang-live` host trips it.
Add `RTLD_GLOBAL` to the dlopen call sites in `loadDynamicLibrary` and
`getLibraryHandle` for Linux/Emscripten, macOS, and Haiku (six call
sites total).
Verified on WSL Ubuntu2404-CI: a minimal `[export] init/update/shutdown`
script that `require live_host` and reads `get_dt() / get_uptime()`
now prints non-zero values through `daslang-live` with no warnings.
Before the fix the same script printed both warnings and the lifecycle
ran on defaults (zero dt/uptime).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…-global fix: dlopen shared modules with RTLD_GLOBAL on POSIX
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )