Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve byte[] serialising (plus formatting, protobuf and finished API documenting) #21

Merged
merged 2 commits into from
Sep 19, 2024

Conversation

glenn2223
Copy link
Contributor

Not going to lie, a little work ended up spiralling, leaving most files updated (mostly from formatting)

Breaking Changes (Overview)

  • byte[] and stream serialisation has changed, but is now significantly more robust (and simpler in its' implementation)
    • As JSON filtering hasn't changed, you can retain any filters saved in byte[] form. Before upgrading convert them to JSON and then upgrade and revert them back
    • Linked to this; TypeTracker.DefaultFilterStatementTypes has also been removed, as it is no longer required for serialisation

Changes (Overview)

  • Formatted across the whole project
  • Removed unused/unnecessary using statements

Package: TopMarksDevelopment.ExpressionBuilder.Api

Breaking Changes

  • IFilterCollection/IFilterCollection<T?> now expects an AddRange method

Added

  • Finally added all summary blocks 🎉
    (Chore: do the same to all other packages)

Package: TopMarksDevelopment.ExpressionBuilder.Core

Breaking Changes

  • byte[] and stream serialisation has changed, but is now significantly more robust
    • As JSON filtering hasn't changed, you can retain any filters saved in byte[] form. Before upgrading convert them to JSON and then upgrade and revert them back
    • Linked to this; TypeTracker.DefaultFilterStatementTypes has also been removed, as it is no longer required for serialisation

Added

  • There's now a .proto file available here
  • FilterCollection and FilterCollection<T?> include an AddRange method - supporting API Changes
  • Added new members for the serialisation changes
    • IProtoFilterItem interface
      Used on classes that build our filter (implementing the conversion between types)
    • IProtoConverter interface
      When your generic type is not a supported value, implementing this interface means we can still process it in byte[] serialisation
    • ProtoFilterStatement class
      The new class used for byte[] serialisation. This class does not have a generic type, so makes serialising a lot more simple and robust

Changes

  • Added JSON file test and renamed JSON tests
  • Removed tests associated with TypeTracker.DefaultFilterStatementTypes work

## Breaking Changes (Overview)

-   `byte[]` and stream serialisation has changed, but is now significantly more robust (and simpler in its' implementation)
    -   As JSON filtering hasn't changed, you can retain any filters saved in `byte[]` form. Before upgrading convert them to JSON and then upgrade and revert them back
    -   Linked to this; `TypeTracker.DefaultFilterStatementTypes` has also been removed, as it is no longer required for serialisation

## Changes (Overview)

-   Formatted across the whole project
-   Removed unused/unnecessary `using` statements

## Package: TopMarksDevelopment.ExpressionBuilder.Api

### Breaking Changes

-   `IFilterCollection`/`IFilterCollection<T?>` now expects an `AddRange` method

### Added

-   Finally added all summary blocks 🎉
    (Chore: do the same to all other packages)

## Package: TopMarksDevelopment.ExpressionBuilder.Core

### Breaking Changes

-   `byte[]` and stream serialisation has changed, but is now significantly more robust
    -   As JSON filtering hasn't changed, you can retain any filters saved in `byte[]` form. Before upgrading convert them to JSON and then upgrade and revert them back
    -   Linked to this; `TypeTracker.DefaultFilterStatementTypes` has also been removed, as it is no longer required for serialisation

### Added

-   There's now a `.proto` file available [here](./Packages/Core/src/Proto/ExpressionBuilder.proto)
-   `FilterCollection` and `FilterCollection<T?>` include an `AddRange` method - supporting API Changes
-   Added new members for the serialisation changes
    -   `IProtoFilterItem` interface
        Used on classes that build our filter (implementing the conversion between types)
    -   `IProtoConverter` interface
        When your generic type is not a supported value, implementing this interface means we can still process it in `byte[]` serialisation
    -   `ProtoFilterStatement` class
        The new class used for `byte[]` serialisation. This class does not have a generic type, so makes serialising a lot more simple and robust

### Changes

-   Added JSON file test and renamed JSON tests
-   Removed tests associated with `TypeTracker.DefaultFilterStatementTypes` work
- Fixed some `ValueToByteConverters` Pack/UnPack convertions
- Add some `ValueToByteConverters` tests
@glenn2223 glenn2223 merged commit 0d85b61 into main Sep 19, 2024
3 checks passed
@glenn2223 glenn2223 deleted the protbuf-formatting-documenting branch September 19, 2024 15:58
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