-
Notifications
You must be signed in to change notification settings - Fork 26
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
'exec' and 'restart' commands should automatically start the server instead of crashing #3
Conversation
fcd0954
to
39dfbb8
Compare
Sorry I'm just trying to figure out how to make the rubygems wraps any "executables" with a Ruby script, and this breaks the bash script. |
ba31d46
to
58300e9
Compare
Very thanks for your working! These features are so great!
Yeah, as you already know, rubygems doesn't allow sh/bash script as executables unfortunately. |
Yes, I just updated the README with some manual installation instructions. And it works amazingly well! I even added a symlink to |
18c9d91
to
d1d0191
Compare
19facd6
to
ae77d22
Compare
There's one more thing I want to fix: I noticed that VS Code will run
I think it would make sense to search through the parent directories until it finds a I think looking for a |
b7db58b
to
3b93790
Compare
…nstead of crashing
af0f904
to
56ac0cb
Compare
OK, I've finished all these changes, and now VS Code is using a single rubocop daemon for every file in my project. I think that's everything I wanted to add, and it's working great for me. |
56ac0cb
to
5cbfe51
Compare
…d commands using netcat
…Use the project root as the cache key
5cbfe51
to
f82fde8
Compare
…lt colorized output. (Can be turned off with --no-color.)
I just fixed one more thing - The RuboCop output is colorized by default, but the color was turned off when using
So to preserve this default behavior, I'm prepending the |
…ing goes wrong with the nc command, try killing all the rubocop-daemon processes and clearing the cache folder before retrying
Another fix: I'm now returning the correct exit code from e.g.
Before this change, |
…and use this as the exit code for the client
d1adfc6
to
c70c838
Compare
…s we can use the Stop and Start commands in Restart to keep the code DRY
I've also needed to add a file lock (348fdce) to prevent multiple When you change a file in VS Code, it runs RuboCop linting rules. If you save the file at the same time, it will also run the Layout rules. So this starts two
The last one to start will override the pid file, and then there will be an orphaned process that can't be stopped with To fix this, I added a file lock, so that only one process will start. If a process can't acquire the lock, then it will wait until the other process has started. This works for both |
fce4e62
to
e0d732c
Compare
…status on both the client and the server, which will make sure we catch any bugs, crashes, broken pipes, etc.
e0d732c
to
25b709d
Compare
2a19bde
to
8eaba67
Compare
301ed47
to
aaff4b0
Compare
…nt dir. Also resolve symlinks for pwd in the bash script (pwd -P) to match Dir.pwd in Ruby
aaff4b0
to
4923a2d
Compare
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.
LGTM 👍
I should give big thanks to @ndbroadbent, your bug fixes and new features are so great!
They would improve extremely the quality of rubocop-daemon
.
Also, your comments are very clear, so I was easy to know the purpose of your changes, thanks!
I think it's more common to do it this way, and it makes it more user-friendly. It's much better when you don't have to remember to start the server manually, because this makes it easier to integrate
rubocop-daemon
with a text editor (e.g. VS Code) or command-line shortcuts / automated linting.Fixes #2