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

Compilation fails #1199

Closed
avysk opened this issue Oct 16, 2023 · 14 comments
Closed

Compilation fails #1199

avysk opened this issue Oct 16, 2023 · 14 comments

Comments

@avysk
Copy link

avysk commented Oct 16, 2023

I had to do the following (on FreeBSD 13.2-p4, ocaml 5.1.0, in addition to FreeBSD-specific fix in submodules/lev/lev/vendor/ev.c proposed in another issue)

--- a/ocaml-lsp-server/src/progress.ml
+++ b/ocaml-lsp-server/src/progress.ml
@@ -66,7 +66,7 @@ let build_progress t (progress : Drpc.Progress.t) =
         | Failed -> end_build t ~message:"Build failed"
         | Interrupted -> end_build t ~message:"Build interrupted"
         | Waiting -> end_build t ~message:"Waiting for changes"
-        | In_progress { complete; remaining } ->
+        | In_progress { complete; remaining; _ } ->
           let* token =
             match token with
             | Some token -> Fiber.return token

to be able to compile master branch.

@avysk
Copy link
Author

avysk commented Oct 16, 2023

Another issue I've mentioned is #1069

@voodoos
Copy link
Collaborator

voodoos commented Oct 16, 2023

Thanks for reporting the issue. If we want to keep the compatibility with older versions of dune-rpc we might want to locally disable the warning instead.

@avysk
Copy link
Author

avysk commented Oct 16, 2023

Won't something along the lines of the patch below preserve compatibility?

--- a/ocaml-lsp-server/src/progress.ml
+++ b/ocaml-lsp-server/src/progress.ml
@@ -66,7 +66,9 @@ let build_progress t (progress : Drpc.Progress.t) =
         | Failed -> end_build t ~message:"Build failed"
         | Interrupted -> end_build t ~message:"Build interrupted"
         | Waiting -> end_build t ~message:"Waiting for changes"
-        | In_progress { complete; remaining } ->
+        | In_progress s ->
+          let complete = s.complete in
+          let remaining = s.remaining in
           let* token =
             match token with
             | Some token -> Fiber.return token

@voodoos
Copy link
Collaborator

voodoos commented Oct 16, 2023

Yes, that's perfect! Do you want to open the PR?

@avysk
Copy link
Author

avysk commented Oct 16, 2023

I'll do it tomorrow. It's 7pm here, and I'm going to go away from my machines.

@voodoos
Copy link
Collaborator

voodoos commented Oct 16, 2023

I'll do it tomorrow. It's 7pm here, and I'm going to go away from my machines.

Of course, there's no hurry :-)
Thank you.

@rgrinberg
Copy link
Member

#1200

Already did it. Thanks for the report.

@rgrinberg
Copy link
Member

Just a note: you're compiling dune with warnings as being fatal. That's not the behavior in release mode.

@avysk
Copy link
Author

avysk commented Oct 16, 2023

I just run make install in the source tree -- and it failed.

@rgrinberg
Copy link
Member

Yup. When you do that, dune assume you're developing. But in release, the --release flag would make this just a regular warning.

@avysk
Copy link
Author

avysk commented Oct 16, 2023

Indeed. Should it be documented?

@rgrinberg
Copy link
Member

It's standard with every dune package. And it should be documented there already. However, if you want add a note in the README I wouldn't mind.

@avysk
Copy link
Author

avysk commented Oct 16, 2023

I need to compile from source since I am on FreeBSD and I have to patch a submodule first. README says 'make install' and I believed.

@avysk
Copy link
Author

avysk commented Oct 16, 2023

To be honest, I did not even look into Makefile. I could do better.

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

3 participants