Open schneems opened 4 months ago
Currently the values on BuildConfig are pub(crate) so I cannot access values that I've set:
BuildConfig
pub(crate)
pub struct BuildConfig { pub(crate) app_dir: PathBuf, pub(crate) cargo_profile: CargoProfile, pub(crate) target_triple: String, pub(crate) builder_name: String, pub(crate) buildpacks: Vec<BuildpackReference>, pub(crate) env: HashMap<String, String>, pub(crate) app_dir_preprocessor: Option<Rc<dyn Fn(PathBuf)>>, pub(crate) expected_pack_result: PackResult, }
I'm wanting to inspect the builder_name to write logic like https://github.com/heroku/buildpacks-python/blob/de378063c83e1eec6302e79f93f189162b5bbbbf/tests/mod.rs#L31-L38. I would prefer to pass in a BuildConfig to a specific function and return a BuildConfig (or mutate a passed in build config, either way). Currently I cannot do this, because that value is not readable.
builder_name
pub
get_*
While I'm looking at BuildConfig I think we should also make it Debug in addition to Clone
Debug
Clone
Currently the values on
BuildConfig
arepub(crate)
so I cannot access values that I've set:I'm wanting to inspect the
builder_name
to write logic like https://github.com/heroku/buildpacks-python/blob/de378063c83e1eec6302e79f93f189162b5bbbbf/tests/mod.rs#L31-L38. I would prefer to pass in a BuildConfig to a specific function and return a BuildConfig (or mutate a passed in build config, either way). Currently I cannot do this, because that value is not readable.Options
pub
get_*
associated functions to retrieve set valuesAdditional thoughts
While I'm looking at
BuildConfig
I think we should also make itDebug
in addition toClone