openfisca / openfisca-core

OpenFisca core engine. See other repositories for countries-specific code & data.
https://openfisca.org
GNU Affero General Public License v3.0
168 stars 75 forks source link

Possible bug in `clone` logic #1155

Open nikhilwoodruff opened 1 year ago

nikhilwoodruff commented 1 year ago

Sometimes when cloning a simulation, I've found that the original simulation is inexplicably affected by actions in the cloned simulation. I've seen this for a while but have been unable to generate a MWE, but yesterday I think I found the issue, in this line. When a group population is cloned, it looks like the clone still has access to the original members, which is unchanged.

bonjourmauko commented 1 year ago

Thanks @nikhilwoodruff .

@benjello at first I thought this was a duplicate of #848 , yet reading both issues, it appears like the behaviour described here is intended. Do you confirm?

benjello commented 1 year ago

I think the behaviour expected by @nikhilwoodruff should be enforced.