Skip to content

Anaylze the peer component to detect errors #1

@realityforge

Description

@realityforge

The ArezPersist generated sidecar class relies on the Arez component having certain features enabled. These constraints in no particular order are:

  • The @ArezComponenty.requireId should have an effective value of ENABLE so that there is an id present to persist state.
  • The @ArezComponenty.disposeNotifier should have an effective value of ENABLE so that the sidecar will be disposed when the peer is disposed.
  • The component id should have a stable conversion to a string which is used in common storage services.

These have not been implemented as the parameters are often derived and require a deep analysis of the arez component model which is computationally expensive, error-prone, and brittle.

We could "fix" this by emitting a JSON descriptor beside the arez component in the ArezProcessor. The ArezPersist annotation processor would defer processing until the descriptor is available and then use the descriptor emitted by Arez. (Sting uses a similar strategy and process binary descriptors emitted by itself at later stages).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions