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

fix: diagnostics not clearing for apex execute #2673

Merged
merged 1 commit into from
Oct 27, 2020

Conversation

brpowell
Copy link
Contributor

What does this PR do?

Fixes an issue where diagnostics would not clear after successfully executing anonymous apex.

What issues does this PR fix or reference?

#2608, @W-8272124@

@brpowell brpowell requested a review from a team as a code owner October 27, 2020 19:21
@@ -135,7 +135,7 @@ export class ApexLibraryExecuteExecutor extends LibraryCommandletExecutor<ApexEx
protected executionName = nls.localize('apex_execute_text');
protected logName = 'force_apex_execute_library';

private diagnostics = vscode.languages.createDiagnosticCollection(
public static diagnostics = vscode.languages.createDiagnosticCollection(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Creating new instances of the diagnostics collection was the problem.


handleApexLibraryDiagnostics(result, this.diagnostics, filePath);
}
handleApexLibraryDiagnostics(result, ApexLibraryExecuteExecutor.diagnostics, filePath);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This handles clearing the collection if needed.

Copy link
Contributor

@lcampos lcampos left a comment

Choose a reason for hiding this comment

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

:shipit:

@codecov
Copy link

codecov bot commented Oct 27, 2020

Codecov Report

Merging #2673 into release/v50.3.0 will increase coverage by 0.00%.
The diff coverage is 20.00%.

Impacted file tree graph

@@               Coverage Diff                @@
##           release/v50.3.0    #2673   +/-   ##
================================================
  Coverage            76.00%   76.00%           
================================================
  Files                  270      270           
  Lines                10172    10170    -2     
  Branches              1155     1154    -1     
================================================
- Hits                  7731     7730    -1     
+ Misses                2122     2120    -2     
- Partials               319      320    +1     
Impacted Files Coverage Δ
...rcedx-vscode-core/src/commands/forceApexExecute.ts 49.27% <20.00%> (+1.38%) ⬆️
...forcedx-vscode-core/src/channels/channelService.ts 81.81% <0.00%> (-2.28%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e7e57db...0430650. Read the comment docs.

@brpowell brpowell merged commit 7a66b1f into release/v50.3.0 Oct 27, 2020
@brpowell brpowell deleted the bp/apexDiagnosticsFix branch October 27, 2020 20:02
@brpowell brpowell restored the bp/apexDiagnosticsFix branch October 27, 2020 20:02
@brpowell brpowell mentioned this pull request Oct 27, 2020
@brpowell brpowell deleted the bp/apexDiagnosticsFix branch October 27, 2020 20:37
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.

None yet

3 participants