You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rustpkg needs to support invoking the default build logic in a package script #6401
In pkg.rs, there has to be a way to invoke the default build logic. Either provide a library function in librustpkg that does this, or make rustpkg automatically invoke it after executing the contents of pkg.rs (with a way to turn that off). I guess I prefer the first option, but don't care that much.
Thinking about this more, I think the first option is preferable if we keep the fn main() { ... } in pkg.rs.
In order to support both pre-build logic and post-build logic otherwise you'd need to either disallow post-build logic without supressing default behavior, or you could have three functions with default implementations: prebuild, build, and postbuild, where normally people are only overiding the first one.
Since keeping main is the easiest path forward and doesn't close any other paths in the future, option one seems to be the way to go.
Activity
metajack commentedon May 10, 2013
Thinking about this more, I think the first option is preferable if we keep the
fn main() { ... }in pkg.rs.In order to support both pre-build logic and post-build logic otherwise you'd need to either disallow post-build logic without supressing default behavior, or you could have three functions with default implementations:
prebuild,build, andpostbuild, where normally people are only overiding the first one.Since keeping
mainis the easiest path forward and doesn't close any other paths in the future, option one seems to be the way to go.catamorphism commentedon May 10, 2013
Agreed.
rustpkg: Begin allowing package scripts to call the default build logic
auto merge of #7403 : catamorphism/rust/package-scripts, r=brson
rustpkg: Begin allowing package scripts to call the default build logic
Auto merge of rust-lang#6401 - ebroto:pin_to_a_nightly, r=ebroto
Merge rust-lang#6401