Skip to content

Add GDC 15 CI coverage and improve compiler compatibility - #144

Merged
jmh530 merged 8 commits into
libmir:masterfrom
jmh530:codex/gdc-compatibility
Oct 5, 2026
Merged

jmh530 merged 8 commits into
libmir:masterfrom
jmh530:codex/gdc-compatibility

Conversation

@jmh530

@jmh530 jmh530 commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Add a GDC 15 unittest job using Ubuntu 26.04’s standard packages,
and improve compatibility with older D compiler frontends.

  • Restrict -lowmem to DMD and LDC.
  • Simplify weighted-quantile element-type deduction and diagnose
    conversions that change the input element type.
  • Fix histogram lifetime compatibility with GDC 14 while preserving
    custom axes that retain observations.
  • Work around DMD 2.111/2.112 miscompilations in recursive RC row
    traversal, histogram initialization, and adaptive count views.
    Keep these workarounds disabled on other compilers and versions.

Regression tests cover retaining custom axes, noncopyable projection
cells, and weighted-quantile input conversions.

Validation: the combined optimized release suite passes all 55 modules
on DMD 2.111.0, 2.112.1, 2.113.0, and LDC 1.41.0. All hosted CI checks
pass, including the GDC 15 unittest job.

Optimized GDC testing remains blocked with the current dependency by
an ndslice safety-check helper, tracked in libmir/mir-algorithm#483.
The upstream fix is proposed in libmir/mir-algorithm#484. This PR
includes no dependency workaround or warning suppression.

jmh530 added 3 commits October 4, 2026 02:59
Apply compiler-specific settings to all affected DUB test builds so GDC no longer receives the unsupported -lowmem flag.

AI-Assisted-By: Codex (GPT-6 Astra Medium)
Deduce the observation type directly without instantiating a slice conversion on Data.init, avoiding static-array lifetime errors on GDC 14.

Reject input conversions that change the element type with a diagnostic requesting explicit conversion to a Mir slice. Add regression tests for rejection, explicit conversion, and supported result-type selection.

AI-Assisted-By: Codex (GPT-6 Astra Medium)
Install GDC 15 and DUB from the standard Ubuntu repositories, report toolchain versions, and run the standard unit test suite.

AI-Assisted-By: Codex (GPT-6 Astra Medium)
@codecov

codecov Bot commented Oct 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

jmh530 added 5 commits October 4, 2026 04:56
Select scoped range insertion through a compile-time probe while preserving inferred lifetimes for custom axes that retain observations. Borrow factory inputs with auto ref to avoid an extra owning-range copy.

Adjust nested proxy test initialization for older frontends and add regression coverage for retaining custom axes.

AI-Assisted-By: Codex (GPT-6 Astra Medium)
Use scoped row handles during recursive histogram traversal only on affected DMD versions. Preserve the original value-passing path and vectorization on other compilers.

Add a regression test for projection with noncopyable array cells.

AI-Assisted-By: Codex (GPT-6 Astra Medium)
Reference mir-algorithm issue #483 and note when to revisit unittest-release coverage for GDC.

AI-Assisted-By: Codex (GPT-6 Astra Medium)
Zero histogram counters by index on affected DMD versions to avoid axis corruption when the owning range copy is inlined. Preserve the existing loop on other compilers and versions.

AI-Assisted-By: Codex (GPT-6 Astra Medium)
Disable SharedCountField.lightConst inlining on affected DMD versions to preserve correct adaptive count views. Retain normal inlining on other compilers and versions.

AI-Assisted-By: Codex (GPT-6 Astra Medium)
@jmh530
jmh530 marked this pull request as ready for review October 5, 2026 16:01
@jmh530
jmh530 merged commit c7d809b into libmir:master Oct 5, 2026
67 of 90 checks passed
@jmh530
jmh530 deleted the codex/gdc-compatibility branch October 5, 2026 16:10
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