asdf-tools: load broken when built with CCL

Bug #1624909 reported by pipping
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ASDF
Won't Fix
Wishlist
Faré

Bug Description

Building asdf-tools with SBCL leads to a usable binary (that handles the "load" command correctly).

$ LISP=sbcl SBCL=sbcl-1.3.9 ./make-asdf.sh build-asdf-tools
$ SBCL=sbcl-1.3.9 ./build/asdf-tools load sbcl
# works
$ CCL=ccl-1.11 ./build/asdf-tools load ccl
# works

Building asdf-tools with CCL (the default!) does not lead to a usable binary (the "load" command is handled incorrectly).

$ LISP=ccl CCL=ccl-1.11 ./make-asdf.sh build-asdf-tools
$ SBCL=sbcl-1.3.9 ./build/asdf-tools load sbcl
# does not work
$ CCL=ccl-1.11 ./build/asdf-tools load ccl
# does not work

By "does not work" I mean to say: It looks like you're given a REPL but as soon as you press a single key, you'll get

rlwrap: error: Unexpected error: Input/output error

whereafter the program doesn't react to ordinary keystrokes anymore.

pipping (pipping)
summary: - asdf-tools: load broken?
+ asdf-tools: load broken when built with CCL
description: updated
Revision history for this message
Faré (fahree) wrote :

OK. I think I understand what happens. I used

#+clozure (trace uiop:run-program ccl:run-program inferior-shell:run)

to look at what was happening on our side, and everything looked fine. As it should, this it all works on SBCL. Now, I also used strace on the rlwrap process and found that it was doing a select() (as it should), was being told by the kernel that there was input, tried to read one character from its tty, and got an I/O error. Then, I remembered that CCL somehow has a thread that processes input in the background. Which means that asdf-tools should probably be using single-threaded-ccl. Sigh.

Revision history for this message
Faré (fahree) wrote :

So, when I use single-threaded-ccl, rlwrap doesn't gets its input preempted by CCL's background thread, but the tty is still set by CCL in some raw mode such that rlwrap is a bit confused. Notably, I have to type C-J instead of RET to get it to process a line of input. So, it's still not very usable.

The solution is that the default implementation for asdf-tools should be SBCL, at least on Unix (until SBCL fixes its run-program, it cannot be the default asdf-tools on Windows). Sigh.

See !23 for this "fix": https://gitlab.common-lisp.net/asdf/asdf/merge_requests/23

Revision history for this message
pipping (pipping) wrote :

It's unfortunate that asdf-tools's "load" can't be gotten to work properly on ccl. But it's not a tragedy. Thanks for taking the time to get to the bottom of this!

Revision history for this message
Faré (fahree) wrote :

I'll mark this bug as WON'T FIX. No way we're going to fix CCL. That means we have to use SBCL. Hopefully, the limitations of SBCL on Windows won't get in the way.

Changed in asdf:
assignee: nobody → Faré (fahree)
importance: Undecided → Wishlist
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.