Skip to content

VS Extension - #5

Merged
xxAtrain223 merged 14 commits into
mainfrom
vs_extension
Aug 26, 2026
Merged

VS Extension#5
xxAtrain223 merged 14 commits into
mainfrom
vs_extension

Conversation

@xxAtrain223

Copy link
Copy Markdown
Owner

This pull request adds full support for building, testing, packaging, and releasing a Visual Studio x64 extension alongside the existing VS Code extension. It introduces new CI and release workflows for the Visual Studio extension, updates documentation to cover the new package, and ensures that both VS Code and Visual Studio extensions are validated, attested, and released with matching versions.

CI and Release Workflow Enhancements

  • Visual Studio Extension CI Job: Adds a new visual-studio-extension job to .github/workflows/ci.yml to build, test, validate, and artifact the Visual Studio x64 extension, including smoke and experimental instance tests.
  • Release Workflow for Visual Studio Extension: Updates .github/workflows/release.yml to package, validate, attest, and store the Visual Studio VSIX, and ensures the release includes all four VSIX packages (three for VS Code, one for Visual Studio). [1] [2]
  • Artifact Naming and Publication: Adjusts artifact naming to distinguish VS Code and Visual Studio packages, and restricts automated marketplace publication to VS Code extensions only. [1] [2]

Documentation Updates

  • Build Instructions: Expands docs/BUILDING.md with detailed steps for building, testing, and validating the Visual Studio extension, including required tools and manual testing notes. [1] [2]
  • Release Process Documentation: Updates docs/RELEASING.md to describe the Visual Studio package, versioning requirements, attestation, and manual Visual Studio Marketplace publication steps. [1] [2] [3] [4]

Build System Improvements

  • CMake Support for AppleClang: Enables -fexperimental-library for AppleClang to support C++20 features needed by the project.

Other

  • Workflow Naming: Generalizes workflow and job names to reflect support for multiple editor extensions.

These changes ensure robust, automated, and documented support for both VS Code and Visual Studio extensions, streamlining development and release processes for both platforms.

xxAtrain223 and others added 13 commits August 23, 2026 10:48
Co-authored-by: Copilot <copilot@github.com>
…pdates, and language server integration

Co-authored-by: Copilot <copilot@github.com>
…g process

Co-authored-by: Copilot <copilot@github.com>
- Enhance smoke tests in `process_smoke.py` to include workspace capabilities and various LSP methods such as completion, signature help, hover, definition, references, and document symbols.
- Add a new manual testing checklist for Visual Studio in `MANUAL-TESTING.md` to ensure extension functionality across different scenarios.
- Create a PowerShell script `test-experimental-instance.ps1` for automated testing of the Visual Studio experimental instance.
- Introduce `AssemblyInfo.cs` to allow internal visibility for unit tests.
- Develop `RlsClientServices.cs` to manage server process interactions and logging.
- Set up a new test project `RandoLogicScript.VisualStudio.Tests.csproj` with necessary dependencies for unit testing.
- Implement unit tests in `RlsLanguageClientTests.cs` to validate server path resolution, activation behavior, and logging mechanisms.

Co-authored-by: Copilot <copilot@github.com>
…hangelog

- Add Visual Studio x64 build and test jobs to CI workflow
- Update release workflow to include Visual Studio package validation and storage
- Expand BUILDING.md with Visual Studio extension build instructions
- Revise RELEASING.md for clarity on Visual Studio extension release process
- Document known limitations and LSP tracing in README.md
- Create CHANGELOG.md for Visual Studio extension with notable changes
Co-authored-by: Copilot <copilot@github.com>
… extension

Co-authored-by: Copilot <copilot@github.com>
…erators

Co-authored-by: Copilot <copilot@github.com>
…pings

Co-authored-by: Copilot <copilot@github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Critical packaging and Visual Studio 18.x compatibility issues, plus a moderate startup-cancellation race, remain unresolved.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR adds Visual Studio x64 extension support alongside the existing VS Code extension, including LSP updates, packaging, validation, CI, release automation, and documentation.

