The Puppet Editor Services - The PuppetHelper, queues and providers. have organically grown and are now a gnarled mess. Time to pay down some of the tech debt.
Refactor the from message-handler up in the stack.
[x] Create session_state style class and attach it to the message_handler
[x] Move sessions specific stuff into session_state
[x] Refactor for new DocumentStore
[x] Create a duck-type module for the new class
[x] Make tests and rubocop pass
[x] Finish refactoring EVERYTHING and get rid of the ducktype module
[x] Refactor the PuppetHelper into the session_state where applicable
[x] move loaders and xxxx_loaded? methods to session_state
[x] Get rid of connection_id module variable
[x] Get rid of cache module variable
[x] ducktype?
[x] Refactor object_cache
[x] This is done as part of the PuppetHelper refactor
[x] Refactor queues from modules to class
[x] Single Instance queue
[x] Validation
[x] Sidecar
[x] Migrate single instance tests from validation/sidecar to single_instance_queue
[x] decouple object hierarchy in client_state
Ideally we shouldn't need known object hierachies and should uses events/delegates
e.g. don't do @connection_id = message_handler.protocol.connection.id
At this point the refactor is done but nothing has been improved
[x] What improvements to make?
[x] Make the documents a 1st class object, not a hash. Means we can cache AST and token lexing.
Later PRs will add the caching etc. This PR only makes it possible to add those features.
[x] ~Add End-to-End integration test (like the debug server) to smoke test the entire system.~ Seperate PR
Fixes #209
The Puppet Editor Services - The PuppetHelper, queues and providers. have organically grown and are now a gnarled mess. Time to pay down some of the tech debt.
Refactor the from message-handler up in the stack.
[x] Create session_state style class and attach it to the message_handler
[x] Move sessions specific stuff into session_state
[x] Refactor for new DocumentStore
[x] Refactor the PuppetHelper into the session_state where applicable
xxxx_loaded?
methods to session_state[x] Refactor object_cache
[x] Refactor queues from modules to class
[x] decouple object hierarchy in client_state Ideally we shouldn't need known object hierachies and should uses events/delegates e.g. don't do
@connection_id = message_handler.protocol.connection.id
At this point the refactor is done but nothing has been improved