Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelldi committed Dec 2, 2023
1 parent 2134893 commit a57f8ed
Show file tree
Hide file tree
Showing 13 changed files with 819 additions and 143 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import com.jetbrains.rd.generator.nova.kotlin.Kotlin11Generator

object AspireSessionHostRoot : Root() {
init {
setting(Kotlin11Generator.Namespace, "com.github.rafaelldi.aspireplugin.generated")
setting(Kotlin11Generator.Namespace, "com.intellij.aspire.generated")
setting(CSharp50Generator.Namespace, "AspireSessionHost.Generated")
}
}
Expand All @@ -19,7 +19,23 @@ object AspireSessionHostModel : Ext(AspireSessionHostRoot) {
field("value", string)
}

private val SessionModel = structdef {
private val ProcessStarted = structdef {
field("id", string)
field("pid", long)
}

private val ProcessTerminated = structdef {
field("id", string)
field("exitCode", int)
}

private val LogReceived = structdef {
field("id", string)
field("isStdErr", bool)
field("message", string)
}

private val SessionModel = classdef {
field("projectPath", string)
field("debug", bool)
field("envs", array(EnvironmentVariableModel).nullable)
Expand All @@ -28,5 +44,8 @@ object AspireSessionHostModel : Ext(AspireSessionHostRoot) {

init {
map("sessions", string, SessionModel)
source("processStarted", ProcessStarted)
source("processTerminated", ProcessTerminated)
source("logReceived", LogReceived)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ILogger logger
var projectOutput = projectRunnableOutputDetector.CalculateProjectOutput(project, tfm);
if (projectOutput == null)
{
logger.Trace("Unable to find output for project for {0}", tfm);
logger.Trace($"Unable to find output for project for {tfm}");
continue;
}

Expand Down
4 changes: 2 additions & 2 deletions src/dotnet/aspire-session-host/Connection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ internal Connection(int port)

private Task<AspireSessionHostModel> InitializeModelAsync()
{
var tcs = new TaskCompletionSource<AspireSessionHostModel>();
var tcs = new TaskCompletionSource<AspireSessionHostModel>(TaskCreationOptions.RunContinuationsAsynchronously);
_scheduler.Queue(() =>
{
try
Expand All @@ -50,7 +50,7 @@ private Task<AspireSessionHostModel> InitializeModelAsync()
internal async Task<T> DoWithModel<T>(Func<AspireSessionHostModel, T> action)
{
var model = await _model;
var tcs = new TaskCompletionSource<T>();
var tcs = new TaskCompletionSource<T>(TaskCreationOptions.RunContinuationsAsynchronously);
_scheduler.Queue(() =>
{
try
Expand Down
Loading

0 comments on commit a57f8ed

Please sign in to comment.