Changes:

  • Adds the Visual Studio client, VSIX project, tests, and integration validation.
  • Extends semantic-token handling, URI canonicalization, hover formatting, and protocol coverage.
  • Adds shared native-binary validation and multi-editor CI/release workflows.
File summaries
File Summary Final review status
lsp/tests/server_composition_root_tests.cpp Tests mapped semantic legends.
lsp/tests/semantic_tokens_service_tests.cpp Expands semantic-token coverage.
lsp/tests/process_smoke.py Adds navigation and rename protocol checks.
lsp/tests/hover_service_tests.cpp Updates Markdown hover expectations.
lsp/tests/document_store_tests.cpp Tests symlink URI canonicalization.
lsp/src/semantic_tokens_service.cpp Adds property and wildcard semantic-token handling.
lsp/src/semantic_token_legend.cpp Maps client-provided token names.
lsp/src/lifecycle_routes.cpp Applies mapped semantic legends.
lsp/src/hover_service.cpp Uses safe inline-code delimiters.
lsp/src/document_uri.cpp Canonicalizes local file URI keys.
lsp/include/rls/lsp/semantic_token_legend.h Declares legend mapping API.
editors/vscode/syntaxes/rls.tmLanguage.json Declares .rls file types.
editors/vscode/src/test/suite/languageClient.test.ts Tests custom semantic scopes.
editors/vscode/scripts/validate-vsix.mjs Uses shared binary validation.
editors/vscode/scripts/bundle-language-server.mjs Validates bundled binaries.
editors/vscode/package.json Registers custom semantic-token metadata.
editors/visualstudio/tests/RlsLanguageClientTests.cs Adds client unit tests.
editors/visualstudio/tests/RandoLogicScript.VisualStudio.Tests.csproj Defines test project dependencies.
editors/visualstudio/src/source.extension.vsixmanifest Defines VSIX metadata and compatibility. Critical (3 votes): update the prerequisite range to include Visual Studio 18.x and keep related checks consistent.
editors/visualstudio/src/RlsLanguageClient.cs Implements the Visual Studio LSP client lifecycle. Moderate (2 votes): guard the cancellation/ownership race during startup and clean up the connection path.
editors/visualstudio/src/RlsContentType.cs Registers the RLS content type.
editors/visualstudio/src/RlsClientServices.cs Provides process and environment abstractions.
editors/visualstudio/src/RandoLogicScript.VisualStudio.csproj Builds and packages the VSIX. Critical (3 votes): set VSIXSubPath to Grammars for the TextMate grammar.
editors/visualstudio/src/RandoLogicScript.pkgdef Registers TextMate assets.
editors/visualstudio/src/Properties/AssemblyInfo.cs Exposes internals to tests.
editors/visualstudio/scripts/validate-vsix.ps1 Validates VSIX contents and binaries. Critical (1 vote): update the hard-coded compatibility range to include Visual Studio 18.x.
editors/visualstudio/scripts/test-experimental-instance.ps1 Exercises Visual Studio host integration.
editors/visualstudio/README.md Documents Visual Studio integration and builds. Nit (2 votes): replace the stale statement that CI and release workflows are future work.
editors/visualstudio/RandoLogicScript.VisualStudio.sln Defines the extension and test solution.
editors/visualstudio/MANUAL-TESTING.md Adds a manual validation checklist.
editors/visualstudio/CHANGELOG.md Documents the initial release.
editors/shared/validate-native-binary.mjs Adds a native validation CLI.
editors/shared/native-binary-validation.mjs Centralizes PE, ELF, and Mach-O checks.
docs/RELEASING.md Documents multi-editor releases.
docs/BUILDING.md Documents Visual Studio builds and tests.
CMakeLists.txt Adds AppleClang experimental-library support.
.gitignore Ignores Python and Visual Studio build outputs.
.github/workflows/release.yml Packages and releases extension artifacts.
.github/workflows/ci.yml Builds and validates the Visual Studio extension.
Review details

