-
Notifications
You must be signed in to change notification settings - Fork 759
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 desugar implementation for websocket auth #31045
Conversation
Codecov Report
@@ Coverage Diff @@
## master #31045 +/- ##
============================================
+ Coverage 70.37% 70.39% +0.02%
- Complexity 37832 37881 +49
============================================
Files 2846 2844 -2
Lines 155873 155996 +123
Branches 19475 19506 +31
============================================
+ Hits 109688 109813 +125
+ Misses 39795 39785 -10
- Partials 6390 6398 +8
Continue to review full report at Codecov.
|
} | ||
} | ||
|
||
boolean isValidPackage(List<BType> expressionTypes, String packageName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I this this should be something like isDefinedInStdLibPackage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Fixed with f29c2b1
result.var.symbol = resultSymbol; | ||
} | ||
|
||
void addWebSocketAuthDesugarFunctionInvocation(BLangFunction functionNode, SymbolEnv env) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like these 2 methods do the kind of same things, shall we try to extract common code into methods and re-use them in this 2 methods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree. Updated into a single method with f29c2b1.
return pkg.symbol; | ||
} | ||
} | ||
// This resolves the package symbol when the code is at a submodule of the module which have the service | ||
// definition. In that case there is no any import relevant to the particular service. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This resolves the package symbol when the code is at a submodule of the module which have the listener definition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated with f29c2b1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good to me
Purpose
$subject
Related to: #27894
Related to: ballerina-platform/ballerina-library#1405
Related to: ballerina-platform/ballerina-library#584
Check List