Skip to content
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

feat(go): Run go get on incomplete builds #2

Merged
merged 1 commit into from
Jan 24, 2018
Merged

Conversation

elldritch
Copy link
Member

Resolves #1.

@elldritch elldritch requested a review from xizhao January 24, 2018 10:28
build/golang.go Outdated
if err != nil {
if opts["install"].(bool) {
log.Logger.Debug("Could not resolve some dependencies. Attempting to run build...")
exec.Command("go", "get", opts["entry-point"].(string)).Output()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use m.Manifest over opts["entry-point"]. The build command parses the opt and sets the module's manifest with it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

build/golang.go Outdated
if err != nil {
if opts["install"].(bool) {
log.Logger.Debug("Could not resolve some dependencies. Attempting to run build...")
exec.Command("go", "get", opts["entry-point"].(string)).Output()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exec.Command returns an error that we could handle. If this command fails, we could exit before calling resolveManifest again -- up to you.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

build/golang.go Outdated
}

m.Build.RawDependencies = deps
m.Build.RawDependencies = resolvedDeps
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could call Dedupe() on this before returning

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@xizhao xizhao merged commit df2d7d8 into master Jan 24, 2018
@elldritch elldritch deleted the feat/1-go-get branch March 1, 2018 20:17
meghfossa pushed a commit that referenced this pull request Nov 12, 2021
meghfossa added a commit that referenced this pull request Mar 17, 2022
meghfossa added a commit that referenced this pull request Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants