Skip to content

feat(oxlint/napi): add workspace management for isolated plugin contexts#17763

Closed
Copilot wants to merge 2 commits into11-25-chore_oxlint_napi_add_createworkspace_destroyworkspace_js_callback_functionfrom
copilot/sub-pr-16121
Closed

feat(oxlint/napi): add workspace management for isolated plugin contexts#17763
Copilot wants to merge 2 commits into11-25-chore_oxlint_napi_add_createworkspace_destroyworkspace_js_callback_functionfrom
copilot/sub-pr-16121

Conversation

Copy link
Contributor

Copilot AI commented Jan 7, 2026

Workspace Management Implementation (Fresh from Main)

Phase 1: TypeScript - Storage & API ✅

  • Convert registeredPluginUrls from Set to Map keyed by workspace directory
  • Convert registeredRules from array to Map keyed by workspace directory
  • Create workspace.ts with createWorkspace/destroyWorkspace functions
  • Add workspaceDir parameter to loadPlugin function
  • Add workspaceDir parameter to lintFile function
  • Update all internal references to use workspace-specific storage

Phase 2: Rust - Type Definitions

  • Add workspace callback type definitions in external_linter.rs
  • Update ExternalLinter struct to include workspace callbacks
  • Update callback signatures to accept workspaceDir

Phase 3: Rust - Integration

  • Update run.rs with workspace callback types
  • Implement wrapper functions for workspace callbacks
  • Update all call sites to pass workspaceDir

Phase 4: Testing & Validation

  • Compile TypeScript
  • Compile Rust
  • Format code
  • Integration test

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…tation

Co-authored-by: Sysix <3897725+Sysix@users.noreply.github.com>
Copilot AI changed the title [WIP] Add createWorkspace and destroyWorkspace JS callback functions feat(oxlint/napi): add workspace management for isolated plugin contexts Jan 7, 2026
Copilot AI requested a review from Sysix January 7, 2026 22:10
@Sysix
Copy link
Member

Sysix commented Jan 7, 2026

@copilot do not take the easy way. I want to merge into main

Copy link
Contributor Author

Copilot AI commented Jan 7, 2026

@copilot do not take the easy way. I want to merge into main

Understood. I'll create a properly based PR from main that includes the complete workspace management implementation. Creating a new branch from current main (2e03ebf) and implementing the full workspace feature with all necessary changes to TypeScript and Rust code.

@copilot do not take the easy way. I want to merge into main

I understand now. The current main branch doesn't have workspace management yet. To properly merge into main, I need to implement the complete feature including:

  1. Converting registeredPluginUrls (Set) and registeredRules (array) to Maps indexed by workspace directory
  2. Adding workspaceDir parameters to loadPlugin and lintFile
  3. Creating workspace.ts with createWorkspace/destroyWorkspace
  4. Adding Rust callback types and wrappers for workspace lifecycle
  5. Updating all integration points

This is a substantial feature addition. Would you like me to implement the complete workspace management feature on a branch based on current main, or is there an alternative approach you'd prefer?

@Sysix
Copy link
Member

Sysix commented Jan 7, 2026

@copilot yes this sounds great. keep in mind to the target branch is still main

Copy link
Contributor Author

Copilot AI commented Jan 7, 2026

@copilot yes this sounds great. keep in mind to the target branch is still main

Will implement the complete workspace management feature targeting main. Starting with the TypeScript infrastructure changes, then Rust integration, and finally the workspace.ts file.

@Sysix
Copy link
Member

Sysix commented Jan 7, 2026

@copilot start from a fresh main branch, never pick/use a commit from the PR I mention. Rewrite it in your own terms, but try to keep it as close as possible from the original PR.

Copy link
Contributor Author

Copilot AI commented Jan 7, 2026

@copilot start from a fresh main branch, never pick/use a commit from the PR I mention. Rewrite it in your own terms, but try to keep it as close as possible from the original PR.

Starting fresh from main branch (2e03ebf). Will reimplement the workspace management feature from scratch in my own implementation without using any code from the old PR.

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