open-feature / ruby-sdk

Ruby implementation of the OpenFeature SDK
https://openfeature.dev
Apache License 2.0
25 stars 9 forks source link

chore: add type signatures and type checker for CI #58

Closed mschoenlaub closed 1 year ago

mschoenlaub commented 1 year ago

This PR

Related Issues

Fixes #53

Notes

Some of the types around contexts are probably a bit off. Then again, parts of the spec aren't actually implemented anyways. It seems to be a chicken-egg problem.

Follow-up Tasks

Decide which route to go for the context types (Hash vs class). The latter oen ahs better typing support, Hashes with optional keys are a bit weird.

How to test

This comes with a new job in the CI.

mschoenlaub commented 1 year ago

Hey, @maxveldink

any chance this could get approved. It would bring the RBS in a somewhat usable state. Due to the brittleness of RBS and the active development on the project itself currently, I decided to not make type checking a hard dependency for the build right now. I am open for discussion on this one though.

mschoenlaub commented 1 year ago

Also tagging @josecolella to get a feel for who maintains this now.

maxveldink commented 1 year ago

Howdy 👋🏻 I'll give this a look tonight and make sure I have notifications properly set up for this repo.

technicalpickles commented 1 year ago

It's worth noting the initial rbs was just part of the bundle gem or whatever generated it, it wasn't like it was intentionally added.

@josecolella and I talked about sorbet for typing over on one earlier PRs, ie https://github.com/open-feature/ruby-sdk/pull/8 . Aside from the runtime dependency, I'm in favor of holding off typing until the implementation is a bit more solid. I argued it take more time keeping the types up to date while we are still working out the details, and that that would discourage refactoring..

:pear:'d with @josecolella on 👀

technicalpickles commented 1 year ago

Closing for https://github.com/open-feature/ruby-sdk/issues/66