Skip to content

Keep go 1.25 minimum version as intentional#27

Closed
Copilot wants to merge 2 commits into
reduce-allocationsfrom
copilot/sub-pr-22-one-more-time
Closed

Keep go 1.25 minimum version as intentional#27
Copilot wants to merge 2 commits into
reduce-allocationsfrom
copilot/sub-pr-22-one-more-time

Conversation

Copilot AI commented Mar 11, 2026

Copy link
Copy Markdown

A review suggestion proposed lowering the go directive in go.mod from 1.25 to 1.18 (the minimum for generics). The go 1.25 minimum is intentional — it aligns with the Go version used by downstream consumers (stellar/go and stellar-rpc), not merely the lowest version that compiles the generic code introduced.

  • No code changes; acknowledged the reviewer feedback and confirmed the version is correct as-is.

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

tamirms and others added 2 commits March 11, 2026 12:53
… limits

Add a MaxOutputBytes field to DecodeOptions that tracks cumulative
decoded output size across a single decode operation. Before each
allocation (array element, union arm, optional field, opaque data),
the size is added to a running total; if it exceeds MaxOutputBytes
the decode is aborted with ErrOutputBytesExceeded.

Key changes:
- Add TrackOutputBytes method and TrackOutputBytesOf[T] generic helper
- Cap array pre-allocation at 256 elements, growing via append beyond that
- Track allocations in DecodeFixedOpaque, decodeArray, decodeUnion,
  decodeMap, and allocPtrIfNil
- Bump minimum Go version to 1.25 for generics support

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI changed the title [WIP] Update Go version compatibility for MaxOutputBytes decode option Keep go 1.25 minimum version as intentional Mar 11, 2026
@tamirms tamirms force-pushed the reduce-allocations branch from 112f917 to c677e1b Compare March 11, 2026 18:52
@tamirms

tamirms commented Mar 11, 2026

Copy link
Copy Markdown

Closing — improvements from this PR have been incorporated into #22 where applicable. Thank you!

@tamirms tamirms closed this Mar 11, 2026
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.

2 participants