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

Improve error message for mismatch in worker send-receive pairing #41999

Conversation

lochana-chathura
Copy link
Member

@lochana-chathura lochana-chathura commented Jan 17, 2024

Purpose

$subject.

Fixes #41953

Approach

n/a

Samples

function sample() {
    worker w1 {
        20 -> w2; // ERROR [test.bal:(3:9,3:17)] invalid worker send, no matching worker receive
    }

    worker w2 {
    }

    worker w3 {
        int _ = <- w2; // ERROR [test.bal:(10:17,10:22)] invalid worker receive, no matching worker send
    }
}

Remarks

n/a

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

@lochana-chathura lochana-chathura added the Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. label Jan 17, 2024
Copy link

codecov bot commented Jan 17, 2024

Codecov Report

Attention: 56 lines in your changes are missing coverage. Please review.

Comparison is base (29ba176) 76.69% compared to head (adf365b) 76.69%.
Report is 4 commits behind head on worker_change.

Files Patch % Lines
...o/ballerina/compiler/syntax/tree/TreeModifier.java 0.00% 14 Missing ⚠️
.../compiler/internal/parser/tree/STTreeModifier.java 0.00% 9 Missing ⚠️
...iler/internal/parser/tree/STSingleReceiveNode.java 53.33% 7 Missing ⚠️
...iler/internal/parser/tree/STStreamReceiveNode.java 61.11% 7 Missing ⚠️
...a/compiler/internal/parser/tree/STNodeVisitor.java 0.00% 5 Missing ⚠️
...rina/compiler/internal/parser/BallerinaParser.java 91.17% 2 Missing and 1 partial ⚠️
...mpiler/internal/parser/tree/STNodeTransformer.java 0.00% 3 Missing ⚠️
...allerina/compiler/syntax/tree/NodeTransformer.java 0.00% 3 Missing ⚠️
...lerina/compiler/syntax/tree/StreamReceiveNode.java 91.42% 2 Missing and 1 partial ⚠️
...r/internal/parser/tree/STAlternateReceiveNode.java 50.00% 2 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                @@
##             worker_change   #41999    +/-   ##
=================================================
  Coverage            76.69%   76.69%            
- Complexity           52845    52907    +62     
=================================================
  Files                 2885     2889     +4     
  Lines               199403   199615   +212     
  Branches             25900    25912    +12     
=================================================
+ Hits                152926   153100   +174     
- Misses               38029    38064    +35     
- Partials              8448     8451     +3     

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

@lochana-chathura lochana-chathura merged commit 3f419d8 into ballerina-platform:worker_change Jan 17, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant