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

fix: unwatchFileChanges api do not work on file service #2824

Merged
merged 3 commits into from
Jun 29, 2023

Conversation

miserylee
Copy link
Contributor

@miserylee miserylee commented Jun 19, 2023

Types

  • 🐛 Bug Fixes

Background or solution

🤖 Generated by Copilot at ba9e64a

  • Await the watch method of the provider to resolve the watcherId (link)

watchFileChanges 时,调用 provider.watch 获取 watcherId,watch 方法返回值可能是 promise,这里如果不 await,会导致获取到的 watcherId 不是 number 类型,后面 provider.unwatch 会什么都不干,因此导致 unwatchFileChanges 不生效

Changelog

🤖 Generated by Copilot at ba9e64a

Await file watcher promises and register disposers correctly. This fixes a bug in file-service.ts that caused some file watchers to leak.

@opensumi opensumi bot added the 🐞 bug Something isn't working label Jun 19, 2023
@erha19
Copy link
Member

erha19 commented Jun 19, 2023

@miserylee 感谢贡献,这个修复可以修到 v2.25 分支上,跟随我们近期的 patch 版本,v2.25.2,具体需要从 v2.25 分支中切出分支重新提交一下相关代码修改

@erha19
Copy link
Member

erha19 commented Jun 20, 2023

/backport to v2.25

@opensumi
Copy link
Contributor

opensumi bot commented Jun 20, 2023

Backporting to v2.25 branch is started.
Please see: https://github.com/opensumi/actions/actions/workflows/backport-pr.yml

@erha19 erha19 changed the title [bug] 解决 File service unwatchFileChanges 不生效的问题 fix: unwatchFileChanges api do not work on file service Jun 20, 2023
@erha19 erha19 merged commit b67895d into opensumi:main Jun 29, 2023
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants