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

Migrate to new Runtime APIs #13

Merged
merged 1 commit into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
org = "ballerina"
name = "data.yaml"
version = "0.1.0"
version = "0.1.1"
authors = ["Ballerina"]
keywords = ["yaml"]
repository = "https://github.com/ballerina-platform/module-ballerina-data.yaml"
Expand All @@ -11,15 +11,15 @@ distribution = "2201.10.0"
[platform.java17]
graalvmCompatible = true

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "io.ballerina.lib"
artifactId = "yaml-native"
version = "0.1.0"
path = "../native/build/libs/data.yaml-native-0.1.0.jar"
version = "0.1.1"
path = "../native/build/libs/data.yaml-native-0.1.1-SNAPSHOT.jar"


[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "constraint-native"
version = "1.5.0"
path = "./lib/constraint-native-1.5.0.jar"
version = "1.6.0"
path = "./lib/constraint-native-1.6.0-20241113-090900-d276ad5.jar"
10 changes: 5 additions & 5 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.10.0"
distribution-version = "2201.11.0-20241112-214900-6b80ab87"

[[package]]
org = "ballerina"
name = "constraint"
version = "1.5.0"
version = "1.6.0"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
Expand All @@ -22,7 +22,7 @@ modules = [
[[package]]
org = "ballerina"
name = "data.yaml"
version = "0.1.0"
version = "0.1.1"
dependencies = [
{org = "ballerina", name = "constraint"},
{org = "ballerina", name = "io"},
Expand All @@ -37,7 +37,7 @@ modules = [
[[package]]
org = "ballerina"
name = "io"
version = "1.6.1"
version = "1.6.2"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
Expand Down Expand Up @@ -116,7 +116,7 @@ modules = [
[[package]]
org = "ballerina"
name = "time"
version = "2.5.1"
version = "2.6.0"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
org.gradle.caching=true
group=io.ballerina.lib
version=0.1.1-SNAPSHOT
ballerinaLangVersion=2201.10.0-20241002-115300-57eee14c
ballerinaLangVersion=2201.11.0-20241112-214900-6b80ab87

checkstyleToolVersion=10.12.0
puppycrawlCheckstyleVersion=10.12.0
Expand All @@ -17,6 +17,6 @@ downloadPluginVersion=4.0.4
releasePluginVersion=2.8.0
ballerinaGradlePluginVersion=2.0.1

stdlibIoVersion=1.6.2-20240928-084100-656404f
stdlibConstraintVersion=1.5.1-20240930-123400-5ecd396
stdlibTimeVersion=2.5.1-20241003-232800-e59222b
stdlibIoVersion=1.6.2-20241112-233100-995cf5f
stdlibConstraintVersion=1.6.0-20241113-090900-d276ad5
stdlibTimeVersion=2.6.0-20241113-073800-201b904
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public int read() {
public void close() throws IOException {
super.close();
if (closeMethod != null) {
env.getRuntime().call(iterator, closeMethod.getName());
env.getRuntime().callMethod(iterator, closeMethod.getName(), null);
}
}

Expand All @@ -86,7 +86,7 @@ private boolean hasBytesInCurrentChunk() {

private boolean readNextChunk() throws InterruptedException {
try {
Object result = env.getRuntime().call(iterator, nextMethodName);
Object result = env.getRuntime().callMethod(iterator, nextMethodName, null);
if (result == null) {
this.done = true;
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
import io.ballerina.lib.data.yaml.utils.DiagnosticErrorCode;
import io.ballerina.lib.data.yaml.utils.DiagnosticLog;
import io.ballerina.lib.data.yaml.utils.TagResolutionUtils;
import io.ballerina.runtime.api.PredefinedTypes;
import io.ballerina.runtime.api.TypeTags;
import io.ballerina.runtime.api.creators.TypeCreator;
import io.ballerina.runtime.api.creators.ValueCreator;
import io.ballerina.runtime.api.flags.SymbolFlags;
Expand All @@ -32,10 +30,12 @@
import io.ballerina.runtime.api.types.FiniteType;
import io.ballerina.runtime.api.types.IntersectionType;
import io.ballerina.runtime.api.types.MapType;
import io.ballerina.runtime.api.types.PredefinedTypes;
import io.ballerina.runtime.api.types.RecordType;
import io.ballerina.runtime.api.types.ReferenceType;
import io.ballerina.runtime.api.types.TupleType;
import io.ballerina.runtime.api.types.Type;
import io.ballerina.runtime.api.types.TypeTags;
import io.ballerina.runtime.api.types.UnionType;
import io.ballerina.runtime.api.utils.StringUtils;
import io.ballerina.runtime.api.utils.TypeUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,18 @@
import io.ballerina.lib.data.yaml.utils.JsonTraverse;
import io.ballerina.lib.data.yaml.utils.OptionsUtils;
import io.ballerina.lib.data.yaml.utils.TagResolutionUtils;
import io.ballerina.runtime.api.PredefinedTypes;
import io.ballerina.runtime.api.TypeTags;
import io.ballerina.runtime.api.creators.TypeCreator;
import io.ballerina.runtime.api.creators.ValueCreator;
import io.ballerina.runtime.api.flags.SymbolFlags;
import io.ballerina.runtime.api.types.ArrayType;
import io.ballerina.runtime.api.types.Field;
import io.ballerina.runtime.api.types.IntersectionType;
import io.ballerina.runtime.api.types.MapType;
import io.ballerina.runtime.api.types.PredefinedTypes;
import io.ballerina.runtime.api.types.RecordType;
import io.ballerina.runtime.api.types.TupleType;
import io.ballerina.runtime.api.types.Type;
import io.ballerina.runtime.api.types.TypeTags;
import io.ballerina.runtime.api.types.UnionType;
import io.ballerina.runtime.api.utils.StringUtils;
import io.ballerina.runtime.api.utils.TypeUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import io.ballerina.lib.data.yaml.common.Types;
import io.ballerina.lib.data.yaml.common.YamlEvent;
import io.ballerina.runtime.api.TypeTags;
import io.ballerina.runtime.api.types.TypeTags;
import io.ballerina.runtime.api.values.BArray;
import io.ballerina.runtime.api.values.BMap;
import io.ballerina.runtime.api.values.BString;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@
import io.ballerina.lib.data.yaml.common.Types;
import io.ballerina.lib.data.yaml.parser.ParserUtils;
import io.ballerina.lib.data.yaml.parser.Values;
import io.ballerina.runtime.api.PredefinedTypes;
import io.ballerina.runtime.api.TypeTags;
import io.ballerina.runtime.api.creators.ValueCreator;
import io.ballerina.runtime.api.flags.SymbolFlags;
import io.ballerina.runtime.api.types.ArrayType;
import io.ballerina.runtime.api.types.Field;
import io.ballerina.runtime.api.types.IntersectionType;
import io.ballerina.runtime.api.types.MapType;
import io.ballerina.runtime.api.types.PredefinedTypes;
import io.ballerina.runtime.api.types.RecordType;
import io.ballerina.runtime.api.types.TupleType;
import io.ballerina.runtime.api.types.Type;
import io.ballerina.runtime.api.types.TypeTags;
import io.ballerina.runtime.api.types.UnionType;
import io.ballerina.runtime.api.utils.StringUtils;
import io.ballerina.runtime.api.utils.TypeUtils;
Expand Down
Loading