Skip to content
Open
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
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
org.gradle.caching=true
group=io.ballerina
version=1.3.0-SNAPSHOT
version=1.3.1-SNAPSHOT

# Dependencies
ballerinaLangVersion=2201.11.0
Expand Down
4 changes: 2 additions & 2 deletions module-ballerina-xsd/BalTool.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
id = "xsd"

[[dependency]]
path = "../xsd-cli/build/libs/xsd-cli-1.3.0-SNAPSHOT.jar"
path = "../xsd-cli/build/libs/xsd-cli-1.3.0.jar"

[[dependency]]
path = "../xsd-core/build/libs/xsd-core-1.3.0-SNAPSHOT.jar"
path = "../xsd-core/build/libs/xsd-core-1.3.0.jar"
Comment on lines +5 to +8
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check version consistency between gradle.properties and BalTool.toml

echo "=== Version in gradle.properties ==="
if [ -f "gradle.properties" ]; then
    grep "^version=" gradle.properties
else
    echo "gradle.properties not found at root"
    find . -name "gradle.properties" -type f | head -5
fi

echo ""
echo "=== JAR versions referenced in BalTool.toml ==="
if [ -f "module-ballerina-xsd/BalTool.toml" ]; then
    cat "module-ballerina-xsd/BalTool.toml"
else
    echo "BalTool.toml not found"
fi

echo ""
echo "=== Checking build directory structure ==="
if [ -d "xsd-cli" ] || [ -d "xsd-core" ]; then
    echo "Found xsd-cli or xsd-core directories"
    find . -path "*/build/libs/*.jar" -type f 2>/dev/null | head -10
fi

Repository: ballerina-platform/xsd-tools

Length of output: 413


🏁 Script executed:

#!/bin/bash
# Check if xsd-cli and xsd-core have independent version configurations

echo "=== Checking xsd-cli/build.gradle ==="
if [ -f "xsd-cli/build.gradle" ]; then
    head -30 "xsd-cli/build.gradle"
    echo "..."
    grep -E "(version|jar|archivesBaseName)" "xsd-cli/build.gradle" | head -10
else
    echo "xsd-cli/build.gradle not found"
fi

echo ""
echo "=== Checking xsd-core/build.gradle ==="
if [ -f "xsd-core/build.gradle" ]; then
    head -30 "xsd-core/build.gradle"
    echo "..."
    grep -E "(version|jar|archivesBaseName)" "xsd-core/build.gradle" | head -10
else
    echo "xsd-core/build.gradle not found"
fi

echo ""
echo "=== Checking directory structure for xsd-cli ==="
ls -la xsd-cli/ 2>/dev/null | head -15

echo ""
echo "=== Checking directory structure for xsd-core ==="
ls -la xsd-core/ 2>/dev/null | head -15
</parameter>

Repository: ballerina-platform/xsd-tools

Length of output: 5075


🏁 Script executed:

#!/bin/bash
# Search for any version references or JAR paths that might explain the mismatch

echo "=== All version references in gradle.properties ==="
cat gradle.properties | grep -E "(version|Version)"

echo ""
echo "=== Checking if 1.3.0 appears elsewhere in the codebase ==="
rg "1\.3\.0" --type gradle --type toml --type properties 2>/dev/null | head -20

echo ""
echo "=== Checking settings.gradle or other root config files ==="
if [ -f "settings.gradle" ]; then
    cat settings.gradle
fi

Repository: ballerina-platform/xsd-tools

Length of output: 2544


Version mismatch: BalTool.toml references 1.3.0.jar but project version is 1.3.1-SNAPSHOT.

The dependency paths reference 1.3.0.jar files, but gradle.properties sets version=1.3.1-SNAPSHOT. When building, Gradle will produce JARs named xsd-cli-1.3.1-SNAPSHOT.jar and xsd-core-1.3.1-SNAPSHOT.jar, causing BalTool to fail loading the non-existent 1.3.0.jar files.

🐛 Proposed fix to align JAR versions with project version
 [[dependency]]
-path = "../xsd-cli/build/libs/xsd-cli-1.3.0.jar"
+path = "../xsd-cli/build/libs/xsd-cli-1.3.1-SNAPSHOT.jar"

 [[dependency]]
-path = "../xsd-core/build/libs/xsd-core-1.3.0.jar"
+path = "../xsd-core/build/libs/xsd-core-1.3.1-SNAPSHOT.jar"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
path = "../xsd-cli/build/libs/xsd-cli-1.3.0.jar"
[[dependency]]
path = "../xsd-core/build/libs/xsd-core-1.3.0-SNAPSHOT.jar"
path = "../xsd-core/build/libs/xsd-core-1.3.0.jar"
path = "../xsd-cli/build/libs/xsd-cli-1.3.1-SNAPSHOT.jar"
[[dependency]]
path = "../xsd-core/build/libs/xsd-core-1.3.1-SNAPSHOT.jar"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@module-ballerina-xsd/BalTool.toml` around lines 5 - 8, BalTool.toml
references hard-coded JAR names with 1.3.0 but the project version is
1.3.1-SNAPSHOT; update the dependency path strings in BalTool.toml (the entries
containing "../xsd-cli/build/libs/xsd-cli-1.3.0.jar" and
"../xsd-core/build/libs/xsd-core-1.3.0.jar") to match the project version (e.g.,
"../xsd-cli/build/libs/xsd-cli-1.3.1-SNAPSHOT.jar" and
"../xsd-core/build/libs/xsd-core-1.3.1-SNAPSHOT.jar") so the file names produced
by Gradle are found at runtime.