Giter VIP home page Giter VIP logo

Comments (7)

mishak87 avatar mishak87 commented on July 22, 2024

There should be loop checking for each path in getGOPATHWorkspaces.

from vscode-go.

ulrichSchreiner avatar ulrichSchreiner commented on July 22, 2024

hi,

i'm currently working on a docker-container (vsc, somthing like atocker) which bundles all binaries in the container and starts vscode. The GOPATH is the current working directory of the host and the docker run ... mounts this directory as a GOPATH to the container.

It would be great to fix this bug to support multiple GOPATH entries in your setupGoPathAndOfferToInstallTools function so i can create a GOPATH in the container with two parts (one for the source, the second for the tools). So all the tools would be hidden from "outside" the container.

Imho it would be more better to have all the build-tools in the PATH, not in the GOPATH. It would be much easier to separate the build-tools from the workspaces. Would this be an option?

from vscode-go.

mishak87 avatar mishak87 commented on July 22, 2024

@ulrichSchreiner When this is fixed you can always install them globally manually.

from vscode-go.

ulrichSchreiner avatar ulrichSchreiner commented on July 22, 2024

@mishak87 I don't think so. All the tools are referenced via GOPATH entries in the bin subdirectory, never in the PATH. So "install them globally manually" won't help if they won't be found :-)

from vscode-go.

mishak87 avatar mishak87 commented on July 22, 2024

@ulrichSchreiner Gotcha! I will try to make pull request over weekend to get this fixed.

from vscode-go.

lukehoban avatar lukehoban commented on July 22, 2024

Thanks to @pcmind for PR #46 which fixed this issue.

from vscode-go.

lukehoban avatar lukehoban commented on July 22, 2024

@ulrichSchreiner and @mishak87 Good scenario. Would love a PR to support this. Feel free to open another issue as well if you'd like to continue to track this.

@ulrichSchreiner To your first point, we preferred GOPATH/bin over PATH just because we saw a number of developer setups where PATH was not configured to include GOPATH/bin. That said, perhaps it makes sense to search PATH as well when looking for the tools? Probably as a fallback after looking in the workspaces GOPATH/bin.

There's another approach to all of this which is just to have the VS Code Go extension install it's own known copies to a seperate location and use them from there instead of relying on PATH/GOPATH. Tracking that suggestion in #5, thoughts on that welcome.

from vscode-go.

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.