coinbase / coinbase/temporal-ruby
With Sorbet, can't make an activity or workflow class final
Open
- 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
Assessment
This issue has not been assessed yet.