Skip to content

POJOs can be directly mutated by developers without fiber knowing  #16

@zeroeightysix

Description

@zeroeightysix

Because java optimises accesses to final fields, modifying them at runtime will result in unexpected behaviour. (and fiber shouldn't be modifying those in the first place)
This means we are forced to disallow use of final in POJOs.
However, this also means developers can directly set the values in a POJO, making it desynchronised with the IR it was merged into.
Implement a system to prevent this.

  • Have developers merge the POJO back into the IR after mutating.
  • Have the IR track POJOs and a ir.markDirty() method that checks for modifications

Metadata

Metadata

Assignees

No one assigned

    Labels

    annotationsRelates to the annotation systembugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions