-
Notifications
You must be signed in to change notification settings - Fork 530
Reduce console noise #20153
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
base: main
Are you sure you want to change the base?
Reduce console noise #20153
Conversation
…s without the OE being active
PR Changes
|
…g to get root nodes on an empty list
} | ||
} | ||
|
||
public async initialize(): Promise<void> { |
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.
Should this be getting called in the constructor? Take a look at how connectionConfig.ts handles this:
public initialized: Deferred<void> = new Deferred<void>();
constructor() {
...
void initialize();
}
private async initialize(): Promise<void> {
//... perform async init tasks, then:
this.initialized.resolve();
}
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.
Should this be getting called in the constructor? Take a look at how connectionConfig.ts handles this:
public initialized: Deferred<void> = new Deferred<void>(); constructor() { ... void initialize(); } private async initialize(): Promise<void> { //... perform async init tasks, then: this.initialized.resolve(); }
that is a possibility, but wouldn't that affect plugin load time if the user has too many 'root nodes'?
Description
objectExplorerService methods that rely on nodes to be loaded were being called before the service state was initialized, this led to the errors, added logic to initialize the class state from main controller to avoid calling objectExplorerService methods on invalid state. Now it will load the root connections and nodes even if the Object Explorer from the UI hasn't been loaded.
Code Changes Checklist
npm run test
)Reviewers: Please read our reviewer guidelines