Closed oconnor663 closed 1 month ago
It also seems like it's pretty easy to write more bugs like this, since anytime a feature is added to
Build
we need to remember to come to these lines and think about whether it should be inherited. I'm not sure how to make that better though. Thoughts?
Is there some way to do a self.clone()
instead of Build::new()
, so all the fields are inherited and only the fields that deviate need to be explicitly changed?
Is there some way to do a self.clone() instead of Build::new(), so all the fields are inherited and only the fields that deviate need to be explicitly changed?
That will end up with too many configurations inherited, better start afresh and assign what's needed.
When I add a Cargo override to the example from #1147:
Then the extra
rerun-if-env-changed
directives go away (except for one that's maybe a separate small bug):I'm not sure how to add a unit test for this, since it doesn't look like
emit_rerun_if_env_changed
is currently tested.It also seems like it's pretty easy to write more bugs like this, since anytime a feature is added to
Build
we need to remember to come to these lines and think about whether it should be inherited. I'm not sure how to make that better though. Thoughts?