Skip to content

Case-sensitivity and file system providers #48258

Closed

Description

Today we seems to have hardcoded logic to know when paths should be compared case-sensitive or not, e.g. callers of isEqualOrParent or isEqual and likely many more...

With b0ede6c I have added a file system provider flag/capability to signal that it is case-sensitive (default is case-insensitive). We need to come up with a strategy to communicate that information to consumers, e.g. the explorer or file events so that we do the correct thing.

A sample of failure is part of the memos-sample which creates to files that only differ in casing: https://github.com/Microsoft/vscode-extension-samples/blob/58ea8617190ee5566e001b9875b8b2c25a983857/fsprovider-sample/src/extension.ts#L30

Activity

  1. added
    under-discussion
    remote
    on Apr 20, 2018
  2. bpasero commented on Apr 20, 2018

    @bpasero
    Contributor

    I guess we would need some service that can compare resources which has all the knowledge of the capabilities of the file system. Possible inputs to this service are the capabilities of the remote file system, and then for file://, the OS and possibly smarter things like having a real understanding of the file system. As a first step we could have a stupid logic in the service for file:// where we simply assume Linux is case-sensitive and the others are not.

  3. isidorn commented on Apr 20, 2018

    @isidorn

    Introducing such a service makes sense but could it also be a part of the FileService?
    I could look into adding this once we decide where this should belong. And I like the idea of starting with stupid logic which respects what we currently have.

  4. jrieken commented on Apr 20, 2018

    @jrieken
    ContributorAuthor

    Introducing such a service makes sense but could it also be a part of the FileService?

    👍 for adding this to the FileService, it is somewhat similar to canHandleResource

  5. bpasero commented on Apr 20, 2018

    @bpasero
    Contributor

    We can start adding it there. The challenge will be to get access to this service from all places where we need to compare URIs. Also, I guess comparing 2 resources with different schemes should not be supported at all.

  6. isidorn commented on Apr 20, 2018

    @isidorn

    Assigning to May so we investigate next milestone.

  7. jrieken commented on Apr 20, 2018

    @jrieken
    ContributorAuthor

    Also, I guess comparing 2 resources with different schemes should not be supported at all.

    Well, not supported as they are inequal by definition. So, compare scheme, then authority (both always case-insensitive according to my knowledge), and then compare path (case-sensitive or not) and optionally compare query and ignore fragment.

  8. isidorn commented on May 18, 2018

    @isidorn

    We were focused on grid this milestone, next week I am on vacation, this is not for endgame -> June

  9. 6 remaining items

  10. isidorn commented on Aug 24, 2018

    @isidorn

    Does not seem like this will happen in the last couple days of the milestone (risky) -> september

  11. isidorn commented on Dec 17, 2019

    @isidorn

    I have pushed the changes in the Explorer such that the Explorer will now respect the FileSystemProvider case sensitive capability. Explorer also reacts on the change of this capability.
    I know that this does not solve all the issues, but should in theory help with many issues as Martin Aeschlimann (@aeschli) suggested.
    So let's try it out with insiders from tomomrrow and for now closing this issue.

  12. locked and limited conversation to collaborators on Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

remoteunder-discussion

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions