ruby-jwt icon indicating copy to clipboard operation
ruby-jwt copied to clipboard

RBS signatures

Open HoneyryderChuck opened this issue 3 years ago • 7 comments

I've noticed that jwt doesn't ship with rbs signatures yet. Is this something the project would like to have going forward?

HoneyryderChuck avatar Dec 17 '21 10:12 HoneyryderChuck

Could you describe the issue a little bit more. What are these "RBS" signatures?

anakinj avatar Dec 27 '21 19:12 anakinj

https://www.ruby-lang.org/en/news/2020/12/25/ruby-3-0-0-released/

Ctrl+F "RBS"

HoneyryderChuck avatar Dec 27 '21 20:12 HoneyryderChuck

This looks interesting. Maybe in the future. This isn't going to be a priority at the moment.

I am putting this on my watch list of the new things to learn.

excpt avatar Dec 27 '21 21:12 excpt

Nice. The intent of the question was to know whether you'd be interested in me contributing the sigs and perhaps dialing it in CI.

HoneyryderChuck avatar Dec 27 '21 21:12 HoneyryderChuck

Ah, lol. I thought it was a cryptographic signature algorithm I've never heard of. Now it makes sense :)

anakinj avatar Dec 28 '21 15:12 anakinj

I think that it could bring value to describe the public methods of the gem like this. The challenge maybe is to figure out what the signature actually is :). There is a lot of history.

Would appreciate a little something related to this. Maybe starting with the JWT module and decode and encode methods.

Have not bumped into this for any gems I'm familiar with. Are there some examples out there how existing gems have adapted/implemented something like this?

anakinj avatar Dec 28 '21 15:12 anakinj

I added RBS for jwt to gem_rbs_collection. https://github.com/ruby/gem_rbs_collection/pull/243

Currently, this doesn't cover all signature and some parts are untyped. (Of course, it would be preferable if the gem itself includes RBS)

autopp avatar Oct 23 '22 15:10 autopp