Each trigger has data that is sourced from a combination of the triggering source and default data. While working on an update to the AuraTrigger code I found some consistency issues in how these interact. When Trigger:SetData(data) is called, Trigger assumes ownership of the passed table and modifies it with the contents of defaultData. It then sets the Trigger data to this newly passed and modified table.
This is potentially an issue for multiple auras triggering the same trigger, unless we make lots of shallow copies of the data tables. Consider the following scenario:
aura with instance id 1 gets added to the trigger and it activates. The trigger data is set to this instance's data table but it's also modified with the default data
aura with instance id 2 gets added to the trigger and takes precedence according to some ordering, this trigger's data table is now passed to Trigger:SetData and also modified
Maybe it's not a real issue, but it feels odd to modify the data source tables this way. Something to think about.
Each trigger has data that is sourced from a combination of the triggering source and default data. While working on an update to the AuraTrigger code I found some consistency issues in how these interact. When Trigger:SetData(data) is called, Trigger assumes ownership of the passed table and modifies it with the contents of defaultData. It then sets the Trigger data to this newly passed and modified table.
This is potentially an issue for multiple auras triggering the same trigger, unless we make lots of shallow copies of the data tables. Consider the following scenario:
- aura with instance id 1 gets added to the trigger and it activates. The trigger data is set to this instance's data table but it's also modified with the default data
- aura with instance id 2 gets added to the trigger and takes precedence according to some ordering, this trigger's data table is now passed to Trigger:SetData and also modified
Maybe it's not a real issue, but it feels odd to modify the data source tables this way. Something to think about.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Each trigger has data that is sourced from a combination of the triggering source and default data. While working on an update to the AuraTrigger code I found some consistency issues in how these interact. When Trigger:SetData(data) is called, Trigger assumes ownership of the passed table and modifies it with the contents of defaultData. It then sets the Trigger data to this newly passed and modified table.
This is potentially an issue for multiple auras triggering the same trigger, unless we make lots of shallow copies of the data tables. Consider the following scenario:
Maybe it's not a real issue, but it feels odd to modify the data source tables this way. Something to think about.