Skip to content

Conversation

@adrienaury
Copy link
Member

No description provided.

@adrienaury adrienaury linked an issue May 9, 2025 that may be closed by this pull request
@adrienaury adrienaury requested a review from Copilot May 9, 2025 13:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a configurable record length in the YAML configuration and updates associated APIs and tests to work with the new buffer reset signature. Key changes include:

  • Updating the Buffer.Reset method to accept a record length parameter.
  • Propagating predicate API changes to return errors.
  • Adding a new YAML field "Length" in configuration and adjusting error messages in commands.

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pkg/posimap/import_test.go Updated test to pass an explicit length (0) when resetting the buffer.
pkg/posimap/core/schema/schema_test.go Modified buffer reset calls to use a configured record length (125).
pkg/posimap/core/record/object.go Enhanced export method by propagating errors from predicate evaluations.
pkg/posimap/core/predicate/predicate.go Changed predicate functions to return (bool, error) for more robust error handling.
pkg/posimap/core/buffer/buffer.go Refactored Reset and Required methods to use growTo with a configurable size parameter.
pkg/posimap/api/predicate.go Updated the predicate type to include error handling in its signature.
internal/appli/config/model.go Added a new Length field to allow record length configuration via YAML.
internal/appli/command/unfold.go Modified command logic to use the new configurable record length when resetting the buffer.
internal/appli/command/fold.go Adjusted buffer reset and error handling to use the configurable record length.

@adrienaury adrienaury merged commit d6768de into main May 9, 2025
1 check passed
@adrienaury adrienaury deleted the 21-feat-configure-records-length-at-the-top-level branch May 9, 2025 14:00
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.

feat: configure records length at the top level

2 participants