Skip to content

Commit

Permalink
Merge pull request #124 from ballerina-platform/fix-dce-errors
Browse files Browse the repository at this point in the history
Fix issues with Dead Code Elimination feature
  • Loading branch information
TharmiganK authored Nov 6, 2024
2 parents 77de29e + 9c00a3f commit 52ab5a8
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 12 deletions.
8 changes: 4 additions & 4 deletions ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
[package]
org = "ballerina"
name = "constraint"
version = "1.5.1"
version = "1.6.0"
authors = ["Ballerina"]
keywords = ["constraint", "validation"]
repository = "https://github.com/ballerina-platform/module-ballerina-constraint"
icon = "icon.png"
license = ["Apache-2.0"]
distribution = "2201.8.0"
distribution = "2201.11.0"

[platform.java17]
graalvmCompatible = true

[[platform.java17.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "constraint-native"
version = "1.5.1"
path = "../native/build/libs/constraint-native-1.5.1-SNAPSHOT.jar"
version = "1.6.0"
path = "../native/build/libs/constraint-native-1.6.0-SNAPSHOT.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 = "constraint-compiler-plugin"
class = "io.ballerina.stdlib.constraint.compiler.ConstraintCompilerPlugin"

[[dependency]]
path = "../compiler-plugin/build/libs/constraint-compiler-plugin-1.5.1-SNAPSHOT.jar"
path = "../compiler-plugin/build/libs/constraint-compiler-plugin-1.6.0-SNAPSHOT.jar"
33 changes: 30 additions & 3 deletions ballerina/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

[ballerina]
dependencies-toml-version = "2"
distribution-version = "2201.8.0"
distribution-version = "2201.11.0-20241101-105200-f94714be"

[[package]]
org = "ballerina"
name = "constraint"
version = "1.5.1"
version = "1.6.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "test"},
Expand All @@ -28,6 +28,26 @@ modules = [
{org = "ballerina", packageName = "jballerina.java", moduleName = "jballerina.java"}
]

[[package]]
org = "ballerina"
name = "lang.__internal"
version = "0.0.0"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.object"}
]

[[package]]
org = "ballerina"
name = "lang.array"
version = "0.0.0"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.__internal"}
]

[[package]]
org = "ballerina"
name = "lang.error"
Expand All @@ -37,13 +57,20 @@ dependencies = [
{org = "ballerina", name = "jballerina.java"}
]

[[package]]
org = "ballerina"
name = "lang.object"
version = "0.0.0"
scope = "testOnly"

[[package]]
org = "ballerina"
name = "test"
version = "0.0.0"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.array"},
{org = "ballerina", name = "lang.error"}
]
modules = [
Expand All @@ -53,7 +80,7 @@ modules = [
[[package]]
org = "ballerina"
name = "time"
version = "2.4.0"
version = "2.6.0"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
Expand Down
4 changes: 4 additions & 0 deletions ballerina/constraint_errors.bal
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@
// specific language governing permissions and limitations
// under the License.

import ballerina/jballerina.java;

# Represents the generic error type of the module.
public type Error distinct error;

# Represents the errors occurs during constraint validations.
@java:ExternalDependency
public type ValidationError distinct Error;

# Represents the errors occurs during the type conversion.
@java:ExternalDependency
public type TypeConversionError distinct Error;
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 = ["constraint", "validation"]
repository = "https://github.com/ballerina-platform/module-ballerina-constraint"
icon = "icon.png"
license = ["Apache-2.0"]
distribution = "2201.8.0"
distribution = "2201.11.0"

[platform.java17]
graalvmCompatible = true
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
org.gradle.caching=true
group=io.ballerina.stdlib
version=1.5.1-SNAPSHOT
version=1.6.0-SNAPSHOT
puppycrawlCheckstyleVersion=10.12.0
slf4jVersion=1.7.30
testngVersion=7.6.1
ballerinaGradlePluginVersion=2.2.3
jacocoVersion=0.8.10

ballerinaLangVersion=2201.8.0
ballerinaLangVersion=2201.11.0-20241101-105200-f94714be

# Test dependency
stdlibTimeVersion=2.4.0
stdlibTimeVersion=2.6.0-20241106-140700-1bb5302

0 comments on commit 52ab5a8

Please sign in to comment.