Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid accessing packageCompilation() directly from project.currentPackage() #37390

Open
IMS94 opened this issue Aug 15, 2022 · 0 comments
Open
Labels

Comments

@IMS94
Copy link
Contributor

IMS94 commented Aug 15, 2022

Description:
Right now there are 2 locations in ls extensions where the package compilation is accessed directly.

  1. BallerinaTriggerModifyUtil
  2. BallerinaTreeModifyUtil
    Accessing the compilation directly may lead to concurrency issues. Therefore, the recommended approach is to use the workspaceManager.waitAndGetPackageCompilation() method.

Also the above 2 occurrences update the text document manually which is unsafe as well. We should come up with a concurrency safe approach if there's such a risk.

Describe your task(s)
We should update the above occurrences to access the packageCompilation via workspace manager

@IMS94 IMS94 added Type/Task Team/LanguageServer/Extensions Any Language Sever Extension labels Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant