-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
test-web: test failure in search tests #227248
test-web: test failure in search tests #227248
Comments
Looking into this, this is because the URI that is being returned is not a subfolder of the original workspace folder that is being targeted. I see that we target |
I have a fix in #227256, although I don't know whether this is high-severity enough to make it a candidate. Any idea whether it is popular for web extensions to offer results that aren't a subfolder of the original
|
This is in proposed API, so does it need to be a candidate? |
I don't know whether other extensions would do this but why does the test do it? |
It's tricky because it's a proposed API that has been around for a long time, so I'm not sure if people are as keen about breakages (esp if they adopted it around its early days) |
When I tested, I actually couldn't get the test to work, but I just ran |
Oh, sorry, I didn't realize that this is a bug in the test search provider. I make a fix there. |
Sorry for the false alarm, thanks @andreamah for figuring it out. |
@aeschli is it a common case in web to have a URI from outside of the workspace returned as a result? I'm not sure if this is a case that I should support. |
The I fixed this in my search provider and it would be good if VS Code checks that and throws a better exception. That's unrelated to what the workspace is set to.. If the workspace happens to be set to a folder |
I'm not sure if I understand what you mean by this:
To confirm: are results that you provide using your provider always subfolders of the workspace root URI? |
The FileSearchProvider doesn't care about the current workspace root API. It only looks at the search options ( If the workspace root happens to be on the I think right now workspace search is the only user of the FileSearchProvider, but I would expect that, at some point, we also add a |
vscode-test-web
helps writing and testing VS Code web extensions and extension tests. It starts a server that serves VS Code Web along with the extension under development.vscode-test-web
contains a sample extension and some sample tests.One of the samples adds a file system provider that also implements a
FileSearchProvider
https://github.com/microsoft/vscode-test-web/blob/3c19e4bc8797cdbacc793f15b7fe0f03acea078d/fs-provider/src/fsProvider.ts#L142
The tests then use it to query a test file system:
https://github.com/microsoft/vscode-test-web/blob/3c19e4bc8797cdbacc793f15b7fe0f03acea078d/sample/src/web/test/suite/search.test.ts#L45
These tests are currently failing with property access on undefined (
fqFolderInfo
is undefined)vscode/src/vs/workbench/services/search/common/fileSearchManager.ts
Line 159 in 135a89c
I suspect this was caused by the changes for #214041
Steps
npm i && npm run install-extensions
npm run sample-tests
shows the test failureTo debug
npm run sample-tests
fileSearchManager.ts
line 159The text was updated successfully, but these errors were encountered: