whyrusleeping / gx

A package management tool
MIT License
1.88k stars 110 forks source link

Some terminology and basic concepts #188

Open schomatis opened 6 years ago

schomatis commented 6 years ago

To add to the README. I'll keep updating the questions (and hopefully answers too) as I read through the code. Any additions/corrections are more than welcome.

Terms:

Random topics:

Many topics actually belong to the gx-go repo but it would be hard in the first iteration to write to separate but complementary documents as the two repos are tightly couple together (in the sense that presenting an example using only the gx command doesn't seem so relevant).

schomatis commented 6 years ago

So, since many of the ongoing efforts in making gx/gx-go more user-friendly involve the use and modifications of paths I would like to arrive at a clear and homogeneous terminology. The tricky part is to keep in mind that Gx should be language agnostic and clearly reflect that in the documentation, which I'm not going to do at the moment, in my mental model gx and gx-go are very coupled.

The objective is to subdivide the normal path of an installed package into different components that would make sense when reasoning about the code:

$GOPATH/src/gx/ipfs/QmHash/go-merkledag
           ^  ^           ^
                        (maybe)

@Mr0grog I'm not sure how familiarized you are with the Gx package manager or its code, but any feedback you could add here (just from your experience and common sense) will be very valuable.

Stebalien commented 6 years ago

Note: We also rewrite the import paths in $GOPATH/gx/ipfs/... but not when checked into IPFS itself. Unfortunately, we need to do this because packages need to be able to refer to themselves.

schomatis commented 6 years ago

but not when checked into IPFS itself.

Not sure what "checked into" means in this context.

Stebalien commented 6 years ago

Not sure what "checked into" means in this context.

Sorry, I mean that they're not added to IPFS in the rewritten state. I like to point this out as cat $GOPATH/gx/ipfs/Qm.../my-pkg/thing.go won't return the same thing as ipfs cat /ipfs/Qm.../my-pkg/thing.go (which can be a bit confusing).