v0.22.0
What's Changed (with Breaking Changes)
1. Behavior
The decoder methods Decode() and DecodeWithContext() no longer need to be wrapped inside a Next() loop. These methods can be directly invoked multiple times to decode chained FIT file. Method Next() is now just a convenience tool to do iteration.
2. Modified
Functions
- proto.CreateMessageDefinition -> proto.NewMessageDefinition
- proto.CreateMessageDefinitionTo -> (*Encoder) newMessageDefinition
Methods
- (FileHeader) MarshalAppend -> (*FileHeader) MarshalAppend
- (MessageDefinition) MarshalAppend -> (*MessageDefinition) MarshalAppend
- (Message) MarshalAppend(n []byte) -> (*Message) MarshalAppend(b []byte, arch byte)
Structs or Fields
- proto: FileHeader.ProtocolVersion type is changed from byte to proto.Version for consistency.
- decoder: AccumulatedValue is now private with the new name
value
- decoder: Accumulator's Field: AccumulatedValues is now private with new name
values
Errors
- encoder: ErrNotAFitFile -> ErrNotFITFile
3. Removed
Package
- internal/kit
Functions
- factory.CreateMesgOnly
Methods
- (*Factory) CreateMesgOnly
- (proto.FIT) WithMessages
- (proto.Message) WithFields
- (proto.Message) WithDeveloperFields
- (proto.Message) WithFieldValues
- (proto.Message) Clone
- (proto.Field) Clone
- (proto.SubField) Clone
- (proto.DeveloperField) Clone
- (FileHeader) MarshalBinary
- (MessageDefinition) MarshalBinary
- (Message) MarshalBinary
Constants
- proto: MaxBytesPerMessage and MaxBytesPerMessageDefinition are removed
4. Performance Improvements
- Encoder now uses less memory
5. Bug Fixes
- Encoder: fix on validating dynamic protocol version.
- CLI: fitactivity's opener concurrency is now limited to the lesser value between the number of files and the number of CPU.
- CLI: fitactivity's opener now updates the corresponding Laps GPS positions instead of removing them.
- CLI: fitactivity now listens to interrupt signal and gracefully shutdown.
6. Additional Features
- Fieldef: Activity File now has new messages: GpsMetadata, TimeInZone, Split and Split Summary.
References
- docs: update README.md by @muktihari in #410
- cli: fitactivity improve concealer by @muktihari in #411
- cli: fitactivity opener limit concurrent process by @muktihari in #412
- chore: fitactivity fix typo by @muktihari in #413
- feat: fitactivity implement context propagation by @muktihari in #414
- perf: optimize encoder buffer size by @muktihari in #415
- perf: round encoder buffer size to nearest sizeclasses by @muktihari in #416
- fix: encoder dynamic protocol version validator by @muktihari in #417
- refactor!: remove not particularly useful features by @muktihari in #418
- feat: filedef add new messages in Activity File by @muktihari in #419
- refactor: set minimal go version to v1.21 by @muktihari in #420
- chore: add missing copyright header by @muktihari in #421
Full Changelog: v0.21.5...v0.22.0