-
Notifications
You must be signed in to change notification settings - Fork 39
Return non-zero exit code when missing SemanticDB files #332
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
Conversation
Previously, `lsif-java index` would occasionally return a successful exit code even if it didn't produce a `dump.lsif` file. Now, it should return the exit code 1 instead in these scenarios.
| } | ||
| CommandResult(0, Nil) | ||
| } | ||
| CommandResult(0, Nil) | ||
| } | ||
|
|
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.
Im confused about this, does not returning an explicit CommandResult result in the exit code being set to non-zero?
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.
The CommandResult on line 162 was previously discarded because the if/else wasn't the last statement
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.
oh so thats a thing in scala 🤔 TIL
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.
There are compiler flags to turn that into an error but I don't like using it because there are too many false positives (lots of side-effecting methods return non-Unit values)
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.
I probably messed up because I've been writing too much Java/Go lately with early returns. I don't remember being hit by this in the past, it's usually a non-issue in my experience.
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.
It mightve been introduced by me here
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.
Aha, hehe looks like that indeed 😜
Previously,
lsif-java indexwould occasionally return a successfulexit code even if it didn't produce a
dump.lsiffile. Now, it shouldreturn the exit code 1 instead in these scenarios.