arguably icon indicating copy to clipboard operation
arguably copied to clipboard

Graceful global state

Open treykeown opened this issue 1 year ago • 0 comments

Currently, arguably is designed to only be run once. It might be useful to allow global state to persist. Doing so would require examining all the state in _context.Context and figuring out a path to either automatically reset values (as with the ones that are only used for .run()), or making a path allowing for items (functions, types, etc) to be re-added.

Allowing item to be re-added can cause a number of problems, as the item might have the same ID, but have its values be mutated. Additionally, when adding the same item, it can be added with different options (for example, a different alias).

More work will be needed to determine what issues could be caused by this. An alternative path would be to make arguably._context.context.reset() a part of the supported API, exposing it through arguably.reset().

See #19

treykeown avatar Jun 29 '23 08:06 treykeown