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

SBCL seems to dislike define-condition-alias #193

Closed
rpgoldman opened this issue Jun 1, 2023 · 0 comments
Closed

SBCL seems to dislike define-condition-alias #193

rpgoldman opened this issue Jun 1, 2023 · 0 comments

Comments

@rpgoldman
Copy link
Contributor

When I load cl-async SBCL raises a bunch of warnings:

...
WARNING: redefining DEFTYPE type to be a class: CL-ASYNC:SOCKET-CLOSED
WARNING: redefining DEFTYPE type to be a class: CL-ASYNC:TCP-EOF
WARNING: redefining DEFTYPE type to be a class: CL-ASYNC:TCP-INFO
WARNING: redefining DEFTYPE type to be a class: CL-ASYNC:TCP-ERROR
WARNING: redefining DEFTYPE type to be a class: CL-ASYNC:TCP-RESET
WARNING: redefining DEFTYPE type to be a class: CL-ASYNC:TCP-TIMEOUT
WARNING: redefining DEFTYPE type to be a class: CL-ASYNC:TCP-REFUSED
WARNING: redefining DEFTYPE type to be a class: CL-ASYNC:TCP-ACCEPT-ERROR

I wonder if it would just be easier to redefine define-condition-alias as this instead:

(defmacro define-condition-alias (alias name)
  "Define an alias for the specified condition."
  `(define-condition ,alias (name)
      ()))

Yes, it adds a few more classes, but they are trivial, so maybe better do this instead of fighting the SBCL compiler?
If you think this is worthwhile, I would be happy to submit an MR. But I will wait to see what you say first.

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