-
Notifications
You must be signed in to change notification settings - Fork 8
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
Assembly produces broken JAR file on case-insensitive file systems due to overlapping class names in ECMA 2020 parser #51
Comments
Can you give us some information about your platform; and did you
compile Ostrich yourself, or did you use the provided binary?
We have seen this problem before on some systems with case-insensitive
file system, but have not been able to hunt down the cause of the
problem yet.
|
Hello, my laptop is MacOS 12.3.1. Xcode is not installed, but sbt 1.5.5, Scala 2.13.7 and Java 8 are installed (and I seem to see that Java 17 is installed during the installation of sbt. I'm not sure if it is really installed). I have compiled myself. The following is the information after I execute
So, I think I compiled it successfully. I executed But as mentioned above, I found that when the SMT file contains re.from_ecma2020, and the regular expression contains letters, there will be unexpected output. For example, If there is no effective solution at present, can you provide some information about the system environment that can run ostrich successfully? Thanks a lot. |
This is almost certainly the problem with building on a case-insensitive file system, which is the default on macOS and windows. AFAICT this is not a problem with ostrich specifically but rather a bug or possibly miscondifuration in Scala and/or SBT assembly, but we have not had the time to reproduce the exact conditions and report a bug upstream. At the very least sbt should give an error when producing code that won’t run, and certainly not give runtime errors like this. To test if this is indeed your problem, you can try compiling ostrich on an external drive or in a volume that’s formatted with a case sensitive file system. I’ll post instructions for how to do this later if you don’t already know how to do that. The process is similar but opposite to how people make apps that require a case-insensitive file system run on a case-sensitive one. |
Ok, here's the steps to work around this bug (if that is what you are affected by).
Note that the target JAR will run on any machine with a JVM, including one with a case-insensitive file system. It's only during the build process that something goes wrong. |
Ok, I have isolated the problem (ping @pruemmer). If I extract the ecma2020-regex jar file I find this:
One of these classes is clearly lost when unzipping the jar file during SBT assembly to create the new jar file, when they touch the case-insensitive file system. Either the "rename" merge strategy for sbt assembly will work, or sbt assembly has a very serious problem. Will investigate this later. |
Update: I timed out trying to figure out how to reconfigure SBT assembly. |
Thank you for your answer. It solved my problem perfectly! |
Can you give us some information about your platform; and did you
compile Ostrich yourself, or did you use the provided binary?
We have seen this problem before on some systems with case-insensitive
file system, but have not been able to hunt down the cause of the
problem yet.
|
Hello, I ran the following command,
./ostrich tests/case-insensitive-2.smt2
but I got an unexpected result. Why?
(error "ecma2020regex/Absyn/ControlLettera")
Did I do something wrong?
The text was updated successfully, but these errors were encountered: