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

Read and react to O# option changes only when devkit isnt installed #5895

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

arunchndr
Copy link
Member

Address #5774

@arunchndr arunchndr requested a review from a team as a code owner July 6, 2023 00:35
@arunchndr arunchndr changed the title Read and react to omnisharp option changes only when devkit is not in… Read and react to omnisharp option changes only when devkit isnt installed Jul 6, 2023
@arunchndr arunchndr changed the title Read and react to omnisharp option changes only when devkit isnt installed Read and react to O# option changes only when devkit isnt installed Jul 6, 2023
src/main.ts Outdated Show resolved Hide resolved

export default function createOptionStream(vscode: vscode): Observable<Options> {
return Observable.create((observer: Observer<Options>) => {
const disposable = vscode.workspace.onDidChangeConfiguration((e) => {
//if the omnisharp or csharp configuration are affected only then read the options
if (
e.affectsConfiguration('dotnet') ||
e.affectsConfiguration('omnisharp') ||
(e.affectsConfiguration('omnisharp') && !vscode.extensions.getExtension(csharpDevkitExtensionId)) ||
Copy link
Member

Choose a reason for hiding this comment

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

Should this logic instead move to somewhere like

public static shouldOmnisharpOptionChangeTriggerReload(oldOptions: Options, newOptions: Options): boolean {

It'll probably work either way, but I'm somewhat surprised already that the Omnisharp option isn't being ignored by that.

Copy link
Member

@jasonmalinowski jasonmalinowski left a comment

Choose a reason for hiding this comment

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

This will work, although I'm surprised it doesn't already given the other code that's doing similar filtering.

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.

4 participants