-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
resources#isEqual ignores query-component #92502
Comments
I think we should (boldly) start to honour the query-components (since till today they are rare in our world). Alternatively (or depending on defaults additionally) we should make the |
Turns out that there is also this (which is a different identity): vscode/src/vs/base/common/resources.ts Line 18 in 0c1eb03
My proposal is to add a function that can be configured to ignore the query and fragment parts. That function should then be used for Not sure about the defaults - spec leans towards ignoring the fragment but we have many, many usages that use toString() as identity and I have feeling that default behaviour of the comparator should honour that. |
Looking into what supporting query means for our resource.ts API.
One approach is to see the query as an addition the the file name (but not to parent path):
Not clear what to do here:
Worse:
As the last example shows, this works against the URI syntax. A better alternative would be to avoid the query and use an path syntax like ' |
Alternative is to continue to ignore the query parameter for all path related operations but preserve it:
Not sure if that is of any use... |
Yes - I say that's the correct thing to do. Just like they ignore (already today) |
But |
That you don't know and cannot say. If the query represents a search for instance, then it does makes to run it in each folder up the parent chain |
The
isEqual
-utility ignores thequery
-component of uris, e.g it sayshttp://duckduckgo?q=FOO
equalshttp://duckduckgo?q=BAR
which isn't correct. What should be excluded (optionally) is the fragment-component - see https://tools.ietf.org/html/rfc3986#section-6.1.vscode/src/vs/base/common/resources.ts
Line 56 in f9465d1
The text was updated successfully, but these errors were encountered: