Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What was wrong?
#130
How was it fixed?
package.json
back, to specify the dependencies on gx.scripts/update-gomod.py
, which parses the dependency on gx, turns gx-hash to git commits, and updates them togo.mod
andgo.sum
usinggo get
.There are two modes in this script:
download
, andupdate
.download
: download and update all dependencies of the current repo according to the gx dependency filepackage.json
, to the path/tmp/gx-git-repos
.update
: parse the dependencies information described bypackage.json
with BFS and get the gx versions in the format in the below for each dependency. Then, search for the git commit or release version with the gx information, in the downloaded repos which are fetched in modedownload
. Last, use those git commit or release version, we can doGO111MODULE=on go get {repo}@{commit or version}
to update the versions togo.mod
Example
Current issues
go get
truly update the dependency togo.mod
or notpackage.json
) is not necessarily equaled to the one ingit tag
Reference
v2.7.3-gx-ipfs-Qmb3GBFCHMuzmi9EpH3pxpYBiviyc3tEPyDQHxZJQJSxj9
in gx-gomod whyrusleeping/gx#200 (comment)gx
version/hash with agit
hash whyrusleeping/gx#190Cute Animal Picture