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

Loaders should use IoC instead of being constructed w source #679

Closed
eeverman opened this issue Nov 1, 2021 · 2 comments
Closed

Loaders should use IoC instead of being constructed w source #679

eeverman opened this issue Nov 1, 2021 · 2 comments
Assignees
Milestone

Comments

@eeverman
Copy link
Owner

eeverman commented Nov 1, 2021

The current implementation requires special treatment of standard loaders and makes it difficult to have only a single non Std loader. With IoC all loaders can be added by instance.

@eeverman eeverman added this to the Next Next Major milestone Nov 1, 2021
@eeverman eeverman modified the milestones: Next Next Major, 0.5.0 Nov 23, 2021
@eeverman eeverman self-assigned this Nov 23, 2021
@eeverman
Copy link
Owner Author

The context for this might be called RuntimeLoadEnvironment to represent the state of the environment from the perspective of the loaders. This would include the following:

  • Env Vars
  • Sys Props
  • Main Args
  • Fixed Values

The 1st three are canonical runtime environment, the last is part of the effective environment from the perspective of the Loaders.

The RuntimeLoadEnvironment would be passed to Loader.load(). Not all will need it, but its possible loaders other than the StdLoaders will need it - Perhaps a custom loader knows how to translate Env Vars in a way that the Std. one does not.

Along with this, all other configuration methods of loaders should probably move to the constructor. This will keep the logic short for constructing Loaders in the config so that hopefully it does not require individual methods to construct each one.

@eeverman
Copy link
Owner Author

Fixed by #708

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