ruby-lsp-rails icon indicating copy to clipboard operation
ruby-lsp-rails copied to clipboard

Split `ServerAddon` into new file

Open johansenja opened this issue 1 year ago • 3 comments

  • ~~It is able to benefit from strict typing now~~ removed because of some runtime problems
  • It simplifies server.rb
  • It is now possible to require it specifically in other files, eg if you want to write tests for your server addon, you can require the server addon file specifically

I originially had some other changes here too, but there are no longer needed!

johansenja avatar Oct 02 '24 14:10 johansenja

Thanks for the feedback! The comments definitely make sense and so I've taken out two of the commits which would no longer be necessary - leaving this just with the changes to move ServerAddon into a new file (and have updated description and title accordingly). IMO this change could still be useful to split up server.rb, and to give the addon typings - but of course I leave it up to you to make the decision!

johansenja avatar Oct 02 '24 22:10 johansenja

@andyw8 now that I think about it, didn't we hit issues when trying to require the Sorbet runtime in the server? If my memory serves me right, it sometimes led to issues with the application.

Maybe we could just split the files, but still make that one untyped.

vinistock avatar Oct 03 '24 13:10 vinistock

Yes, I remember there was a problem, but not the exact details.

I agree with the splitting, but for now let's keep sorbet-runtime out of the server to reduce the risk.

andyw8 avatar Oct 03 '24 15:10 andyw8

Hi @johansenja, are you hoping to continue on this?

andyw8 avatar Oct 30 '24 14:10 andyw8

Sorry, I've been a bit busy - but no, I don't think I will now that things have moved along

johansenja avatar Feb 20 '25 12:02 johansenja