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

Xdg module unbound with utop 2.13.0 #446

Closed
SnarkBoojum opened this issue Jul 5, 2023 · 10 comments
Closed

Xdg module unbound with utop 2.13.0 #446

SnarkBoojum opened this issue Jul 5, 2023 · 10 comments

Comments

@SnarkBoojum
Copy link

With utop 2.13.0:

utop # #use_output "dune utop";;
File "_none_", line 1:             
Error: Module `Xdg' is unavailable (required by `UTop_private')
Command exited with code 1.        

and indeed, if I try "open Xdg;;" in "utop", it fails -- I have to run "utop -I /usr/lib/ocaml/xdg" to make "open Xdg;;" work. But that doesn't fix the #use_output line...

@emillon
Copy link
Collaborator

emillon commented Jul 5, 2023

Hi.
Thanks for the report. How did you install utop?

#use_output "dune utop";;

This is not something that's supposed to work: dune utop (from your shell) is supposed to start utop with the right modules loaded. Does that work?

(for #use_output, the command to call is #use_output "dune top" but it's a different thing)

@SnarkBoojum
Copy link
Author

No, "dune utop" doesn't work -- since the project doesn't build completely and that's actually what I want to debug!

@emillon
Copy link
Collaborator

emillon commented Jul 5, 2023

what happens when you run dune utop from the shell?

@emillon
Copy link
Collaborator

emillon commented Jul 5, 2023

hmm, forget about this. does your debugging approach work with an older version of utop? (also, how did you install utop)

@SnarkBoojum
Copy link
Author

I install utop with the Debian package -- I'm part of the team preparing it. It did work in previous versions. I can use this debugging trick with the regular ocaml toplevel, but as you know it's a bit uncomfortable to work with.

@SnarkBoojum
Copy link
Author

When I run "dune utop", it just sits telling me the compilation isn't done... one file is missing - the one failing!

@emillon
Copy link
Collaborator

emillon commented Jul 5, 2023

It did work in previous versions.

utop 2.13.0 added a dependency against xdg >= 3.9.0, have you added that dependency on the Debian side? If so, do you have a log of utop 2.13.0 being built with it?

@SnarkBoojum
Copy link
Author

Well, xdg isn't a separate package -- it's shipped with the dune package. The relevant part of the log is:

make[1]: Entering directory '/home/jpuydt/Debian/build/utop-2.13.0'
dune build -p utop
make[1]: Leaving directory '/home/jpuydt/Debian/build/utop-2.13.0'

where I can only see that I should find a way to make the build more verbose on what it does!

But there are neither error nor warning: dune does find xdg required from src/lib/dune.

@emillon
Copy link
Collaborator

emillon commented Jul 5, 2023

I think we need to take one step back: what steps, exactly, used to work with utop 2.12.1, and do not work with the version you're packaging? If it's the dune utop command, in which project are you running this command?

@SnarkBoojum
Copy link
Author

I just tried to build a small example of the problem -- and I couldn't reproduce the Xdg issue. And it turns out that when there's a compilation problem, you just have to wait long enough for dune to decide it has reached 100% anyway.

Sorry for the noise.

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