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

Provide code actions to fix the invalid access of mutable storage in an isolated function #42708

Merged
merged 5 commits into from May 17, 2024

Conversation

nipunayf
Copy link
Contributor

@nipunayf nipunayf commented May 8, 2024

Purpose

$title.

Fixes #42331

Approach

Modified the existing add isolated qualifier and make variable immutable code actions to fix the diagnostic invalid access of mutable storage in an 'isolated' function (BCE3943).

Samples

Make the variable immutable

Screen.Recording.2024-05-08.at.3.51.32.PM.mov

Make the variable isolated

Screen.Recording.2024-05-08.at.3.51.41.PM.mov

Check List

  • Read the Contributing Guide
  • Updated Change Log
  • Checked Tooling Support (#)
  • Added necessary tests
    • Unit Tests
    • Spec Conformance Tests
    • Integration Tests
    • Ballerina By Example Tests
  • Increased Test Coverage
  • Added necessary documentation
    • API documentation
    • Module documentation in Module.md files
    • Ballerina By Examples

@nipunayf nipunayf added the Team/LanguageServer Language Server Implementation related issues. #Compiler label May 8, 2024
@nipunayf nipunayf requested a review from mohanvive as a code owner May 8, 2024 10:22
Copy link

codecov bot commented May 17, 2024

Codecov Report

Attention: Patch coverage is 73.13433% with 18 lines in your changes are missing coverage. Please review.

Project coverage is 77.26%. Comparing base (d608958) to head (98b8c03).
Report is 9 commits behind head on master.

Files Patch % Lines
...tion/providers/AddIsolatedQualifierCodeAction.java 59.25% 4 Missing and 7 partials ⚠️
...ion/providers/MakeVariableImmutableCodeAction.java 82.50% 4 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #42708      +/-   ##
============================================
- Coverage     77.26%   77.26%   -0.01%     
- Complexity    51298    51303       +5     
============================================
  Files          2928     2929       +1     
  Lines        204391   204423      +32     
  Branches      26659    26668       +9     
============================================
+ Hits         157922   157939      +17     
- Misses        37887    37897      +10     
- Partials       8582     8587       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nipunayf nipunayf merged commit 24efc8e into ballerina-platform:master May 17, 2024
16 of 18 checks passed
@nipunayf nipunayf added this to the 2201.10.0 milestone May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team/LanguageServer Language Server Implementation related issues. #Compiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Improvement]: Provide code actions to fix invalid access of mutable storage
2 participants