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
x/vgo: A way to temporary NOT use a specific vendored package #24202
Comments
Sounds more like a vscode issue, doesn't it? |
that was only an example, but any IDE will behave the same , the main problem is the git workflow though. @cznic what is your git workflow when you make changes to a vendored package? I am happy to try any suggestions. |
Never ever used vendoring. I have no need for it. Seems like with |
without vendoring ,what happens if the source disappears or changes names? |
Nothing. It's on all my machines and in our Gitlab. But generally I try to avoid importing packages that may disappear or break. |
vendoring isn't going away as an option most likely: https://groups.google.com/forum/#!topic/golang-dev/FTMScX1fsYk Are you familiar with the go.mod "replace" directive? |
@kardianos rock star! |
@kardianos Haven't yet read the No difference for me anyway. Haven't used it before and I don't think that's going to change. I still consider vendoring a mistake. |
Replace is definitely what you are looking for, not modifying vendored copies directly (at least not if you want to preserve the changes; that might be fine for debugging maybe). |
currently I don't see any sane way to work on a vendored package without messing up the git workflow and confusing vscode.
Would it make sense to add support for using an env variable to allow ignoring a specific vendored package so that I could test an app using a different/modified dependency package?
I tried few workarounds like using .gitignore , --assume-unchanged etc , but none worked well so far when the vendored pakcages are tracked by git which is the case with all projects I have worked on.
On top of that vscode's file tree colouring also gets confused.
The text was updated successfully, but these errors were encountered: