Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use dependency injection for Rainbow and PortFactories. #91

Open
schmerl opened this issue Feb 25, 2020 · 1 comment
Open

Use dependency injection for Rainbow and PortFactories. #91

schmerl opened this issue Feb 25, 2020 · 1 comment
Assignees

Comments

@schmerl
Copy link
Contributor

schmerl commented Feb 25, 2020

The idea is that this will make testing easier, because we can inject a test environment.

@schmerl schmerl self-assigned this Feb 25, 2020
@schmerl
Copy link
Contributor Author

schmerl commented Feb 25, 2020

There is a stab at this in feature/dependency_injection.

The Injection stuff isn't working because there is too much class loading going on. Injection can/should only happen once. Once it is done, when a class is loaded, the injection does not occur. So, for example, when the GUI is created below the injection of rainbow environment doesn't happen.

This will need a more comprehensive redesign of how classes are loaded that won't be backward
compatibile. One idea to achieve this is to have RCL generate a binding module for all the things
that need to be dynamically loaded, for example have a RainbowConfigModule that implements methods like:

bindModelsManager
bindAnalysis
bindGauges
...

That are generated by RCL and used in a new RainbowMaster (and Delegate and ConfigurationChecker).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant