Skip to content

Releases: contextgeneric/cgp

v0.4.2

07 Jul 13:03
3a5e8dc
Compare
Choose a tag to compare

Changelog

  • Implement Extensible Data Types - more info in the blog post

    • Data-generic programming support in CGP - #112
    • Implement DispatchHandlersRef for dispatching based on enum references - #116
    • Builder dispatcher refactoring - #117
    • Introduce ref version of handler traits - #118
    • Dispatcher Refactoring - #119
    • Remove Input param from MatchWithFieldHandlers - #120
    • Support use of ref handlers in handler macros - #121
  • Preset Improvements

    • Add new direct delegation mode and use it in preset inheritance - #111
  • Bug Fixes

    • Derive HasField<Index<{i}>> for structs with unnamed fields - #115
    • Allow unsized generic arguments in IsProviderFor trait - #114

v0.4.1

13 Jun 22:48
337004c
Compare
Choose a tag to compare

More details about this release is covered in the update blogpost.

Changelog

  • New cgp-handler Crate

    • Introduce new cgp-handler crate - #105
  • Macro Improvements

    • Support wrapping of Preset::Provider inside cgp_preset! macro - #103
    • Support derivation of UseDelegate inside #[cgp_component] - #106
  • CGP Field Improvements

    • Format Char statically without self - #104
  • Miscellaneous

    • Minor improvements - #107
  • Documentation

    • Add inline Rust documentation for common CGP constructs - #109

v0.4.0

09 May 14:22
9d4c031
Compare
Choose a tag to compare

More details about this release is covered by the update blogpost.

Changelog

  • Debugging Improvements

    • Implement delegate_and_check_components! - #98
    • Implement check_components! macro to check if a context implements a component - #78
    • Permanently enable provider supertrait - #73
    • Introduce #[new_cgp_provider] to also generate provider struct definition - #67
    • Preserve original provider bounds inside #[cgp_provider] - #65
    • Introduce IsProviderFor trait to help improve compile errors - #63
  • CGP Presets Implementation

    • Fix nested inheritance and multi inheritance for presets - #92
    • Preset Macro Improvements - #91
    • Expand cgp_preset! into a preset module - #72
    • Re-export imports inside a re_export submodule - #71
    • Introduce #[cgp::re_export_imports] macro - #70
  • CGP Getter Improvements

    • CGP Getter Improvements - #94
    • Getter Macro Improvements - #87
    • Refactoring and Improvements on #[cgp_getter] - #81
    • Fix component generics inside derivation of WithProvider for #[cgp_getter] - #80
    • Fix #[cgp_getter] macro when the getter trait contains generic parameters - #76
    • Allow generic arguments inside #[cgp_auto_getter] traits - #64
  • Macro Improvements

    • Simplify attribute arguments for #[cgp_component], #[cgp_provider] and #[cgp_context] - #96
    • Allow definition of new structs inside delegate_components! - #93
    • Migrate macro tests to cgp-tests crate, part 1 - #90
    • Automatically derive UseContext implementation inside #[cgp_component] - #88
    • Macro Crates Reorganization - #83
    • Refactoring and rename #[trait_alias] to #[blanket_trait] - #82
    • Introduce #[trait_alias] macro to simplify definition of alias traits - #79
    • CGP Macro Refactoring - #77
    • Rename #[new_cgp_provider] to #[cgp_new_provider] - #75
    • Introduce #[cgp_context] attribute macro for CGP contexts - #66
  • Component System Improvements

    • Rename HasProvider trait to HasCgpProvider - #97
    • Add support for const item in component traits - #95
    • Remove 'static bound from Async trait alias - #89
    • Rename HasComponents trait to HasProvider - #69
    • Redesign cgp_type to work as attribute macro - #68
  • CGP Field Improvements

    • Add Display instance for symbol types - #86
    • Use Unicode Greek alphabets for visual representation of CGP field types - #85
    • Implement traits and derive macros for HasFields, FromFields, and ToFields - #84
    • Add #[diagnostic::do_not_recommend] to blanket impl of HasField - #74

v0.3.1

16 Jan 16:31
19c239d
Compare
Choose a tag to compare
  • Update Rust MSRV to v1.84 - #58

  • Add HasAsyncErrorType to prelude - #59

  • Add CanRaiseAsyncError and CanWrapAsyncError to cgp-error and prelude - #60

v0.3.0

08 Jan 21:20
fa0e457
Compare
Choose a tag to compare

More details about this release is covered by the update blogpost.

Changelog

  • Introduce Accessor Component Macros - #56

    • Introduce #[cgp_getter] attribute macro that extends #[cgp_component] and implement
      UseFields and UseField for accessor traits.
    • Introduce #[cgp_auto_getter] attribute macro for deriving accessor traits with
      blanket implementations that use HasField directly.
  • Introduce cgp_type! macro for defining simple abstract CGP types - #55

    • Use cgp_type! to derive HasErrorType and HasRuntimeType.
  • Implement ErrorWrapper on generic ErrorRaiser providers - #54

    • Implement ErrorWrapper for the following providers: DebugError, DisplayError,
      DebugAnyhowError, DisplayAnyhowError, RaiseAnyhowError,
      DebugEyreError, DisplayEyreError, RaiseEyreError,
      DebugBoxedStdError, DisplayBoxedStdError.
  • Reorganize crate exports - #53

    • Move generic error providers to the cgp-error-extra crate.
    • Add an alloc feature to cgp-error-extra to enable use of alloc in providers.
    • Make private the sub-modules inside CGP crates.
    • Explicitly export module items instead of using *.
  • Move cgp-inner to cgp-extra - #51

    • Remove re-export of cgp-inner from cgp-core.
    • Re-export cgp-inner and cgp-runtime from cgp-extra.
  • Introduce cgp-runtime crate - #50

    • Introduce the HasRuntimeType and HasRuntime traits.
    • Introduce HasAsyncRuntimeType trait used for adding Async constraint to HasRuntimeType::Error.
  • Error crates refactoring - #48

    • Remove Async trait bound from HasErrorType::Error.
    • Introduce HasAsyncErrorType trait used for adding Async constraint to HasErrorType::Error.
    • Introduce CanWrapError trait.
    • Introduce generic ErrorRaiser providers in cgp-error.
    • Rename and reoganize constructs in cgp-error-eyre and cgp-error-std.
    • Introduce cgp-error-anyhow crate.
  • Decouple component and field macro crates from the library crates - #47

    • Remove cgp-component-macro crate from being a dependency of cgp-component.
    • Remove cgp-field-macro crate from being a dependency of cgp-field.