Git Product home page Git Product logo

Comments (11)

reduckted avatar reduckted commented on June 16, 2024 2

@rubengmurray @assafmo That problem should be fixed in v2.1.1 which is now on the marketplace.

There was different behavior in Node.js between Windows and Linux that meant this bug slipped through. 😳

from gitweblinks.

rubengmurray avatar rubengmurray commented on June 16, 2024 1

Yeah it did used to work, but I can't say that I was using the extension with VS Code for too long with it working, it was probably only a month maximum.

That would be great if you could find a way to at least get it working from the command palette, I really miss it now it's not available.

As a real world example I have 72 repositories inside my work folder, and I may be in work/microservice/src/dir/file.ts & want to link to something in there.

Thanks for the suggestion of multi-root workspaces - I'll have a read. I'm always a bit reticent to make changes to things like that when it adjusts a nice familiar (and easy!) pattern locally. I guess I should read about workspaces more generally to find out if I'm missing out on any other benefits from using VS Code in the way I do.

Nice one for the quick response and thanks for maintaining this extension.

from gitweblinks.

reduckted avatar reduckted commented on June 16, 2024 1

I've just published v2.1.0 to the marketplace which should fix this problem. 🎉

The commands should now work from the command palette and the context menu item should be visible if there's a repository within the workspace.

from gitweblinks.

rubengmurray avatar rubengmurray commented on June 16, 2024 1

Hi @reduckted,

I just updated to 2.1 and I do see the option appearing in the menu now, but I am receiving this error:

The file 'file:///Users/user/dev/dir/project/src/file.ts' is not tracked by Git.

&

Unable to find the repository for the workspace.

Two separate popups....

The file is definitely tracked by git. I've tested out a couple of project directories in different workspaces.

Same with attempting from the command palette

from gitweblinks.

rubengmurray avatar rubengmurray commented on June 16, 2024

It looks like there were a bunch of changes around Workspace / Repository management in this diff.

v1.9.0...v2.0.0

from gitweblinks.

rubengmurray avatar rubengmurray commented on June 16, 2024

OK very strange. I've tried installing 1.9.0 & 1.8.1 to see if the link re-appears and it doesn't. Same errors occur. Could be a conflict with another extension maybe?

FYI, I'm using Git Blame, which seems to be working absolutely fine.

from gitweblinks.

reduckted avatar reduckted commented on June 16, 2024

Thanks for the bug report!

I might use workspaces in a different way to others, but I usually have a big folder open as the root of the workspace (e.g. work) which contains a lot of individual repos (e.g. work/user-microservice, work/some-other-microservice).

Ah, I hadn't considered using VS Code that way, but I can definitely see why that would be useful.

The error reads as if the extension is no longer looking through the directories to find the .git folder closest to the file I'm trying to create a link for, instead it just looks into the root of the workspace folder and errors. I'm presuming this is the same reason the option has disappeared from the menu.

Yeah, that's right, although previous versions also looked up from the root of the workspace (i.e. the work folder), so it's odd that it used to work for you. 😕

I can make the commands look up from the file you're creating the link for, which will make the commands work when you run them from the command palette. I'll see if I can work out a performance-friendly way to detect that there's a Git repository somewhere in the workspace as well, so that the menu item can appear in the context menu.

As a workaround for now, you can try using a multi-root workspace where each repository is added as a workspace.

from gitweblinks.

assafmo avatar assafmo commented on June 16, 2024

Hi @reduckted,

I just updated to 2.1 and I do see the option appearing in the menu now, but I am receiving this error:

The file 'file:///Users/user/dev/dir/project/src/file.ts' is not tracked by Git.

&

Unable to find the repository for the workspace.

Two separate popups....

The file is definitely tracked by git. I've tested out a couple of project directories in different workspaces.

Same with attempting from the command palette

This happens to me as well!

from gitweblinks.

assafmo avatar assafmo commented on June 16, 2024

@reduckted Thank you! Yeah I'm on Linux, I'll check it out and report back.

And also thank you for this awesome extension! ❤️

from gitweblinks.

rubengmurray avatar rubengmurray commented on June 16, 2024

Fantastic work @reduckted. Works like a charm.

from gitweblinks.

assafmo avatar assafmo commented on June 16, 2024

Yup, works for me too!

from gitweblinks.

Related Issues (20)

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.