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

Implement logging warnings for deprecated param usages in funcion call and fix inconsistent behaviour in warnings in deprecated record fields #40545

Conversation

dulajdilshan
Copy link
Contributor

@dulajdilshan dulajdilshan commented May 31, 2023

Purpose

$title

Fixes #40363
Fixes #40902

Approach

Describe how you are implementing the solutions along with the design details.

Samples

Provide high-level details about the samples related to this feature.

Remarks

List any other known issues, related PRs, TODO items, or any other notes related to the PR.

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

@codecov
Copy link

codecov bot commented May 31, 2023

Codecov Report

Patch coverage: 96.71% and no project coverage change.

Comparison is base (cad922a) 76.43% compared to head (3f153e0) 76.44%.
Report is 32 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##             master   #40545    +/-   ##
==========================================
  Coverage     76.43%   76.44%            
- Complexity    52123    52155    +32     
==========================================
  Files          2856     2856            
  Lines        195903   196005   +102     
  Branches      25393    25418    +25     
==========================================
+ Hits         149747   149839    +92     
- Misses        37858    37862     +4     
- Partials       8298     8304     +6     
Files Changed Coverage Δ
...llerinalang/compiler/util/ImmutableTypeCloner.java 88.44% <ø> (ø)
...llerinalang/compiler/semantics/analyzer/Types.java 81.76% <50.00%> (ø)
...and/visitors/FunctionCallExpressionTypeFinder.java 78.84% <85.71%> (+0.07%) ⬆️
...lang/compiler/semantics/analyzer/CodeAnalyzer.java 87.92% <98.82%> (+0.34%) ⬆️
...g/wso2/ballerinalang/compiler/desugar/Desugar.java 90.31% <100.00%> (ø)
...allerinalang/compiler/parser/BLangNodeBuilder.java 94.42% <100.00%> (ø)
...mpiler/semantics/analyzer/ConstantTypeChecker.java 67.40% <100.00%> (ø)
...rinalang/compiler/semantics/model/SymbolTable.java 96.40% <100.00%> (-0.15%) ⬇️
...ang/langserver/CentralPackageDescriptorLoader.java 80.82% <100.00%> (ø)
...lerinalang/langserver/common/utils/SymbolUtil.java 61.59% <100.00%> (ø)
... and 2 more

... and 3 files with indirect coverage changes

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

@dulajdilshan dulajdilshan added the Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. label Jun 6, 2023
@dulajdilshan dulajdilshan added this to the 2201.7.0 milestone Jun 6, 2023
@KavinduZoysa KavinduZoysa reopened this Jun 13, 2023
@MaryamZi MaryamZi removed this from the 2201.7.0 milestone Jun 15, 2023
Copy link
Member

@MaryamZi MaryamZi left a comment

Choose a reason for hiding this comment

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

The original case is not addressed? Passing an argument corresponding to an included record parameter?

#40363 (comment)

@dulajdilshan dulajdilshan changed the title Fix inconsistent behaviour in deprecated warning in deprecated record fields Implement logging warnings for deprecated param usages in funcion call and fix inconsistent behaviour in warnings in deprecated record fields Jul 17, 2023
@dulajdilshan dulajdilshan force-pushed the fix/deprecate-record-field-40363 branch from 94071a8 to 3f9d8bb Compare July 26, 2023 08:32
Extract symbol's null check within the report-deprecated method
@dulajdilshan dulajdilshan force-pushed the fix/deprecate-record-field-40363 branch from bb6b910 to 4eda95c Compare July 26, 2023 09:29
@dulajdilshan dulajdilshan added this to the 2201.8.0 milestone Aug 9, 2023
@MaryamZi
Copy link
Member

No warning for

type Rec record {|
    int a;
    int b;
|};

function fn(@deprecated *Rec r) {

}

public function main() {
    fn(a = 1, b = 2);
}

@MaryamZi
Copy link
Member

No warning for

type Rec record {|
    int a;
    int b;
|};

function fn(@deprecated *Rec r) {

}

public function main() {
    fn(a = 1, b = 2);
}

Can you provide an estimate for long it will take to fix this? If it seems like it may take long, let's fix it separately.

@dulajdilshan
Copy link
Contributor Author

dulajdilshan commented Aug 14, 2023

Can you provide an estimate for long it will take to fix this? If it seems like it may take long, let's fix it separately.

Created a new issue: #41204.
Estimated points = 2 points max (Implementing: 1 and addressing-reviews: 1)

@dulajdilshan dulajdilshan merged commit 567e622 into ballerina-platform:master Aug 14, 2023
17 checks passed
@dulajdilshan dulajdilshan deleted the fix/deprecate-record-field-40363 branch August 14, 2023 07:15
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
3 participants