-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fails with java 19 #29
Comments
Yes, this is a known issue caused by Java 19. See overturetool/vdm-vscode#196. It should be fine with later version of VDMJ or earlier versions of Java :) I'll look at changing the VDMCheck build to use a later VDMJ - but that would have to be a snapshot version. |
It looks like @lausdahl has made some changes in the VDMCheck development branch already, so it's possible that we can tweak the VDMJ version(s) from 4.4.6 to 4.5.0-SNAPSHOT and try it. There is a version of that snapshot in Maven Central (uploaded Nov 24th), which should contain the fix. |
This didn't quite work because there is a local version of the ClassMapper (long story). But I've just pushed a tweak to that class and the top level POM to change the VDMJ versions. The package does now build. I'll try to attach a ZIP. FMI2-vdmcheck-1.1.3-SNAPSHOT-distribution.zip Can you try that? |
Once a new snapshot of vdmj is pushed it should be possible to test with the repo. The local version of the class mapper is now removed |
Hi. same story with the shell script:
Can you make a version that fixes my modelDescription file as well? :D |
A new snapshot has now been deployed to Maven Central for VDMJ. Regarding the script, it still works fine here, for FMUs or XML files. How are you calling it? What OS are you using? For me on Linux, I unzip the distribution ZIP somewhere, add that folder to my $PATH and then cd to somewhere that has an *.fmu or *.xml file. So If this doesn't explain it, can you run VDMCheck with "bash -x" so we can see what it's doing? The important part is:
|
Windows and a single xml file. Firstly, I forgot to pass -x. But I have corrected that. Mime-type is lost Makes a file with mime type text/plain. I wrestled with it a bit, and I end up with the same error:
|
Okay, I think I can see what's happening. But it will help to understand some of the history... I usually work with Java on Linux and I don't have any Windows systems to test with. I can do a certain amount by running the JUnit test suite on a Windows platform via GitHub "Actions", but that's the limit. We created a Powershell script for VDMCheck originally, but it was hard to maintain because I couldn't run it easily. So for Windows users, we created the The vdmcheck.jar tests the input by firstly trying to unzip it, and then secondly trying to parse it as XML. For Linux/Mac users, the VDMCheck2.sh bash script uses the But there is also a problem with the classpath in the java command line call. The bash script uses colons, but on Windows, the java executable is expecting semi-colons (because colons can be used in filenames, like c:/users/nick/... and we also have an issue with forward/backward slashes sometimes). So I think the Can you try tweaking the script to use a semi-colon separator here? I assume you're using WSL on Windows to run bash? So if the above explains the problems, you can see that although WSL is a "bash environment", it isn't a Linux environment exactly: there are differences, which can easily cause problems. |
It sounds like you might want to distribute vdmcheck as a "fat jar" (as produced e.g. by https://github.com/johnrengelman/shadow); I use this plugin to produce jars that include all library dependencies into their single jar file. |
I'll take a look, Rudi. |
Good idea Rudi. I have used that before as well. I will take a look Nick. |
I send two pull-requests your way @nickbattle . I have fixed it for msys. |
Hi Nick :)
Hope all is well!
I just tried vdmcheck and it fails for java 19. It works with java 17.
In java 19 I get this error:
The vdmcheck2.sh script does not seem to work in general.
For java 19:
For java 17:
Cheers,
Casper
The text was updated successfully, but these errors were encountered: