Repository navigation
Fix scripts to build against the IReadOnlyList public API - #30
Merged
Merged
Conversation
The library collections moved from ImmutableArray<T> to IReadOnlyList<T>, so the file-based scripts under scripts/ no longer compiled. - Replace IsDefaultOrEmpty/Length with Count. The list properties are non-nullable and default to [], so Count > 0 is a complete check. - Drop inline @9.0.0 versions from #:package directives, which conflict with Central Package Management, and add a PackageVersion for Microsoft.Extensions.Logging.Console. - Use AddSimpleConsole for IncludeScopes; the ConsoleLoggerOptions property is obsolete and warnings are errors. - Opt BuildChartIndex out of the file-based-app PublishAot default, which flagged its reflection-based JSON serialization.
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.
The library collections moved from
ImmutableArray<T>toIReadOnlyList<T>, so none of the file-based scripts underscripts/compiled.Changes
DumpChart,DumpCatalog,ReadCatalog,ReadCatalogS57):!X.IsDefaultOrEmpty && X.Length > 0→X.Count > 0, and.Length→.Counton the affected lists. The list properties are non-nullable and default to[], soCount > 0is a complete check. Only compiler-flagged.Lengthuses were changed; string/array/byte.Lengthis untouched.@9.0.0versions from#:packagedirectives (NU1008) and added aPackageVersionforMicrosoft.Extensions.Logging.Console10.0.3, matchingMicrosoft.Extensions.Logging.AddConsole(o => o.IncludeScopes = true)→AddSimpleConsole(...)(CS0618 is an error underTreatWarningsAsErrors).BuildChartIndex:#:property PublishAot=false, since file-based apps default to AOT and the script uses reflection-based JSON (IL2026/IL3050).Verification
dotnet build scripts/<name>.cssucceeds with 0 warnings for all seven scripts, with package validation against the 0.7.2 baseline enabled. No sample.000chart is in the repo, so the scripts were not run.Note: restoring locally currently needs the 0.7.2 baseline packages, which the proxy feed won't serve until its 7-day waiting period passes. I seeded the local NuGet cache from the v0.7.2 GitHub release assets for verification.