Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

What is the role of the different statusCode member within the protocol? #514

Unanswered
PBundyra asked this question in Q&A
Discussion options

In the protocol, there are fields called statusCode/status, and I would be grateful for some clarification about their roles.

The status field of type StatusCode in the TaskFinishParams structure can be set to Ok/Error/Cancelled. What exactly does the Error mean?

What kind of errors should be reported using the status field inside the TaskFinishParams structure, the statusCode field inside the Compile/Run/Test Result, or the error field inside the ResponseMessage? Which one should I use if the server behaves correctly during the Compile Request, but the binary it compiles exits with a failure exit code?

Is the statusCode field inside the Compile/Run/Test Result intentionally Int, or is it some typo?

Please note that according to the protocol, if we pass some information using the error field inside the ResponseMessage, we shouldn't pass any information using the Compile/Run/Test Result, as the result field should be null.

You must be logged in to vote

Replies: 1 comment

Comment options

So:

  • the status code of a (sub)task pertains to the (sub)task itself. For example, when you start a Cargo build, Cargo can decide to update its index. Updating the index may fail if the internet connection breaks. "Updating index" is just a subtask of the "big" compilation task. If it fails, the parent task doesn't have to, because building can continue with the old version of the index.
  • unless we come up with a reasonable scenario when the build tool decides to cancel one of tasks it itself started, we should treat the Cancelled status code as deprecated

Which one should I use if the server behaves correctly during the Compile Request, but the binary it compiles exits with a failure exit code?

I don't understand this one. The compiled binary is not run during compilation. If you meant the run request - the status code should be the exit code.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.