orthecreedence / cl-async

Asynchronous IO library for Common Lisp.
MIT License
275 stars 40 forks source link

Missing ASDF dependency causes warnings #194

Closed rpgoldman closed 1 year ago

rpgoldman commented 1 year ago

When I load CL-ASYNC, I get these 2 warnings:

WARNING: redefining CL-ASYNC::ERRNO-EVENT in DEFGENERIC
WARNING: redefining CL-ASYNC:STREAMISH in DEFGENERIC

TL;DR -- would you welcome a PR to fix these? Happy to fix them, if so.

errno-event

This is caused by a missing ASDF system dependency.

dns.lisp has the following:

src/dns.lisp
6:(defmethod errno-event ((streamish t) (errno (eql (uv:errval :eai-nodata))))

and the corresponding defgeneric appears in streamish.lisp. But dns.lisp does not :depends-on streamish.

streamish function

The defgeneric for this again appears in streamish.lisp, but it's downstream of the definition of an accessor method named streamish. The fix here is to move the defgeneric up, but that requires also detaching the enclosed :method and putting it below the defclass for streamish.

rpgoldman commented 1 year ago

Related to the dependency issue, I just noticed that the cl-async system definition has both a :serial t and explicit dependency specifications through :depends-on. I believe that the :serial t should be removed. I wonder if this is related to these messages I see when loading:

WARNING:
   Computing just-done stamp in plan NIL for action (ASDF/LISP-ACTION:PREPARE-OP
                                                     "cl-async-util"), but dependency (ASDF/LISP-ACTION:LOAD-OP
                                                                                       "cl-async-base") wasn't done yet!
WARNING:
   Computing just-done stamp in plan NIL for action (ASDF/LISP-ACTION:PREPARE-OP
                                                     "cl-async-util"
                                                     "src/util/helpers"), but dependency (ASDF/LISP-ACTION:LOAD-OP
                                                                                          "cl-async-util"
                                                                                          "src/util/package") wasn't done yet!
WARNING:
   Computing just-done stamp in plan NIL for action (ASDF/LISP-ACTION:PREPARE-OP
                                                     "cl-async-util"
                                                     "src/util/foreign"), but dependency (ASDF/LISP-ACTION:LOAD-OP
                                                                                          "cl-async-util"
                                                                                          "src/util/helpers") wasn't done yet!
WARNING:
   Computing just-done stamp in plan NIL for action (ASDF/LISP-ACTION:PREPARE-OP
                                                     "cl-async-util"
                                                     "src/util/error"), but dependency (ASDF/LISP-ACTION:LOAD-OP
                                                                                        "cl-async-util"
                                                                                        "src/util/foreign") wasn't done yet!
WARNING:
   Computing just-done stamp in plan NIL for action (ASDF/LISP-ACTION:PREPARE-OP
                                                     "cl-async"), but dependency (ASDF/LISP-ACTION:LOAD-OP
                                                                                  "cl-async-base") wasn't done yet!
WARNING:
   Computing just-done stamp in plan NIL for action (ASDF/LISP-ACTION:PREPARE-OP
                                                     "cl-async"), but dependency (ASDF/FIND-SYSTEM:DEFINE-OP
                                                                                  "cl-async") wasn't done yet!
WARNING: redefining CL-ASYNC::ERRNO-EVENT in DEFGENERIC