Skip to content

Fix scripts to build against the IReadOnlyList public API - #30

Merged
philliphoff merged 1 commit into
mainfrom
claude/eloquent-lichterman-fd0a09
Oct 11, 2026
Merged

philliphoff merged 1 commit into
mainfrom
claude/eloquent-lichterman-fd0a09

Conversation

@philliphoff

Copy link
Copy Markdown
Owner

The library collections moved from ImmutableArray<T> to IReadOnlyList<T>, so none of the file-based scripts under scripts/ compiled.

Changes

  • API update (DumpChart, DumpCatalog, ReadCatalog, ReadCatalogS57): !X.IsDefaultOrEmpty && X.Length > 0 → X.Count > 0, and .Length → .Count on the affected lists. The list properties are non-nullable and default to [], so Count > 0 is a complete check. Only compiler-flagged .Length uses were changed; string/array/byte .Length is untouched.
  • Central Package Management: removed inline @9.0.0 versions from #:package directives (NU1008) and added a PackageVersion for Microsoft.Extensions.Logging.Console 10.0.3, matching Microsoft.Extensions.Logging.
  • Obsolete API: AddConsole(o => o.IncludeScopes = true) → AddSimpleConsole(...) (CS0618 is an error under TreatWarningsAsErrors).
  • 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>.cs succeeds with 0 warnings for all seven scripts, with package validation against the 0.7.2 baseline enabled. No sample .000 chart 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.

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.
@philliphoff
philliphoff merged commit e946869 into main Oct 11, 2026
11 checks passed
@philliphoff
philliphoff deleted the claude/eloquent-lichterman-fd0a09 branch October 11, 2026 18:28
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