-
-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make haml/rbs dependencies optional #1406
Conversation
Hi @mikesea! Thanks for the contribution. I can totally see where you're coming from. I don't want to call require on every file being formatted. Could we instead only require at the top of the file but |
Also you should rebase, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just marking this as "request changes"
e0d99c7
to
ebd90e5
Compare
@kddnewton makes sense, done! |
@mikesea looks like you just need to run prettier on |
🤦 @kddnewton sorry about that, done! |
woudln't you also need to remove the dependencies from the gemspec? as it is, the gems are still installed since they are listed there. |
It depends how you're using this plugin. We're invoking it via prettier in |
👋 Hey, thanks for this plugin.
Right now this plugin requires you to install the dependencies for formatting haml and rbs files, even if your codebase isn't using those types of files. This PR modifies
src/server.rb
so these formatting dependencies areonly required "on demand" - e.g., when the server is actually processing a haml or rbs fileonly required optionally.This change will mean we can drop
haml
as a dependency in our codebase, since it's only being imported so that we can format ruby files with this plugin.