From d69c2ac47c46fafdf64af11e1daeec534d62cdee Mon Sep 17 00:00:00 2001 From: Rodin Aarssen Date: Wed, 15 Oct 2025 10:23:07 +0200 Subject: [PATCH] Added test for #2455 --- .../lang/rascalcore/check/TestConfigs.rsc | 2 ++ .../check/tests/BinaryDependencyTests.rsc | 21 +++++++++++++++++++ .../check/tests/download-test-jars.sh | 4 +++- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/org/rascalmpl/compiler/lang/rascalcore/check/TestConfigs.rsc b/src/org/rascalmpl/compiler/lang/rascalcore/check/TestConfigs.rsc index 90508259e10..f1c268f9e19 100644 --- a/src/org/rascalmpl/compiler/lang/rascalcore/check/TestConfigs.rsc +++ b/src/org/rascalmpl/compiler/lang/rascalcore/check/TestConfigs.rsc @@ -50,6 +50,7 @@ public loc RASCAL = |mvn://org.rascalmpl--rascal--0.41.0-RC15/|; public loc TYPEPAL = |mvn://org.rascalmpl--typepal--0.14.8/|; public loc OUTDATED_TYPEPAL = |mvn://org.rascalmpl--typepal--0.14.1/|; +public loc RASCAL_RC67 = |mvn://org.rascalmpl--rascal--0.41.0-RC67/|; public loc DRAMBIGUITY = |mvn://org.rascalmpl--drambiguity--0.1.2/|; public loc FLYBYTES = |mvn://org.rascalmpl--flybytes--0.1.5/|; @@ -57,6 +58,7 @@ public loc SALIX_CORE = |mvn://org.rascalmpl--salix-core--0.2.7/|; public loc SALIX_CONTRIB = |mvn://org.rascalmpl--salix-contrib--0.2.7/|; public loc RASCAL_LSP = |mvn://org.rascalmpl--rascal-lsp--2.21.2/|; public loc PHP_ANALYSIS = |mvn://org.rascalmpl--php-analysis--0.2.5-SNAPSHOT/|; +public loc JAVA_AIR = |mvn://org.rascalmpl--java-air--1.0.0-RC2/|; public loc REPO = |file:///Users/paulklint/git/|; public loc COMPILED_RASCAL diff --git a/src/org/rascalmpl/compiler/lang/rascalcore/check/tests/BinaryDependencyTests.rsc b/src/org/rascalmpl/compiler/lang/rascalcore/check/tests/BinaryDependencyTests.rsc index 31511550942..6b6cee6d7a7 100644 --- a/src/org/rascalmpl/compiler/lang/rascalcore/check/tests/BinaryDependencyTests.rsc +++ b/src/org/rascalmpl/compiler/lang/rascalcore/check/tests/BinaryDependencyTests.rsc @@ -404,6 +404,27 @@ test bool incompatibleVersionsOfBinaryLibrary(){ return checkExpectErrors("Check", ["Review of dependencies, reconfiguration or recompilation needed: binary module `TP` depends (indirectly) on incompatible module(s)"], core.pcfg, remove = [rascal, typepal, core]); } +test bool mixedRascalVersions() { + // This test project has a dependency on: + // * Rascal 0.41.0-RC67 + // * java-air 1.0.0-RC2, which was built using Rascal 0.41.0-RC35 + // The test module imports: + // * a standard library module from 0.41.0-RC67 + // * a library module of which the packaged tpl was built using 0.41.0-RC35 + clearMemory(); + project_name = "test-project"; + test_project = + createProject( + project_name, + ("Test": "import IO; + 'import lang::java::m3::Core;"), + createPathConfig(project_name) + [libs=[RASCAL_RC67, JAVA_AIR]] + [srcs=[src(project_name)]] + ); + return checkExpectNoErrors("Test", test_project.pcfg, remove = [test_project]); +} + // ---- Binary compatibility of two TModels ----------------------------------- // ---- Utilities ------------------------------------------------------------- diff --git a/src/org/rascalmpl/compiler/lang/rascalcore/check/tests/download-test-jars.sh b/src/org/rascalmpl/compiler/lang/rascalcore/check/tests/download-test-jars.sh index 5627b4b0c26..2e11565378e 100644 --- a/src/org/rascalmpl/compiler/lang/rascalcore/check/tests/download-test-jars.sh +++ b/src/org/rascalmpl/compiler/lang/rascalcore/check/tests/download-test-jars.sh @@ -8,10 +8,12 @@ function download() { # these should be synced with `TestConfigs.rsc` download "org.rascalmpl" "rascal" "0.41.0-RC15" +download "org.rascalmpl" "rascal" "0.41.0-RC67" download "org.rascalmpl" "typepal" "0.14.8" download "org.rascalmpl" "typepal" "0.14.1" download "org.rascalmpl" "drambiguity" "0.1.2" download "org.rascalmpl" "flybytes" "0.1.5" download "org.rascalmpl" "salix-core" "0.2.7" download "org.rascalmpl" "salix-contrib" "0.2.7" -download "org.rascalmpl" "rascal-lsp" "2.21.2" \ No newline at end of file +download "org.rascalmpl" "rascal-lsp" "2.21.2" +download "org.rascalmpl" "java-air" "1.0.0-RC2" \ No newline at end of file