For whatever reason, launching a the HandleRequestSubsetRequest causes the
unit test to hang at the process of starting a new Task. This only appears
to happen on our build server (which runs Win2K12R2), which suggests a bug
with dotnet or XUnit. But, I've worked around it by changing that specific
unit test to be async/await and not use .Wait calls.
Query cancellation support is added via CancellationToken mechanisms that
were implemented previously. This change adds a new request type
"query/cancel" that will issue the cancellation token. Unit tests were
also added.
Fixing issue where plaintext passwords could be written to logs
Fixing up todo issues where error events needed to be passed back from the
service layer when the hosting component fails.
Fixing issue where submitting a malformed JSON RPC request results in the
message reader entering into an infinite loop of throwing and catching
exceptions without reading anything from the input stream.
At the same time, this change also fixes a potential memory leak where the
message read buffer is never reinstantiated or shrunk. This issue is fixed
by shifting buffer contents after a message was read successfully, or if
an error occurs during parsing.
* Adding error flag for Query class
* Adding message capture for messages from server (using SqlConnection
cast)
* Adding better handling of SELECT queries with 0 results
* Adding affected row count message
* Adding SqlError unwrapping (using SqlException cast)
* Removing DbException handling from QueryExecutionService and into Query
class
This is a fairly minor change that will save tons of time as we develop
this service. The DbConnection and associated Db* abstract classes
ask for synchronous versions of the code and allow the addition of async
code. The SqlClient implementation already implements Db* abstract
classes, so we can piggy back off that for our dependency injection layer.
Tests and existing code has been updated to handle the change, as well
For whatever reason, Visual Studio throws a fit if a referenced project has a name
and the folder name (which is used to reference the project) is different than that name.
To solve this issue, I've renamed all the projects and folders to match their project
names as stated in the project.json.
* Removing unused OutputType and OutputWrittenEventArgs classes
* Adding class comment blocks
* Tweaking a couple comment blocks as per @kcunanne comments
For some strange reason, the using statements don't seem to want to work
for the Message type. The full name has been used instead, but it's an
ugly workaround for the time being.
The overall architecture of the service host is completed here. However,
this doesn't build because the EditorSession dependencies haven't been
worked out just yet.
LanguageServer ->
LanguageService - for any functionality that deals with parsing SQL
ServerService - for any functionality that is required to manage the
service layer
WorkspaceService - for any functionality that deals with managing the
state of the workspace, session, or text document
Namespace changes have not been applied yet, so this doesn't build yet.
The contracts for the basic protocol have been moved into their own
/Protocol/Contracts folder. No code changes have been made to change the
namespaces or class names