Skip to content

With Sorbet, can't make an activity or workflow class final #178

@viettrungluu

Description

@viettrungluu

Activities marked final using Sorbet's final! fail on registration, with something like:

RuntimeError:
  #<Class:0x00005558e0b25190> was declared as final but its method `execute` was not declared as final

(We/I like final classes, to prevent inadvertent implementation inheritance.)

This was broken by #128, which added the dup.

Minimal repro looks something like (off the top of my head):

# typed: strict

class MyActivity < Temporal::Activity
  extend T::Sig
  extend T::Helpers

  final!

  sig(:final) { void }
  def execute; end
end

(and then trying to register the activity).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions