You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to implement an experimental option that would change the package import paths from src/gx/ipfs/Qm-long-hash/pkg-name to src/gx/pkg/pkg-name/pkg-version that I think it would be very useful for new developers that want to start contributing. I don't want to change the default way gx works (I already tried to push that agenda in #166 without much success :) just to have an option to set the gx/gx-go tandem in this human-readable mode for development environments.
From what I've seen in the code this seems reasonably possible to do without affecting much of the current code but I'm raising the issue to check what would be the potential pitfalls of this change.
The first that comes to mind is that go-ipfs has its import paths hardcoded to the gx/ipfs/hash format but I think that's the exception rather than the rule so this package could be added as an exception in the logic without obscuring the code (and both types of path can coexist in the $GOPATH/src/gx workspace without conflicts).
Another issue is that this scheme would not allow to import two packages with the same name and version but different hashes (in fact turning them into different pieces of data) but that seems like a reasonable constraint.
I don't see how this will help. Ideally, those paths only appear in build artifacts (once we stop leaving go-ipfs paths rewritten).
Also note, the efforts in #206 should make this a moot point fairly soon. With those changes, a gx lock-install creates a vendor directory and then symlinks gx packages unrewritten into the vendor directory. Eventually, we'd like to replace our normal gx packages with these lock-based packages and make gx lock-install the default gx install command.
I would like to implement an experimental option that would change the package import paths from
src/gx/ipfs/Qm-long-hash/pkg-name
tosrc/gx/pkg/pkg-name/pkg-version
that I think it would be very useful for new developers that want to start contributing. I don't want to change the default waygx
works (I already tried to push that agenda in #166 without much success :) just to have an option to set thegx
/gx-go
tandem in this human-readable mode for development environments.From what I've seen in the code this seems reasonably possible to do without affecting much of the current code but I'm raising the issue to check what would be the potential pitfalls of this change.
The first that comes to mind is that
go-ipfs
has its import paths hardcoded to thegx/ipfs/hash
format but I think that's the exception rather than the rule so this package could be added as an exception in the logic without obscuring the code (and both types of path can coexist in the$GOPATH/src/gx
workspace without conflicts).Another issue is that this scheme would not allow to import two packages with the same name and version but different hashes (in fact turning them into different pieces of data) but that seems like a reasonable constraint.
gx
already seems to have a global configuration,gx/gxutil/config.go
Lines 15 to 19 in a904dc7
and
gx-go
could be extended in a similar manner.The text was updated successfully, but these errors were encountered: