-
Notifications
You must be signed in to change notification settings - Fork 28.7k
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
FileSearchProvider
and TextSearchProvider
broken in 1.93.0 for folders with query parameters
#227836
Comments
Hmm. Do the workspace folder queries have URIs? Or is it the URI that is returned for the matching file? |
The {
"folder": {
"$mid": 1,
"fsPath": "/",
"external": "isfs://iris:user/?mapped%3D0",
"path": "/",
"scheme": "isfs",
"authority": "iris:user",
"query": "mapped=0"
},
"excludes": [
"**/.git",
"**/.svn",
"**/.hg",
"**/CVS",
"**/.DS_Store",
"**/Thumbs.db",
"**/node_modules",
"**/bower_components",
"**/*.code-search"
],
"includes": [],
"useGlobalIgnoreFiles": false,
"useIgnoreFiles": true,
"useParentIgnoreFiles": false,
"followSymlinks": true,
"maxResults": 0,
"session": {
"a": false,
"b": null
}
} |
Could you try with a workspace that doesn't have a query parameter in the workspace folder URI? I'm assuming that the query info has important info that you need for the search provider? |
The workspace I use has one folder with a query parameter, one without. I only saw one error in the Developer Tools. We use the query parameters to filter the files shown in VS Code since the virtual file systems can be large. Here's the file search options for the folder without query parameters: {
"folder": {
"$mid": 1,
"fsPath": "/",
"external": "isfs://iris:%sys/",
"path": "/",
"scheme": "isfs",
"authority": "iris:%sys"
},
"excludes": [
"**/.git",
"**/.svn",
"**/.hg",
"**/CVS",
"**/.DS_Store",
"**/Thumbs.db",
"**/node_modules",
"**/bower_components",
"**/*.code-search"
],
"includes": [],
"useGlobalIgnoreFiles": false,
"useIgnoreFiles": true,
"useParentIgnoreFiles": false,
"followSymlinks": true,
"maxResults": 0,
"session": {
"a": false,
"b": null
}
} |
Could you try it out with just the workspace folder with no query parameter in its URI? I think I know what's happening (related to #227248). |
That works |
We made a change to the API recently so that we do one call to the extension for results for all workspace folders. Then, we try to derive the original workspace folder by using the result's URI. I think that the latter is currently failing with query params - let me try to fix this. |
Question: do you ever have workspace folders that have the same URI except for the query parameter and/or the fragment? |
Yes, we do. The URI authority tells our extension what remote server to connect to, and the query parameters add filtering to limit the scope of documents on the remote server that are part of that VS Code workspace folder. There's no reason why a workspace couldn't contain two folders, both connected to the same remote server but with different filtering options. As of now we do not use the fragment, just query parameters. |
@andreamah FWIW we've experienced issues with this in the past. See #212363 for a recent, still-open example. |
I believe you need to make sure to honor the query-part which isn't the default. I don't really know if or how you do this but the search tree does have support for it (
|
Does the URI need to have the query/fragment, though? For example, if we have the workspace @isc-bsaviano are you returning the file result URIs with the query attached? |
Yes, the returned file URIs contain the query parameters. They only differ from the containing workspace folder URI in the path segment. |
Could you give an example of this? Do you mean that the only difference is the |
Yes, that's what I mean |
if the default is defined using |
Yeah, looks like missed the last update here |
If the issue isn't with the |
how/where do you use the |
I use it here
I use @isc-bsaviano do you happen to have a small repro project that I can try out to run into the bug? |
My extension's
FileSearchProvider
andTextSearchProvider
report this error on version 1.93.0 for folders with query parameters in their URI:@andreamah Could this have been caused by your recent work in this area?
The text was updated successfully, but these errors were encountered: