GithubHelp home page GithubHelp logo

sourceuribug's Introduction

SourceUriBug README

This is a POC project to demonstrate the issue with file renaming in VS Code - namely 1) After a file has been renamed by a user, the VS Code APIs return the stale name, and 2) the sourceUri passed when invoked via the explorer is different from the sourceUri that's passed when invoked via a contextual menu in a document.

This is a boilerplate VS Code extension, with the following events added:

  • example.tree.node.command
  • example.editor.command

Both of these commands call exampleCommand() in extension.ts.

To reproduce the bug:

  1. Run VS Code with this extension
  2. Open a project
  3. In the explorer, right-click on a file and select Rename.
  4. Rename the file's name. Only change the case of some of the characters, don't add or remove characters. (eg. rename homepage.html to homePage.html)
  5. In the explorer, right-click the same file and select Example Tree Node Command

Result: When debugging, you should break into exampleCommand(). Observe the sourceUri that's passed in, and notice that the paths in sourceUri are to homePage.html, which is expected.

  1. If not already opened, open the file that was renamed (eg homePage.html)
  2. Right-click within the editor and select Example Editor Command

Result: When debugging, you should break into exampleCommand(). Observe the sourceUri that's passed in, and notice that the paths in sourceUri are incorrect, and are the stale/original homepage.html.

There are two bugs here:

  1. After a file has been renamed by a user, the VS Code APIs return the stale name
  2. The sourceUri passed when invoked via the explorer is a different from the sourceUri that's passed when invoked via a contextual menu in a document.

sourceuribug's People

Contributors

jeffb-sfdc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.