Skip to content

Reuse copies unnecessary data

To reproduce the issue, here a simple session:

$ texts session
Input > a = 1
Input > b = a - 1 
Input > %uuid
uuids: 9a274845dbae4a2db3f7d6454efc272a ('9a274845dbae4a2db3f7d6454efc272a')
Input > %new
Started new session with uuids ('9cc8f6819b8a4d18975b074e51b13da4')
Input > my_a = a@9a274845dbae4a2db3f7d6454efc272a
Input > %hist
WAITING    2024-07-07T09:02:05+02:00 a = 1
WAITING    2024-07-07T09:02:05+02:00 my_a = a
WAITING    2024-07-07T09:02:05+02:00 b = a - 1

The variable b should not be copied into the target model but only a and its ancestors.

Another issue is a non-existing name conflict

Input > %uuid
uuids: 9cc8f6819b8a4d18975b074e51b13da4 ('9cc8f6819b8a4d18975b074e51b13da4')
Input > f = 3
Input > %uuid 9a274845dbae4a2db3f7d6454efc272a
uuids: 9a274845dbae4a2db3f7d6454efc272a ('9a274845dbae4a2db3f7d6454efc272a')
Input > %hist
WAITING    2024-07-07T09:01:40+02:00 a = 1
WAITING    2024-07-07T09:01:43+02:00 b = a - 1
Input > my_f = f@9cc8f6819b8a4d18975b074e51b13da4
Reuse error: name conflicts between source and target models: {'a', 'b'}

There should be no name conflict because f does not depend on a and b.

The second issue seems to be related because it may be due to incorrect dependencies resolving.

Edited by Ivan Kondov