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

Follow-up cleanups after #728 #731

Merged
merged 1 commit into from
Nov 20, 2024
Merged

Conversation

HighCommander4
Copy link
Contributor

  • The disposables passed in to install.activate() were not saved for cleanup
  • config.get() is not async

@HighCommander4
Copy link
Contributor Author

@thegecko or @JVApen perhaps you could have a brief look at this? (once again, I can't actually add you to "Reviewers")

@JVApen
Copy link
Contributor

JVApen commented Nov 19, 2024

@HighCommander4 Can you keep the arguments as constructor parameter, see also my PR. Beside that, it looks good to me. I am however no expert in Javascript/Typescript

@HighCommander4
Copy link
Contributor Author

@HighCommander4 Can you keep the arguments as constructor parameter, see also my PR.

Not sure why being a constructor parameter helps; you can always make it a local variable in the constructor.

@JVApen
Copy link
Contributor

JVApen commented Nov 19, 2024

@HighCommander4 Can you keep the arguments as constructor parameter, see also my PR.

Not sure why being a constructor parameter helps; you can always make it a local variable in the constructor.

It feels more consistent to have all config arguments being provided via the constructor. Alternatively, I retrieve both arguments that I need in the constructor itself.

Up to you to decide.

@HighCommander4
Copy link
Contributor Author

Alternatively, I retrieve both arguments that I need in the constructor itself.

Yeah, that's the direction this patch is trying to move towards: make all config.get calls in the constructor itself.

The only thing remaining outside the constructor is the install.activate call which cannot be moved into the constructor because it's async, and you can't use await in a constructor.

 - The disposables passed in to install.activate() were not saved for
   cleanup
 - config.get() is not async
@HighCommander4
Copy link
Contributor Author

Rebased on top of #730, which took care of the second part (not await-ing config.get).

@HighCommander4 HighCommander4 merged commit 49ec805 into clangd:master Nov 20, 2024
1 check passed
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