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

[Query Expression]Restrict result type being resolved as map without the query-construct-type #41117

Merged
merged 20 commits into from
Aug 18, 2023

Conversation

pcnfernando
Copy link
Member

@pcnfernando pcnfernando commented Jul 28, 2023

Purpose

Describe the problems, issues, or needs driving this feature/fix and include links to related issues.

Fixes #37450
Fixes #37670
Fixes #41129
Fixes #37256

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 Jul 31, 2023

Codecov Report

Patch coverage: 94.66% and project coverage change: +0.01% 🎉

Comparison is base (e87e53d) 76.35% compared to head (4416569) 76.36%.
Report is 60 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #41117      +/-   ##
============================================
+ Coverage     76.35%   76.36%   +0.01%     
- Complexity    52258    52305      +47     
============================================
  Files          2865     2866       +1     
  Lines        197494   197626     +132     
  Branches      25656    25683      +27     
============================================
+ Hits         150791   150916     +125     
- Misses        38398    38403       +5     
- Partials       8305     8307       +2     
Files Changed Coverage Δ
.../compiler/semantics/analyzer/DataflowAnalyzer.java 89.87% <50.00%> (-0.08%) ⬇️
...nalang/formatter/core/ImportFormattingOptions.java 85.00% <85.00%> (ø)
...alang/compiler/semantics/analyzer/TypeChecker.java 92.20% <92.30%> (-0.01%) ⬇️
.../compiler/semantics/analyzer/QueryTypeChecker.java 88.82% <94.91%> (+0.77%) ⬆️
...ballerina/runtime/internal/values/StreamValue.java 53.33% <100.00%> (ø)
...erinalang/util/diagnostic/DiagnosticErrorCode.java 99.83% <100.00%> (+<0.01%) ⬆️
...g/ballerinalang/formatter/core/FormatterUtils.java 92.59% <100.00%> (+2.59%) ⬆️
...allerinalang/formatter/core/FormattingOptions.java 50.81% <100.00%> (+4.39%) ⬆️
...inalang/formatter/core/FormattingTreeModifier.java 96.10% <100.00%> (+0.13%) ⬆️

... and 7 files with indirect coverage changes

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

@pcnfernando
Copy link
Member Author

Keeping PR as draft until ballerina-platform/ballerina-spec#1252 is finalized

@KavinduZoysa KavinduZoysa requested a review from malinthar August 15, 2023 04:27
…/compiler/semantics/analyzer/QueryTypeChecker.java

Co-authored-by: KavinduZoysa <[email protected]>
Copy link
Contributor

@NipunaRanasinghe NipunaRanasinghe left a comment

Choose a reason for hiding this comment

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

Debugger changes LGTM

Copy link
Contributor

@malinthar malinthar left a comment

Choose a reason for hiding this comment

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

Can we add a LS code action test case for the following as well

public function main() {
    xml x1 = xml `<book>The Lost World</book>`;
    from xml element in x1 select element.toBalString();
}

@pcnfernando
Copy link
Member Author

Can we add a LS code action test case for the following as well

public function main() {
    xml x1 = xml `<book>The Lost World</book>`;
    from xml element in x1 select element.toBalString();
}

Inferring would result in an error for this specific scenario. Therefore, no code action. Can you point me to a such a codeaction test I can refer

@malinthar
Copy link
Contributor

Can we add a LS code action test case for the following as well

public function main() {
    xml x1 = xml `<book>The Lost World</book>`;
    from xml element in x1 select element.toBalString();
}

Inferring would result in an error for this specific scenario. Therefore, no code action. Can you point me to a such a codeaction test I can refer

+1. We can add a negative test case in that case

malinthar
malinthar previously approved these changes Aug 15, 2023
…ina-lang into issue_37670

# Conflicts:
#	compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/QueryTypeChecker.java
#	compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/TypeChecker.java
…ina-lang into issue_37670

# Conflicts:
#	compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/QueryTypeChecker.java
@pcnfernando pcnfernando merged commit e6f3165 into ballerina-platform:master Aug 18, 2023
@rdulmina rdulmina added this to the 2201.8.0 milestone Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants