Skip to content
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

Mezel project is not importable out of the box #39

Open
susliko opened this issue Sep 2, 2024 · 8 comments
Open

Mezel project is not importable out of the box #39

susliko opened this issue Sep 2, 2024 · 8 comments

Comments

@susliko
Copy link

susliko commented Sep 2, 2024

While trying to import mezel build (i mean the mezel repo itself), these logs are being written to metals.log:

2024.09.02 19:07:12 INFO  2: workspace/buildTargets: cache miss for derivedEnv, running action
2024.09.02 19:07:12 INFO  BSP server: java.util.NoSuchElementException: key not found: output_base
2024.09.02 19:07:12 INFO  BSP server:   at scala.collection.immutable.Map$EmptyMap$.apply(Map.scala:223)
2024.09.02 19:07:12 INFO  BSP server:   at scala.collection.immutable.Map$EmptyMap$.apply(Map.scala:219)
2024.09.02 19:07:12 INFO  BSP server:   at mezel.BspServerOps.outputBaseFromSource$$anonfun$1(BSPServer.scala:310)
2024.09.02 19:07:12 INFO  BSP server:   at get @ mezel.CancellableTask$.make$$anonfun$1$$anonfun$1(CancellableTask.scala:19)
2024.09.02 19:07:12 INFO  BSP server:   at map @ fs2.concurrent.SignallingRef$$anon$4.get(Signal.scala:257)
2024.09.02 19:07:12 INFO  BSP server:   at flatMap @ mezel.BspServerOps.get(BSPServer.scala:301)
2024.09.02 19:07:12 INFO  BSP server:   at map @ mezel.BspServerOps.outputBaseFromSource(BSPServer.scala:310)
2024.09.02 19:07:12 INFO  BSP server:   at map @ mezel.BspServerOps.outputBaseFromSource(BSPServer.scala:310)
2024.09.02 19:07:12 INFO  BSP server:   at map @ mezel.BspServerOps.outputBaseFromSource(BSPServer.scala:312)
2024.09.02 19:07:12 INFO  BSP server:   at map @ mezel.BspServerOps.mkTasks(BSPServer.scala:370)
2024.09.02 19:07:12 INFO  BSP server:   at get @ mezel.CancellableTask$.make$$anonfun$1$$anonfun$1(CancellableTask.scala:19)
2024.09.02 19:07:12 INFO  BSP server:   at map @ fs2.concurrent.SignallingRef$$anon$4.get(Signal.scala:257)
2024.09.02 19:07:12 INFO  BSP server:   at flatMap @ mezel.BspServerOps.get(BSPServer.scala:301)
2024.09.02 19:07:12 INFO  BSP server:   at flatMap @ mezel.BspServerOps.derivedEnv$$anonfun$2(BSPServer.scala:317)
2024.09.02 19:07:12 INFO  BSP server:   at flatMap @ mezel.BspServerOps.derivedEnv$$anonfun$2(BSPServer.scala:317)
2024.09.02 19:07:12 INFO  BSP server:   at as @ mezel.Main$.main$$anonfun$1$$anonfun$1(Main.scala:58)
@ValdemarGr
Copy link
Owner

Can you run bazel info in the project.

 ✘ valde@nixos  ~/git/mezel   main  bazel info 
bazel-bin: /home/valde/.cache/bazel/_bazel_valde/b38cc3c8af6e82d3fafc60d8b18e56bc/execroot/_main/bazel-out/k8-fastbuild/bin
bazel-genfiles: /home/valde/.cache/bazel/_bazel_valde/b38cc3c8af6e82d3fafc60d8b18e56bc/execroot/_main/bazel-out/k8-fastbuild/bin
bazel-testlogs: /home/valde/.cache/bazel/_bazel_valde/b38cc3c8af6e82d3fafc60d8b18e56bc/execroot/_main/bazel-out/k8-fastbuild/testlogs
character-encoding: file.encoding = ISO-8859-1, defaultCharset = ISO-8859-1
command_log: /home/valde/.cache/bazel/_bazel_valde/b38cc3c8af6e82d3fafc60d8b18e56bc/command.log
committed-heap-size: 155MB
execution_root: /home/valde/.cache/bazel/_bazel_valde/b38cc3c8af6e82d3fafc60d8b18e56bc/execroot/_main
gc-count: 13
gc-time: 58ms
install_base: /home/valde/.cache/bazel/_bazel_valde/install/7e26c0f1b3f6b658dee2b9a9a80ffbb2
java-home: /home/valde/.cache/bazel/_bazel_valde/install/7e26c0f1b3f6b658dee2b9a9a80ffbb2/embedded_tools/jdk
java-runtime: OpenJDK Runtime Environment (build 21+35) by Azul Systems, Inc.
java-vm: OpenJDK 64-Bit Server VM (build 21+35, mixed mode) by Azul Systems, Inc.
local_resources: RAM=32011MB, CPU=16.0
max-heap-size: 8392MB
output_base: /home/valde/.cache/bazel/_bazel_valde/b38cc3c8af6e82d3fafc60d8b18e56bc
output_path: /home/valde/.cache/bazel/_bazel_valde/b38cc3c8af6e82d3fafc60d8b18e56bc/execroot/_main/bazel-out
package_path: %workspace%
release: release 7.1.2
repository_cache: /home/valde/.cache/bazel/_bazel_valde/cache/repos/v1
server_log: /home/valde/.cache/bazel/_bazel_valde/b38cc3c8af6e82d3fafc60d8b18e56bc/java.log.nixos.valde.log.java.20240902-181740.140423
server_pid: 140423
used-heap-size: 46MB
workspace: /home/valde/git/mezel

The error would indicate that output_base should be missing from the bazel info result.

@susliko
Copy link
Author

susliko commented Sep 2, 2024

output_base is there 🤔

bazel-bin: /home/susliko/.cache/bazel/_bazel_susliko/3852ffcdcaa877196f667c6b5932ee34/execroot/_main/bazel-out/k8-fastbuild/bin
bazel-genfiles: /home/susliko/.cache/bazel/_bazel_susliko/3852ffcdcaa877196f667c6b5932ee34/execroot/_main/bazel-out/k8-fastbuild/bin
bazel-testlogs: /home/susliko/.cache/bazel/_bazel_susliko/3852ffcdcaa877196f667c6b5932ee34/execroot/_main/bazel-out/k8-fastbuild/testlogs
character-encoding: file.encoding = ISO-8859-1, defaultCharset = ISO-8859-1
command_log: /home/susliko/.cache/bazel/_bazel_susliko/3852ffcdcaa877196f667c6b5932ee34/command.log
committed-heap-size: 79MB
execution_root: /home/susliko/.cache/bazel/_bazel_susliko/3852ffcdcaa877196f667c6b5932ee34/execroot/_main
gc-count: 16
gc-time: 270ms
install_base: /home/susliko/.cache/bazel/_bazel_susliko/install/7e26c0f1b3f6b658dee2b9a9a80ffbb2
java-home: /home/susliko/.cache/bazel/_bazel_susliko/install/7e26c0f1b3f6b658dee2b9a9a80ffbb2/embedded_tools/jdk
java-runtime: OpenJDK Runtime Environment (build 21+35) by Azul Systems, Inc.
java-vm: OpenJDK 64-Bit Server VM (build 21+35, mixed mode) by Azul Systems, Inc.
local_resources: RAM=31747MB, CPU=20.0
max-heap-size: 8325MB
output_base: /home/susliko/.cache/bazel/_bazel_susliko/3852ffcdcaa877196f667c6b5932ee34
output_path: /home/susliko/.cache/bazel/_bazel_susliko/3852ffcdcaa877196f667c6b5932ee34/execroot/_main/bazel-out
package_path: %workspace%
release: release 7.1.2
repository_cache: /home/susliko/.cache/bazel/_bazel_susliko/cache/repos/v1
server_log: /home/susliko/.cache/bazel/_bazel_susliko/3852ffcdcaa877196f667c6b5932ee34/java.log.nblx-std-0013d0.susliko.log.java.20240902-192925.142431
server_pid: 142431
used-heap-size: 38MB
workspace: /home/susliko/opt/programming/public/mezel

@susliko
Copy link
Author

susliko commented Sep 2, 2024

It's also preceded by

2024.09.02 19:37:49 INFO  BSP server: WARNING: Failed to start process
2024.09.02 19:37:49 INFO  BSP server: java.io.IOException: error=2, No such file or directory
2024.09.02 19:37:49 INFO  BSP server:   at com.zaxxer.nuprocess.internal.LibJava10.Java_java_lang_ProcessImpl_forkAndExec(Native Method)
2024.09.02 19:37:49 INFO  BSP server:   at com.zaxxer.nuprocess.linux.LinuxProcess.prepareProcess(LinuxProcess.java:158)
2024.09.02 19:37:49 INFO  BSP server:   at com.zaxxer.nuprocess.linux.LinuxProcess.start(LinuxProcess.java:69)
2024.09.02 19:37:49 INFO  BSP server:   at com.zaxxer.nuprocess.linux.LinProcessFactory.createProcess(LinProcessFactory.java:40)
2024.09.02 19:37:49 INFO  BSP server:   at com.zaxxer.nuprocess.NuProcessBuilder.start(NuProcessBuilder.java:260)
2024.09.02 19:37:49 INFO  BSP server:   at mezel.CatsProcess$.$anonfun$1$$anonfun$1$$anonfun$1$$anonfun$1$$anonfun$2$$anonfun$2$$anonfun$1(CatsProcess.scala:80)

@ValdemarGr
Copy link
Owner

Thats seems helpful.

Recently a PR was merged to support apple processors, I suppose that may have caused issues?

#38

@ValdemarGr
Copy link
Owner

ValdemarGr commented Sep 3, 2024

Can you verify that the problem was introduced between 0.2.6 and 0.2.7?

@susliko
Copy link
Author

susliko commented Sep 4, 2024

Trying older versions gives the same results

@susliko
Copy link
Author

susliko commented Sep 4, 2024

How to make use of mezel-local.json? I could debug which path causes "No such file or directory"

@ValdemarGr
Copy link
Owner

ValdemarGr commented Sep 4, 2024

How to make use of mezel-local.json? I could debug which path causes "No such file or directory"

sbt assembly should produce a target/mezel.jar.

Mezel expects bazel to be on PATH. It seems like you use bazelisk, could that be related to the issue? I use an alias for bazelisk named bazel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants