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

Sync master branch with update4 branch #734

Merged
merged 12 commits into from
Dec 2, 2022
Merged
12 changes: 6 additions & 6 deletions ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
[package]
org = "ballerinax"
name = "mysql"
version = "1.6.1"
version = "1.7.0"
authors = ["Ballerina"]
keywords = ["database", "client", "network", "SQL", "RDBMS", "MySQL"]
repository = "https://github.com/ballerina-platform/module-ballerinax-mysql"
icon = "icon.png"
license = ["Apache-2.0"]
distribution = "2201.3.0"
distribution = "2201.4.0"

[[platform.java11.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "mysql-native"
version = "1.6.1"
path = "../native/build/libs/mysql-native-1.6.1.jar"
version = "1.7.0"
path = "../native/build/libs/mysql-native-1.7.0-SNAPSHOT.jar"

[[platform.java11.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "sql-native"
version = "1.6.0"
path = "./lib/sql-native-1.6.0.jar"
version = "1.7.0"
path = "./lib/sql-native-1.7.0-20221104-172000-addd057.jar"
2 changes: 1 addition & 1 deletion ballerina/CompilerPlugin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ id = "mysql-compiler-plugin"
class = "io.ballerina.stdlib.mysql.compiler.MySQLCompilerPlugin"

[[dependency]]
path = "../compiler-plugin/build/libs/mysql-compiler-plugin-1.6.1.jar"
path = "../compiler-plugin/build/libs/mysql-compiler-plugin-1.7.0-SNAPSHOT.jar"
4 changes: 2 additions & 2 deletions ballerina/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "sql"
version = "1.6.0"
version = "1.7.0"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
Expand Down Expand Up @@ -391,7 +391,7 @@ modules = [
[[package]]
org = "ballerinax"
name = "mysql"
version = "1.6.1"
version = "1.7.0"
dependencies = [
{org = "ballerina", name = "crypto"},
{org = "ballerina", name = "file"},
Expand Down
2 changes: 1 addition & 1 deletion build-config/resources/Ballerina.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ keywords = ["database", "client", "network", "SQL", "RDBMS", "MySQL"]
repository = "https://github.com/ballerina-platform/module-ballerinax-mysql"
icon = "icon.png"
license = ["Apache-2.0"]
distribution = "2201.3.0"
distribution = "2201.4.0"

[[platform.java11.dependency]]
groupId = "io.ballerina.stdlib"
Expand Down
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

### Changed
- [Remove SQL_901 diagnostic hint](https://github.com/ballerina-platform/ballerina-standard-library/issues/3609)

## [1.6.1] - 2022-12-91

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import io.ballerina.projects.environment.Environment;
import io.ballerina.projects.environment.EnvironmentBuilder;
import io.ballerina.tools.diagnostics.Diagnostic;
import io.ballerina.tools.diagnostics.DiagnosticInfo;
import io.ballerina.tools.diagnostics.DiagnosticSeverity;
import org.testng.Assert;
import org.testng.annotations.Test;
Expand Down Expand Up @@ -59,34 +58,6 @@ private Package loadPackage(String path) {
return project.currentPackage();
}

@Test
public void testFunctionHints() {
Package currentPackage = loadPackage("sample1");
PackageCompilation compilation = currentPackage.getCompilation();
DiagnosticResult diagnosticResult = compilation.diagnosticResult();
long availableErrors = diagnosticResult.diagnostics().stream()
.filter(r -> r.diagnosticInfo().severity().equals(DiagnosticSeverity.ERROR)).count();
Assert.assertEquals(availableErrors, 3);

List<Diagnostic> diagnosticHints = diagnosticResult.diagnostics().stream()
.filter(r -> r.diagnosticInfo().severity().equals(DiagnosticSeverity.HINT))
.collect(Collectors.toList());
long availableHints = diagnosticHints.size();
Assert.assertEquals(availableHints, 3);

DiagnosticInfo hint1 = diagnosticHints.get(0).diagnosticInfo();
Assert.assertEquals(hint1.code(), MySQLDiagnosticsCode.MYSQL_901.getCode());
Assert.assertEquals(hint1.messageFormat(), MySQLDiagnosticsCode.MYSQL_901.getMessage());

DiagnosticInfo hint2 = diagnosticHints.get(1).diagnosticInfo();
Assert.assertEquals(hint2.code(), MySQLDiagnosticsCode.MYSQL_902.getCode());
Assert.assertEquals(hint2.messageFormat(), MySQLDiagnosticsCode.MYSQL_902.getMessage());

DiagnosticInfo hint3 = diagnosticHints.get(2).diagnosticInfo();
Assert.assertEquals(hint3.code(), MySQLDiagnosticsCode.MYSQL_901.getCode());
Assert.assertEquals(hint3.messageFormat(), MySQLDiagnosticsCode.MYSQL_901.getMessage());
}

@Test
public void testSQLConnectionPoolFieldsInNewExpression() {
Package currentPackage = loadPackage("sample2");
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import io.ballerina.projects.plugins.CodeAnalyzer;
import io.ballerina.stdlib.mysql.compiler.analyzer.InitializerParamAnalyzer;
import io.ballerina.stdlib.mysql.compiler.analyzer.RecordAnalyzer;
import io.ballerina.stdlib.mysql.compiler.analyzer.RemoteMethodAnalyzer;

import java.util.List;

Expand All @@ -34,7 +33,6 @@ public class MySQLCodeAnalyzer extends CodeAnalyzer {

@Override
public void init(CodeAnalysisContext ctx) {
ctx.addSyntaxNodeAnalysisTask(new RemoteMethodAnalyzer(), SyntaxKind.REMOTE_METHOD_CALL_ACTION);
ctx.addSyntaxNodeAnalysisTask(new InitializerParamAnalyzer(),
List.of(SyntaxKind.IMPLICIT_NEW_EXPRESSION, SyntaxKind.EXPLICIT_NEW_EXPRESSION));
ctx.addSyntaxNodeAnalysisTask(new RecordAnalyzer(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import io.ballerina.tools.diagnostics.DiagnosticSeverity;

import static io.ballerina.tools.diagnostics.DiagnosticSeverity.ERROR;
import static io.ballerina.tools.diagnostics.DiagnosticSeverity.HINT;

/**
* Enum class to hold MySQL module diagnostic codes.
Expand All @@ -33,10 +32,7 @@ public enum MySQLDiagnosticsCode {
SQL_102("SQL_102", "invalid value: expected value is greater than zero", ERROR),
SQL_103("SQL_103", "invalid value: expected value is greater than or equal to 30", ERROR),

MYSQL_101("MYSQL_101", "invalid value: expected value is greater than or equal to zero", ERROR),

MYSQL_901("MYSQL_901", "parameter 'rowType' should be explicitly passed when the return data is ignored", HINT),
MYSQL_902("MYSQL_902", "parameter 'returnType' should be explicitly passed when the return data is ignored", HINT);
MYSQL_101("MYSQL_101", "invalid value: expected value is greater than or equal to zero", ERROR);

private final String code;
private final String message;
Expand Down

This file was deleted.

6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group=io.ballerina.stdlib
version=1.6.2-SNAPSHOT
version=1.7.0-SNAPSHOT

puppycrawlCheckstyleVersion=8.18
checkstyleToolVersion=7.8.2
Expand All @@ -10,9 +10,9 @@ researchgateReleaseVersion=2.8.0
testngVersion=7.4.0
ballerinaGradlePluginVersion=0.15.0

ballerinaLangVersion=2201.3.0
ballerinaLangVersion=2201.4.0-20221104-003000-4b73c40e

stdlibSqlVersion=1.6.0
stdlibSqlVersion=1.7.0-20221130-000500-de190e4

# Direct Dependencies
# Level 01
Expand Down
Loading