Suppressed comments (5)

.github/workflows/ci.yml:149

  • The native MSBuild command's exit code is not checked before dotnet test. PowerShell can continue after a non-zero native command and the successful test command can overwrite $LASTEXITCODE, allowing a failed extension build to be reported as successful. Check $LASTEXITCODE immediately after MSBuild.
          & $msbuild editors/visualstudio/RandoLogicScript.VisualStudio.sln /restore /t:Build /p:Configuration=Release /m /v:minimal

.github/workflows/release.yml:142

  • The native MSBuild command's exit code is not checked before dotnet test. PowerShell can continue after a non-zero native command and the successful test command can overwrite $LASTEXITCODE, allowing a failed extension build to be reported as successful. Check $LASTEXITCODE immediately after MSBuild.
          & $msbuild editors/visualstudio/RandoLogicScript.VisualStudio.sln /restore /t:Build /p:Configuration=Release /m /v:minimal

editors/visualstudio/scripts/test-experimental-instance.ps1:106

  • This cleanup force-kills every devenv.exe whose command line contains the caller-supplied root suffix, not just hosts started by this harness. With the documented/default suffix, a developer's existing Experimental Instance or a parallel harness run can be terminated unexpectedly; track the PIDs started by this script (or require an isolated suffix) before stopping processes.
function Stop-ExperimentalProcesses {
    Get-ExperimentalProcesses | ForEach-Object {
        Stop-Process -Id $_.ProcessId -Force -ErrorAction SilentlyContinue

editors/visualstudio/src/RandoLogicScript.pkgdef:5

  • GrammarMapping must point the source.rls scope at the TextMate grammar, but this points it at language-configuration.json. Visual Studio will not load the RLS grammar for syntax highlighting; map this scope to $PackageFolder$\Grammars\rls.tmLanguage.json instead.
"source.rls"="$PackageFolder$\language-configuration.json"

editors/visualstudio/src/RlsLanguageClient.cs:139

  • The Exited handler is attached only after Start(). If the server exits immediately during or just after startup, the underlying Process.Exited event can be raised before this subscription and is not replayed; the client then records and returns a dead process without disposing it or allowing recovery. Subscribe before starting the process (and clean up if startup fails).
            process.Exited += OnServerProcessExited;
  • Files reviewed: 38/39 changed files
  • Comments generated: 5
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread editors/visualstudio/README.md Outdated
Visual rendering, keyboard accessibility, and UI workflow checks remain manual. See
`editors/visualstudio/MANUAL-TESTING.md`.

CI and release publication belong to the remaining implementation phase.
Comment on lines +83 to +86
if ($null -eq $installationTarget -or
$installationTarget.Id -ne 'Microsoft.VisualStudio.Community' -or
$installationTarget.Version -ne '[17.0,18.0)') {
throw 'VSIX must target Microsoft.VisualStudio.Community [17.0,18.0).'
Comment on lines +36 to +41
<Content Include="..\..\vscode\syntaxes\rls.tmLanguage.json">
<Link>Grammars\rls.tmLanguage.json</Link>
<TargetPath>rls.tmLanguage.json</TargetPath>
<IncludeInVSIX>true</IncludeInVSIX>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
Comment on lines +155 to +160
var cancellation = token.Register(() => StopOwnedServerProcess(process, false));
lock (processLock)
{
if (ReferenceEquals(serverProcess, process))
{
serverCancellation = cancellation;
Comment on lines +12 to +14
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[17.0,18.0)">
<ProductArchitecture>amd64</ProductArchitecture>
</InstallationTarget>
@xxAtrain223
xxAtrain223 merged commit 8e64834 into main Aug 26, 2026
10 checks passed
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.

2 participants