Skip to content

Feature: Speed up compilation with finalize! #63

@apotonick

Description

@apotonick

We could avoid having to compile the activity with every invocation of step by "marking" the activity as final in the end, which then could trigger compilation (and much better error handling).

class Create < Trailblazer::Operation(finalize: true)
  step :a
  step :b
end.finalize!

When using an extendable loader such as dry-system (or maybe even zeitwerk supports that?) you could add a "loaded" callback that calls activity_class.finalize! automatically.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions