Open rstm-sf opened 2 years ago
Sorry, I don't usually use MacOS, and I don't think I have a CI test for it yet. For now, make sure to install OpenJDK v11 or newer, and add it to your path. The one at /usr/bin/java is old, and doesn't even accept a --version option to test what version it is. That's why it downloads a .gz file--albeit the wrong one for MacOS.
Also, I don't know if the package takes "*.g4". I do globbing, but I don't know if it's done on the .g4's. You may need to replace with each grammar file. I'll check this and add it in the next release.
Also, I don't know if the package takes "*.g4". I do globbing, but I don't know if it's done on the .g4's. You may need to replace with each grammar file. I'll check this and add it in the next release.
It works for windows and linux. The link to the pipeline builds passed :)
still have the same issue on MacOS
Version '4.13.1' v2 match='', v3 match='4.13.1'
Location to stuff Antlr tool jar, if not found, is /Users/emmekappa/.m2/
Paths to search for Antlr4 jar, in order, are: file:////Users/emmekappa/.m2/;file:////Users/emmekappa/dev/AntlrStep1/AntlrStep1/obj/Debug/netstandard2.1/;https://repo1.maven.org/maven2/org/antlr/antlr4/
path is file:////Users/emmekappa/.m2/
place_path is /Users/emmekappa/.m2/
Probing file:////Users/emmekappa/.m2/antlr4-4.13.1-complete.jar
Local path \\users\emmekappa\.m2\antlr4-4.13.1-complete.jar
path is file:////Users/emmekappa/dev/AntlrStep1/AntlrStep1/obj/Debug/netstandard2.1/
place_path is /Users/emmekappa/.m2/
Probing file:////Users/emmekappa/dev/AntlrStep1/AntlrStep1/obj/Debug/netstandard2.1/antlr4-4.13.1-complete.jar
Local path \\users\emmekappa\dev\AntlrStep1\AntlrStep1\obj\Debug\netstandard2.1\antlr4-4.13.1-complete.jar
path is https://repo1.maven.org/maven2/org/antlr/antlr4/
place_path is /Users/emmekappa/.m2/
Probing https://repo1.maven.org/maven2/org/antlr/antlr4/4.13.1/antlr4-4.13.1-complete.jar
archive_name is /Users/emmekappa/.m2/antlr4-4.13.1-complete.jar
place_path is /Users/emmekappa/.m2/
Found /Users/emmekappa/.m2/antlr4-4.13.1-complete.jar
AntlrToolJar is "/Users/emmekappa/.m2/antlr4-4.13.1-complete.jar"
Search path for java (JavaExec): PATH;DOWNLOAD
Download area for JRE (JavaDownloadDirectory): /Users/emmekappa/.jre/
Paths to search for the java executable, in order, are: PATH;DOWNLOAD
probing java executable at PATH
Path to try is PATH
Trying PATH
found a java executable at /usr/bin/java
w = /usr/bin/java
Executing command: "/usr/bin/java" -version
got data java version "21.0.1" 2023-10-17 LTS
got data
got data Java(TM) SE Runtime Environment (build 21.0.1+12-LTS-29)
got data Java HotSpot(TM) 64-Bit Server VM (build 21.0.1+12-LTS-29, mixed mode, sharing)
got data
java at '/usr/bin/java', but not a good version.
java not found on path
probing java executable at DOWNLOAD
Path to try is DOWNLOAD
Probing DOWNLOAD
Trying pattern USERPROFILE/.jre/.*/java
os_arch is Unix 14.1.1
os_arch str is
os_arch is Unix 14.1.1
os_arch is Unix 14.1.1
os_arch is Unix 14.1.1
os_arch is Unix 14.1.1
os_arch is Unix 14.1.1
os_arch is Unix 14.1.1
1:7>/Users/emmekappa/.nuget/packages/antlr4buildtasks/12.4.0/build/Antlr4BuildTasks.targets(138,9): error ANT02: Cannot find Java executable'' at Antlr4.Build.Tasks.RunAntlrTool.SetupJava() [/Users/emmekappa/dev/AntlrStep1/AntlrStep1/AntlrStep1.csproj]
/Users/emmekappa/.nuget/packages/antlr4buildtasks/12.4.0/build/Antlr4BuildTasks.targets(138,9): error ANT02: at Antlr4.Build.Tasks.RunAntlrTool.Execute() [/Users/emmekappa/dev/AntlrStep1/AntlrStep1/AntlrStep1.csproj]
1:7>/Users/emmekappa/.nuget/packages/antlr4buildtasks/12.4.0/build/Antlr4BuildTasks.targets(138,9): error ANT02: The Antlr4 tool failed. [/Users/emmekappa/dev/AntlrStep1/AntlrStep1/AntlrStep1.csproj]
Esecuzione attiv
@emmekappa It seems the version information checking in this package needs to be fixed.
found a java executable at /usr/bin/java
w = /usr/bin/java
Executing command: "/usr/bin/java" -version
got data java version "21.0.1" 2023-10-17 LTS
The package tries to run java and test the version produced. That's because people install java that isn't version 11 or newer. In your case, you installed Sun's official SE java. With the "antlr4" tool in antlr4-tools, Parr just tests if java runs, which isn't quite good enough.
This need to be fixed. I'll have something later today.
<TargetFramework>netstandard2.1</TargetFramework>
https://github.com/rstm-sf/qsharp-compiler/blob/infra/use_Antlr4BuildTasks/src/QsFmt/Parser/Parser.csproj
https://dev.azure.com/ms-quantum-public/Microsoft%20Quantum%20(public)/_build/results?buildId=46269&view=results