Skip to content

test: cover the 10.0.0 additions in the Native AOT consumer - #265

Merged
CaffeinatedCoder merged 2 commits into
mainfrom
test/254-aot-consumer-10-0-0
Oct 19, 2026
Merged

CaffeinatedCoder merged 2 commits into
mainfrom
test/254-aot-consumer-10-0-0

Conversation

@CaffeinatedCoder

Copy link
Copy Markdown
Owner

Closes #254

Problem

The Native AOT consumer in test/consumer-smoke-test.sh is the only check that code is actually compiled ahead of time (AGENTS.md). Of the 10.0.0 additions it exercised only Float64Set, Float64Set<T> and Float32Set<T>. A regression in anything else would not show in CI.

Change

29 new Cases in the AOT consumer, each asserting its exact printed output. 16 entries were added to the SmokeJson context, and Float64Range.UnboundedEnd gets an explicit TypeInfoPropertyName.

  • Float ranges: Float64Range value, variant and dictionary key; Float32Range; Float32Set; a NaN bound refused as JsonException.
  • Range sets never constructed: RangeSet<Float64Range, double> and RangeSet<Float32Range, float> are read but never built in the program, which is the closed-converter registration case.
  • IComparable: non-generic Array.Sort(object[]) with a null, ArrayList.Sort over RangeSets, List<DateRange>.Sort and Comparer<LocalDateRange>.Default.
  • Arithmetic: Shift (Int64Range, Float64Range IEEE, LocalDateRange by Period), Expand, Split (discrete, Float32Range, TimeSpan, DateRange.Month) and Values(step).
  • Calendar factories: Month/Quarter/Year/IsoWeek for DateRange, LocalDateRange and YearMonthRange, including as a JSON dictionary key.
  • Gaps and aggregates: Gap, Gaps, RangeAgg over Float64Range, and RangeIntersectAgg over RangeSets.

Adapted from the consumer the final pre-release analysis wrote (#179). That consumer published with no IL warnings and printed the same output natively as under the JIT; the asserted strings are that output.

Tests

  • SMOKE_AOT_LINKER_ARGS="-L/opt/homebrew/opt/openssl@3/lib -L/opt/homebrew/opt/brotli/lib" bash test/consumer-smoke-test.sh on macOS arm64 passed: 48 AOT assertions (29 new), and no trim/AOT warnings from the packages.
  • Seed (AOT-only): with RangeSet<TRange, T>.ConvertersRegistered reduced to false (no closed-converter registration), the smoke test fails 7 AOT assertions. Three of them are new: aot-f64-rangeset-read, aot-f32-rangeset-read and aot-range-agg. The source was restored afterwards.

🤖 Generated with Claude Code

The AOT consumer exercised only the float sets of what 10.0.0 adds. It
now prints and asserts the float ranges (value, variant, dictionary key,
NaN refused), RangeSet<Float64Range> and RangeSet<Float32Range> read
without ever being built, the non-generic IComparable (Array.Sort over
object, ArrayList.Sort) and Comparer<T>.Default, Shift/Expand/Split/
Values(step), the core and NodaTime calendar factories with
Split(DateRange.Month), Gap/Gaps and RangeAgg/RangeIntersectAgg.

Adapted from the consumer the final pre-release analysis wrote, which
published with no IL warnings and printed the same output natively as
under the JIT; the 29 assertions are that output.

Closes #254

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@CaffeinatedCoder CaffeinatedCoder added this to the 10.0.0 milestone Oct 19, 2026
@CaffeinatedCoder CaffeinatedCoder added tests Adds or changes tests only (oracles, harnesses); no library code package/nodatime Affects CodoMetis.ValueRanges.NodaTime area/aot Native AOT and trimming package/core Affects CodoMetis.ValueRanges labels Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/aot Native AOT and trimming package/core Affects CodoMetis.ValueRanges package/nodatime Affects CodoMetis.ValueRanges.NodaTime tests Adds or changes tests only (oracles, harnesses); no library code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The Native AOT consumer doesn't exercise most 10.0.0 additions

1 participant