Skip to content

refactor: Decouple the codelens provider and test file watchers#1178

Merged
jdneo merged 3 commits into
masterfrom
cs/refactor
Apr 23, 2021
Merged

refactor: Decouple the codelens provider and test file watchers#1178
jdneo merged 3 commits into
masterfrom
cs/refactor

Conversation

@jdneo

@jdneo jdneo commented Apr 23, 2021

Copy link
Copy Markdown
Member
  • Add a testSourceProvider so that the codelensProvider and testFileWatchers can be decoupled and handle the initialization by themselves.

@jdneo jdneo added this to the 0.28.2 milestone Apr 23, 2021
Comment thread src/provider/testSourceProvider.ts Outdated
}

this.testSource = await getTestSourcePaths(workspace.workspaceFolders.map((workspaceFolder: WorkspaceFolder) => workspaceFolder.uri.toString()), true);
this.strictTestSource = await getTestSourcePaths(workspace.workspaceFolders.map((workspaceFolder: WorkspaceFolder) => workspaceFolder.uri.toString()), false);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For simplicity it's ok. But actually these are uplicate calls, same check is executed on same workspaceFolders. Consider to refine the implementation if it's expensive, e.g. return both in one call, one check.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

make sense

@jdneo jdneo merged commit e0de967 into master Apr 23, 2021
@jdneo jdneo deleted the cs/refactor branch April 23, 2021 09:09
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