-
Notifications
You must be signed in to change notification settings - Fork 64
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
refactor!: streamline package manager initialization #727
Conversation
f8d084f
to
a5f93a0
Compare
Create a singleton for the umbrella package manager and use it instead of global package-scoped maps. Use more dependency injection. Move the scattered init() calls to RegisterPackageManager into one place. Create a bootstrap package for handling flag/zip registration. Use the bootstrapping package in main(). Propagate errors up and report them if initialization fails. This should make things a bit more testable in the future. GitHub-Fixes: unikraft#425 Signed-off-by: Jakub Ciolek <jakub@ciolek.dev>
a5f93a0
to
b134feb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really wanted to get rid of most init
calls, this is really good 🙏
you might need to refactor some of the tools too, like the Be sure to check them out. |
Good point. It originally broke the github-action, but thankfully the CI caught it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! :)
Reviewed-by: Alexander Jung alex@unikraft.io
Approved-by: Alexander Jung alex@unikraft.io
make fmt
on your commit series before opening this PR;Description of changes
Create a singleton for the umbrella package manager and use it instead of global package-scoped maps. Use more dependency injection.
Move the scattered init() calls to RegisterPackageManager into one place. Create a bootstrap package for handling flag/zip registration.
Use the bootstrapping package in main(). Propagate errors up and report them if initialization fails.
This should make things a bit more testable in the future.
GitHub-Fixes: #425