-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
RFC: Check-in dependencies using non-gx paths #4831
Comments
Correct
That should work, i'm okay with this. We can probably figure out a nice way to provide a useful error message too. |
I am okay with this but can see several possible complications. Here is a laundry list of things I thought of:
|
That is true, it will also probably mess with people's completion or IDEs. I love the idea but we need to be careful. |
Another way to approach this would be to add pre/post commit hooks to do the (un)rewriting as needed. |
I as a general rule do not like commit hooks that modify files in place. I have a commit hook that checks for "go fmt" but it doesn't do it, it instead refuses to commit and tells me how to correct the situation. Now if there was a way to do the rewriting without touching the files than I am all for it. |
@magik6k unfortunately, that would cause trouble with, e.g.,
It's just a dependency where the version on github is broken but the version in gx works. From the perspective of GX, it'll look like a regular dependency.
You'd be able to use gx-link as we do today. Alternatively, you could remove the poison file and build with go-build to use all local dependencies.
Very good point. I wonder if we could create a vendor directory out of gxed packages for development? |
In terms of development workflow I have no major opinion.
The whole point of a change can easily get lost in the cascade of import diffs, and those changes pollute a file's blame history, which in turn makes it harder to track down when/why something changed.
I tend to agree, I'd much rather fail than have something automatically modified. While the latter is convenient, it can't always be trusted to follow your intention. |
Can we use gx with |
@Kubuxu probably. Unfortunately, we can't just symlink to Note: we still want to rewrite on build as it embeds the hashes in the final binary (makes debugging easier). |
Um, not 100% sure I am following but I don't think depending on fuse for building is such a good idea... |
That is, when the user calls |
If |
The README says to run |
And add a dummy package that refuses to build unless we're using gx. fixes #4831 License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
And add a dummy package that refuses to build unless we're using gx. fixes #4831 License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
And add a dummy package that refuses to build unless we're using gx. fixes #4831 License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
Looks like this can be closed now that #6038 has been merged |
Currently, we check-in dependencies using gx paths. As far as I know, we do this to prevent users from running
go get github.com/ipfs/go-ipfs
and then complaining when the resulting binary doesn't work.Unfortunately, leaving files in this rewritten state makes rebasing, merging, and reviewing painful. A simple dependency update tends to change a bunch of unrelated files. Worse, we occasionally end up importing gx packages that don't appear in packages.json.
Proposal:
Drawbacks:
I only bothered assigning those who I believe may hold strong opinions on this issue. Obviously, this impacts all contributors.
The text was updated successfully, but these errors were encountered: