Closed TomWeaver18 closed 5 years ago
looks as though something freak has happened with my branch here... the history seems to be totally messed up. Please hold off reviewing/commenting until I get this fixed.
thanks Tom W
EDIT ( FIXED NOW )
History is correct now.
As removal of DexWatch has gone in, this stuff is now broken... so am re-working this patch... again.
Patch is now merged with master, conflict resolved and bug* free.
I agree, but I'd rather leave the implementation of such features for future work. DexLabels are in, the infrastructure for using them is in, it just requires command implementations to specify how they use them.
Specify a DexLabel('myLabel') on any line of a test and you can now reference said label within a DexExpectWatchValue('myVar', '1', '2', on_line='myLabel').
In order to preserve label values resolved at the point of parsing a command, the way in which we pass DexCommands around DExTer has needed to be re-jigged a little.
The original implementation would store a CommandIR with LocIR for each command, an abstraction of the raw text and the location information for each command. The raw text part was evaled throughout DExTer for different purposes, mainly in the run_internal_debugger tool and heuristic.
This is now no longer the case. DexCommands are now stored as objects and are passed around as such. The only exception being within the run_internal_debugger tool which loads them from previously pickled data.
As a result there are several changes in this patch that are there to support the use of command objects rather than CommandIR, which has now been removed from DExTer.