Skip to content

Conversation

@claneo
Copy link

@claneo claneo commented Nov 11, 2025

Summary

  1. Using VSCode builtin log output instead
  2. Only external resources, like temporary files, require cleanup
image

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).
@netlify
Copy link

netlify bot commented Nov 11, 2025

Deploy Preview for rstest-dev ready!

Name Link
🔨 Latest commit ff35a84
🔍 Latest deploy log https://app.netlify.com/projects/rstest-dev/deploys/6912c73c0c7e340008211fe5
😎 Deploy Preview https://deploy-preview-685--rstest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@CLAassistant
Copy link

CLAassistant commented Nov 11, 2025

CLA assistant check
All committers have signed the CLA.

@claneo claneo marked this pull request as ready for review November 11, 2025 06:25
Copilot AI review requested due to automatic review settings November 11, 2025 06:25
Copilot finished reviewing on behalf of claneo November 11, 2025 06:27
Copy link
Contributor

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 simplifies the logger implementation by replacing custom logging logic with VSCode's built-in LogOutputChannel API. The change removes the custom logLevel configuration option and associated event handling, relying instead on VSCode's native log level management.

  • Replaced custom OutputChannel with vscode.LogOutputChannel which provides built-in log level filtering
  • Removed rstest.logLevel configuration option and all related code
  • Removed test coverage for the deprecated logLevel configuration

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/vscode/src/logger.ts Refactored to use vscode.LogOutputChannel with built-in log methods (trace, debug, info, warn, error) instead of custom formatting and level filtering
packages/vscode/src/config.ts Removed LogLevel type, logLevel property from ExtensionConfig, and associated validation logic
packages/vscode/src/extension.ts Removed logger from context subscriptions (note: this may cause improper cleanup)
packages/vscode/package.json Removed rstest.logLevel configuration property from extension manifest
packages/vscode/tests/suite/config.test.ts Removed test for rstest.logLevel configuration and unused waitForConfigValue import
packages/vscode/tests/fixtures/.vscode/settings.json Removed rstest.logLevel setting from test fixtures
packages/vscode/README.md Updated configuration table to remove rstest.logLevel and add rstest.rstestPackagePath documentation

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

this.context = context;
this.ctrl = vscode.tests.createTestController('rstest', 'Rstest');
context.subscriptions.push(this.ctrl, logger);
context.subscriptions.push(this.ctrl);
Copy link

Copilot AI Nov 11, 2025

Choose a reason for hiding this comment

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

The logger singleton is still being used throughout the codebase (in extension.ts, master.ts, testTree.ts), but it's no longer being disposed. Since the logger creates a vscode.LogOutputChannel resource that should be cleaned up, the logger should still be added to context.subscriptions to ensure proper disposal when the extension is deactivated.

Suggestion: Change this line to context.subscriptions.push(this.ctrl, logger);

Suggested change
context.subscriptions.push(this.ctrl);
context.subscriptions.push(this.ctrl, logger);
Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants