Skip to content

Comments

Fix the usage between the base workspace manager and the cloned workspace manager#435

Merged
nipunayf merged 1 commit intoballerina-platform:1.2.xfrom
nipunayf:fix-clone-wm
Oct 26, 2025
Merged

Fix the usage between the base workspace manager and the cloned workspace manager#435
nipunayf merged 1 commit intoballerina-platform:1.2.xfrom
nipunayf:fix-clone-wm

Conversation

@nipunayf
Copy link
Contributor

Purpose

$title as this causes a breakage in the didChange API when a new file is created.

I went through the original changes in ballerina-platform/ballerina-lang#42911, and they seem invalid for two reasons:

  1. This was done as a fix for the data mapper, and the current data mapper does not use this.
  2. The change doesn't make sense. It allows a change event without an open event occurring first.

Ideally, this should be fixed along with wso2/product-ballerina-integrator#1488. But for now, I made the changes compliant with the new expression editor service.

Fixes wso2/product-ballerina-integrator#1604

Copilot AI review requested due to automatic review settings October 25, 2025 18:45
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 fixes the incorrect routing of workspace manager calls between the base and cloned workspace managers based on URI schemes. The previous implementation allowed didChange events to be processed by the cloned workspace manager without a corresponding didOpen event, causing breakage when creating new files.

Key changes:

  • Corrected the conditional logic to route didOpen calls appropriately between base and cloned workspace managers
  • Fixed didChange to only route to the cloned workspace manager for expression scheme URIs
  • Aligned didClose to use consistent if-else structure instead of early return

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

@nipunayf nipunayf merged commit 77884ba into ballerina-platform:1.2.x Oct 26, 2025
3 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