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

Report errors in configs, and load configs from anywhere #7650

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

rrousselGit
Copy link
Contributor

Description

Scenarios Tested

Sample Commands

@hlshen hlshen self-requested a review September 17, 2024 15:23
@rrousselGit rrousselGit deleted the validate-configs-open-folder branch September 25, 2024 14:37
@rrousselGit rrousselGit restored the validate-configs-open-folder branch September 25, 2024 14:46
@rrousselGit rrousselGit reopened this Sep 25, 2024
@rrousselGit rrousselGit changed the title Onboarding stuff Report errors in configs, and load configs from anywhere Sep 25, 2024
firebase-vscode/src/core/config.ts Outdated Show resolved Hide resolved
error: err,
range: new vscode.Range(0, 0, 0, 0),
};
},
);

cancel =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not following the purpose of the cancel. Is this on shutdown?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shutdown or when the function runs again.
We don't want to keep adding new listeners again and again.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switch to using effect cleanup like in another part of the code

return this.switchCase<Promise<Result<NewT>>>(
(value) => cb(value),
async (error) => new ResultError(error)
followAsync<NewT, ErrorT>(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you leave some comments explaining the purpose of follow and followAsync?

I may be unfamiliar with "follow" terminology, but it seems more like a callback executor w/ error resolver?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some docs

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please clean up console.logs.

Please assign effects/subscriptions to named variables (serving as descriptors), and push them to context.subscriptions altogether.

Please name disposables as e.g. "watcherDisposable" when appropriate.

Thanks!

firebase-vscode/src/core/config.ts Show resolved Hide resolved
firebase-vscode/src/core/config.ts Outdated Show resolved Hide resolved
firebase-vscode/src/core/config.ts Show resolved Hide resolved
@rrousselGit
Copy link
Contributor Author

I think I've addressed everything :)

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

Successfully merging this pull request may close these issues.

2 participants