-
Notifications
You must be signed in to change notification settings - Fork 28
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
Basic lockfile support #49
Conversation
main.go
Outdated
@@ -783,6 +822,43 @@ var DevCopyCommand = cli.Command{ | |||
}, | |||
} | |||
|
|||
func genLockDeps(pkg *Package, deps map[string]gx.LockDep, done map[string]bool, ignoreConflict bool) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we use the DependencyQueue
here? (I'm not sure, since it belongs to the gx
repo).
Ideally I would like to have a function that just returns all the (unique) dependencies of a package. From what I'm seeing in the gx/gx-go code bases we're doing a lot of "get me all your direct and transitive dependencies" (converting Dependency
to Package
) types of operation.
return err | ||
} | ||
|
||
ref := fmt.Sprintf("/ipfs/%s/%s", dep.Hash, dep.Name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be (along with the gx.LockDep{
line) the actual core of the function where we are transforming a Dependency
to a LockDep
/Ref
, could we add a comment to highlight this? (And even better, make it into a function.)
This is basic support for a lock-file concept discussed between @Stebalien and @whyrusleeping this week.
See also: whyrusleeping/gx#206