Skip to content

Fuck, wrong branch... Revert "Remove RelayTestServer project and non-x64 platform configurations from solution"#4

Merged
Stiggimy merged 1 commit intomainfrom
revert-2-copilot/cleanup-plugin-relay-sln
Feb 18, 2026
Merged

Fuck, wrong branch... Revert "Remove RelayTestServer project and non-x64 platform configurations from solution"#4
Stiggimy merged 1 commit intomainfrom
revert-2-copilot/cleanup-plugin-relay-sln

Conversation

@Stiggimy
Copy link
Contributor

Reverts #2

Copilot AI review requested due to automatic review settings February 18, 2026 00:08
@Stiggimy Stiggimy merged commit 3ac513c into main Feb 18, 2026
5 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR is described as a revert of KinectToVR/plugin_Relay#2, but the actual changes primarily migrate the project from ActualLab.* RPC packages to Stl.*, adjust RPC call routing, update client initialization/logging, and modify .gitignore patterns.

Changes:

  • Replace ActualLab.* package references/usings with Stl.* equivalents.
  • Add a custom RpcCallRouter in the server to influence routing for IRelayClient calls.
  • Update client initialization to register an IRelayClient server implementation and change logging initialization; remove several ignore patterns from .gitignore.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
plugin_Relay/plugin_Relay.csproj Swaps RPC-related NuGet packages (ActualLab → Stl) and adjusts dependencies.
plugin_Relay/RelayService.cs Switches to Stl.Rpc and adds a RpcCallRouter singleton for routing.
plugin_Relay/RelayDevice.cs Switches to Stl.Rpc, adds try/catch around initialization, configures logging, and registers a client callback server.
plugin_Relay/Models/Contract.cs Updates RPC namespace to Stl.Rpc.
.gitignore Removes ignores for publish outputs and *.zip artifacts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 26 to +33
<ItemGroup>
<PackageReference Include="ActualLab.Generators" Version="12.1.51">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="ActualLab.Rpc" Version="12.1.51" />
<PackageReference Include="ActualLab.Rpc.Server" Version="12.1.51" />
<PackageReference Include="Amethyst.Plugins.Contract" Version="1.3.0" />
<PackageReference Include="MemoryPack" Version="1.21.4" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.1" />
<PackageReference Include="Stl.Generators" Version="6.8.11" />
<PackageReference Include="Stl.Rpc" Version="6.8.11" />
<PackageReference Include="Stl.Rpc.Server" Version="6.8.11" />
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description says this is a revert of a solution/platform configuration change, but this file swaps RPC packages (ActualLab.* -> Stl.*) and removes Microsoft.Extensions.Logging. If this is intentional, please update the PR title/description; otherwise revert these package changes to keep the revert focused.

Copilot uses AI. Check for mistakes.
.AddWebSocketClient($"http://{ServerIp}:{ServerPort}/")
.AddClient<IRelayService>();
var services = new ServiceCollection()
.AddLogging(logging => logging.AddConsole());
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.AddConsole() requires the Microsoft.Extensions.Logging.Console assembly/package; this project file currently has no explicit reference to it. Either add the appropriate package reference or remove .AddConsole() (fall back to .AddLogging() or the existing logging provider setup) to avoid a missing-method/compile error depending on transitive dependencies.

Suggested change
.AddLogging(logging => logging.AddConsole());
.AddLogging();

Copilot uses AI. Check for mistakes.
Comment on lines +218 to +220
if (methodDef.Service.Type != typeof(IRelayClient)) return rpcHub.GetClientPeer(RpcPeerRef.Default);
var peerRef = new RpcPeerRef(args.Get<Stl.Text.Symbol>(0), true);
return rpcHub.GetServerPeer(peerRef);
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This RpcCallRouter routes IRelayClient calls based on args.Get<Stl.Text.Symbol>(0), but IRelayClient methods don't take a peer id/symbol as their first argument (e.g., OnRequestShutdown(string reason, ...)). As written, routing will likely select the wrong peer or throw due to an argument type mismatch. Consider routing based on the current call context/peer (or explicitly include a peer identifier parameter in the IRelayClient contract and update call sites accordingly).

Suggested change
if (methodDef.Service.Type != typeof(IRelayClient)) return rpcHub.GetClientPeer(RpcPeerRef.Default);
var peerRef = new RpcPeerRef(args.Get<Stl.Text.Symbol>(0), true);
return rpcHub.GetServerPeer(peerRef);
if (methodDef.Service.Type != typeof(IRelayClient))
return rpcHub.GetClientPeer(RpcPeerRef.Default);
// For IRelayClient calls, route using the default peer reference instead of
// assuming the first argument is a Stl.Text.Symbol peer identifier.
return rpcHub.GetServerPeer(RpcPeerRef.Default);

Copilot uses AI. Check for mistakes.
@Stiggimy Stiggimy deleted the revert-2-copilot/cleanup-plugin-relay-sln branch February 18, 2026 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments