-
Notifications
You must be signed in to change notification settings - Fork 219
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
[planners] Separate shell plan from build plan #227
Changes from 1 commit
409065e
6eed85a
f96e05f
dc01aa2
ba4a3b7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,9 +33,22 @@ func (p *Planner) IsRelevant(srcDir string) bool { | |
} | ||
|
||
func (p *Planner) GetShellPlan(srcDir string) *plansdk.ShellPlan { | ||
return &plansdk.ShellPlan{ | ||
plan := &plansdk.ShellPlan{ | ||
NixOverlays: []string{RustOxalicaOverlay}, | ||
} | ||
manifest, err := p.cargoManifest(srcDir) | ||
if err != nil { | ||
return plan | ||
} | ||
rustVersion, err := p.rustOxalicaVersion(manifest) | ||
if err != nil { | ||
return plan | ||
} | ||
|
||
rustPkgDev := fmt.Sprintf("rust-bin.stable.%s.default", rustVersion) | ||
plan.DevPackages = []string{rustPkgDev, "gcc"} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A style nit is that its easier to track what fields are filled in the ShellPlan struct if we construct it at the end, as in:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need to return the nix overlay on error cases, which is why this is formatted this way. Thoughts? |
||
|
||
return plan | ||
} | ||
|
||
func (p *Planner) GetBuildPlan(srcDir string) *plansdk.BuildPlan { | ||
|
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.
is a user able to specify the definitions they want to use, if the default-planner one is not correct for them?
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.
No, not right now. Though, this is not a regression because we have that problem before.