-
Notifications
You must be signed in to change notification settings - Fork 3
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
Load configuration lazily #110
Conversation
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.
Could we solve this by loading the app config lazily and eliminate all the other crap?
I have worked on something like this (as side work). I work on it more to see if that implementation can fix the issue. |
7086b18
to
e9dde02
Compare
1127448
to
efa2865
Compare
In this commit, instead of having two config classes, we don't load configuration from file unless the command demand extended configuration.
This reverts commit e9dde02.
efa2865
to
b88f712
Compare
will be merged in #109 |
@justin808 We can update the #109 based on this branch. |
This PR enables us to specify commands that don't need complete configuration from config files. With this, not only can we run commands like
cpl version
,cpl --version
, andcpl --help
, we can add new commands likecpl generate
to create basic file structure and config templates in a project where no Control Plane configurations exist.The implementation is not ideal, but it is good enough to be shared and discussed.This PR prevents loading configurations from files unless a command requests an extended configuration. Commands with
WITH_MINIMAL_CONFIG
won't make such a request, which makes it possible to define commands that can run without configuration files. For example:cpl --version
cpl --help
cpl generate
(in future)Closes #93