Repository navigation
test: cover the 10.0.0 additions in the Native AOT consumer - #265
Merged
Merged
Conversation
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]>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #254
Problem
The Native AOT consumer in
test/consumer-smoke-test.shis the only check that code is actually compiled ahead of time (AGENTS.md). Of the 10.0.0 additions it exercised onlyFloat64Set,Float64Set<T>andFloat32Set<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 theSmokeJsoncontext, andFloat64Range.UnboundedEndgets an explicitTypeInfoPropertyName.Float64Rangevalue, variant and dictionary key;Float32Range;Float32Set; a NaN bound refused asJsonException.RangeSet<Float64Range, double>andRangeSet<Float32Range, float>are read but never built in the program, which is the closed-converter registration case.IComparable: non-genericArray.Sort(object[])with anull,ArrayList.SortoverRangeSets,List<DateRange>.SortandComparer<LocalDateRange>.Default.Shift(Int64Range,Float64RangeIEEE,LocalDateRangebyPeriod),Expand,Split(discrete,Float32Range,TimeSpan,DateRange.Month) andValues(step).Month/Quarter/Year/IsoWeekforDateRange,LocalDateRangeandYearMonthRange, including as a JSON dictionary key.Gap,Gaps,RangeAggoverFloat64Range, andRangeIntersectAggoverRangeSets.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.shon macOS arm64 passed: 48 AOT assertions (29 new), and no trim/AOT warnings from the packages.RangeSet<TRange, T>.ConvertersRegisteredreduced tofalse(no closed-converter registration), the smoke test fails 7 AOT assertions. Three of them are new:aot-f64-rangeset-read,aot-f32-rangeset-readandaot-range-agg. The source was restored afterwards.🤖 Generated with Claude Code