coinbase / coinbase/temporal-ruby

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

Open
#178 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
287
Forks
113
Avg merge
6d 11h
Merged PRs (30d)
1

Description

Activities marked final using Sorbet's `final!` fail on registration, with something like:
```
RuntimeError:
# 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).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.