Releases: indunet/fastproto
Releases · indunet/fastproto
v4.1.0
Added
- fastproto bundle module: New
fastproto-bundlemodule (artifactId:fastproto) that aggregates core and processor, allowing users to include just one dependency for full functionality - Integration tests for the bundle module to verify aggregated functionality
Removed
- Removed
CodecProcessorand@GenerateCodecannotation (limited practical value) - Removed runtime dynamic compilation (
FormulaBuilderand related classes); lambda formulas now rely entirely on compile-time code generation
Changed
- Project restructured into three modules:
fastproto-core- Core libraryfastproto-processor- Annotation processorfastproto(bundle) - Aggregator module, recommended for users
- Updated documentation to simplify dependency references
Migration Guide
Users upgrading from 4.0.0 now only need one dependency:
Maven:
<dependency>
<groupId>org.indunet</groupId>
<artifactId>fastproto</artifactId>
<version>4.1.0</version>
</dependency>v4.0.0
Breaking Changes
- Multi-module restructure: Project split into two modules:
fastproto- Core library with all runtime functionality (backwards compatible artifactId)fastproto-processor- Annotation processor for compile-time formula generation
- Dynamic lambda compilation is now disabled by default for better Android/JRE compatibility
Added
fastproto-processormodule with SPI auto-discovery for annotation processorsFormulaProcessor- GeneratesFunctionclasses at compile time for@DecodingFormula(lambda="...")and@EncodingFormula(lambda="...")CodecProcessor- Generates codec wrapper classes for@GenerateCodecannotated classesFormulaRegistry- Runtime lookup for compile-time generated formula classes- Full Android and Java 11+ JRE compatibility for lambda formulas via annotation processor
Changed
- Lambda formulas now use compile-time code generation instead of runtime dynamic compilation
- Users need to add
fastproto-processoras a dependency to use lambda formula features - Updated documentation for new multi-module structure
Migration Guide
For users upgrading from 3.x:
v3.12.3
Added
- New
@BcdTypeannotation andBcdCodecfor fixed-length packed BCD integers (with byte order support), mapped toint/Integer. - Unit tests and FastProto integration tests for BCD, covering big-endian / little-endian and error conditions.
- New
@Expect/@Expectsannotations for constant assertions at fixed offsets; verify on decode and auto-fill constants on encode.
Changed
- README and Quick Start: added side-by-side examples comparing manual bit/offset parsing to FastProto’s annotation-based approach, plus an explicit “Design Philosophy” section.
- Docs site (
docs/index.html,docs/annotation-mapping.md, etc.): documented BCD type mapping and behavior, and refreshed core feature descriptions. - Core resolving pipeline: extended dynamic
lengthRefsupport so computed lengths are bound to preceding fields and propagated throughResolver/CodecFlowinto string/array/struct-array codecs. - Core resolving pipeline: extended dynamic
offsetRefsupport so offsets can reference numeric fields;Resolverbinds offset suppliers andCodecFlowwraps annotations, makingoffsethonor runtime values during encode/decode.
v3.12.2
Added
@AutoTypenow supportslengthReffor variable-length strings/arrays/collections with auto type inference.- Checksum enhancements: range-based checksum calculation support.
- Documentation: added
docs/variable-length.md(variable length & struct arrays) and new integration pagesdocs/netty-integration.md,docs/kafka-integration.md. - Variable-length support: via
lengthRefreferencing a count field, enabling variable-length strings/arrays and struct arrays.
Changed
- Proxy forwarding:
ProtocolType.proxy(AutoType, ...)forwardslengthRefto target annotations (e.g.,StringType,*ArrayType,StructArrayType). - Docs & examples: help sidebar includes “Variable Length & Struct Arrays”; installation snippets updated to
3.12.2.
Fixed
- DateCodecTest stability: truncate
Instant/LocalDateTimeto milliseconds.
v3.12.1
Fixed
- ByteBuffer: auto-growth when writing beyond current capacity on non-fixed buffers to prevent ArrayIndexOutOfBounds.
- ByteBufferIOStream.align: validation now requires a positive power-of-two alignment; incorrect values throw IllegalArgumentException.
Changed
- Docs site: redesigned
docs/index.htmlhomepage (overview, features, basic usage), set Quick Start as default in help, added icons to features. - Version references in docs updated to 3.12.1.
Added
- Android compatibility guide
docs/android.mdand cross-links.
v3.12.0
-
Single-annotation checksum
- New
@Checksum(start, length, offset, type, byteOrder)defines the compute range and storage location in one place. - Works seamlessly in both encode (auto-write) and decode (auto-verify) flows.
- New
-
Broader algorithm coverage
- Added:
CRC8_SMBUS,CRC8_MAXIM,XOR8 (BCC),LRC8,CRC16_MODBUS,CRC16_CCITT,CRC32C,CRC64_ECMA-182,CRC64/ISO. - Endianness for stored values honored via
byteOrder; computation range is endianness-agnostic.
- Added:
-
Performance & robustness
ChecksumUtilsreuses singleton engines to avoid per-call allocations.- Explicit error on unsupported type (
CodecException).