marijnh / Postmodern

A Common Lisp PostgreSQL programming interface
http://marijnhaverbeke.nl/postmodern
Other
392 stars 90 forks source link

in cl-postgres.asd delete symbol :sbcl in line 21 if you want compile with sbcl #306

Closed jh-midi closed 1 year ago

jh-midi commented 1 year ago

sbcl don't use "usocket" then delete it at first place

(defsystem "cl-postgres" :description "Low-level client library for PostgreSQL" :author "Marijn Haverbeke marijnh@gmail.com" :maintainer "Sabra Crolleton sabra.crolleton@gmail.com" :license "zlib" :version "1.33.4" :depends-on ("md5" "split-sequence" "ironclad" "cl-base64" "uax-15" (:feature (:or :sbcl :allegro :ccl :clisp :genera :armedbear :cmucl :lispworks) "usocket") (:feature :sbcl (:require :sb-bsd-sockets)))

sabracrolleton commented 1 year ago

Are you saying it does not compile for you?

jh-midi commented 1 year ago

it compile well if I remove :sbl from the line 21. In the readme you can read : "The library depends on usocket (except on SBCL and ACL, where the built-in socket library is used"

I am on sbcl 2.2.8

sabracrolleton commented 1 year ago

The reason I asked if it compiles for you without any modification is that it was originally put in because older versions of sbcl could be compiled without sb-bsd-sockets. That can still be the case with sbcl versions for a few operating systems like FreeBSD and NetBSD.

So I will ask again, does it compile for you without any modification, or is this just a suggested cleanup?

jh-midi commented 1 year ago

here the result without removing :sbcl in line 21.

postmodernSBCL

sabracrolleton commented 1 year ago

Interesting. Are you running on Windows? This looks like https://bugs.launchpad.net/sbcl/+bug/1983355. A comment on that bug report claims that it is a usocket problem. I've commented on usocket at https://github.com/usocket/usocket/issues/86.

I am not seeing this on a linux box or a mac (I do not happen to have a windows box handy at the moment), but if your fix works to solve the issue on windows, we can make that change and I can see what needs to be done for any issues that might cause for BSD types.

binghe commented 1 year ago

Hi, this is an issue of USOCKET which has been fixed on master branch [1]. I will try to make a new release ASAP.

Chun Tian USOCKET maintainer

[1] https://github.com/usocket/usocket/pull/89

jh-midi commented 1 year ago

with sb-bsd-sockets 99% of postmodern/tests pass on windows 10 I run postgres under msys and postgres user don't exist and it is ok look at result below.

Running test FAIL-INCLUDE-EXECUTE-FILE . WARNING: PostgreSQL warning: la table « company_employees » n'existe pas, poursuite du traitement Did 1349 checks. Pass: 1342 (99%) Skip: 0 ( 0%) Fail: 7 ( 0%)

Failure Details:

DEFAULT-PRIVILEGES-2 in POSTMODERN-ROLES []: Unexpected Error: #<CL-POSTGRES-ERROR::UNRECOGNIZED-CONFIGURATION-PARAMETER {1004A24963}> Database error 42704: le rôle « postgres » n'existe pas QUERY: reassign owned by a to postgres.


DEFAULT-PRIVILEGES-1 in POSTMODERN-ROLES []: Unexpected Error: #<CL-POSTGRES-ERROR::UNRECOGNIZED-CONFIGURATION-PARAMETER {1004A188E3}> Database error 42704: le rôle « postgres » n'existe pas QUERY: reassign owned by a to postgres.


CREATE-DB-ROLE-0-1 in POSTMODERN-ROLES []: Unexpected Error: #<CL-POSTGRES-ERROR:SYSTEM-ERROR {1004A04D13}> Database error 58P01: n'a pas pu ouvrir le fichier de contrôle d'extension « E:/msys64/mingw64/share/postgresql/extension/pg_stat_statements.control » : No such file or directory QUERY: CREATE EXTENSION IF NOT EXISTS pg_stat_statements;.


BINARY-PREPARE-3-DROP-NO-TABLE-POOLED in POSTMODERN-BINARY-PREPARE []: Unexpected Error: # The value NIL is not of type NUMBER.


BINARY-PREPARE-3-DROP-NO-TABLE in POSTMODERN-BINARY-PREPARE []: Unexpected Error: # The value NIL is not of type NUMBER.


PREPARE-3-DROP-NO-TABLE-POOLED in POSTMODERN-PREPARE []: Unexpected Error: # The value NIL is not of type NUMBER.


PREPARE-3-DROP-NO-TABLE in POSTMODERN-PREPARE []: Unexpected Error: # The value NIL is not of type NUMBER.

binghe commented 1 year ago

Hi, new release (0.8.5) of usocket has just been made [1, 2], hopefully Quicklisp will incorporate it in a month. I've checked loading USOCKET on SBCL 2.2.8 (Windows), and everything seems fine.

[1] https://github.com/usocket/usocket/releases/tag/v0.8.5 [2] https://usocket.common-lisp.dev/releases/usocket-0.8.5.tar.gz

jh-midi commented 1 year ago

Hi, it is a good usocket new, thank you !

jh-midi commented 1 year ago

I tested the new version of usocket (8.5)and everything works fine with sbcl, with the same test results (99%) And now we can use drakma and others ...

sabracrolleton commented 1 year ago

Hi jh-midi, Thank you for the error messages on the tests. I have found and fixed the first three, the last four are a bit more of a puzzle.

If I could ask a favor, does the test prepare-3-drop-no-table immediately error or do any of the subtests pass?

Sabra

jh-midi commented 1 year ago

here running logs from postgres postgres_trace.log and here the slime buffer test-run.txt

sabracrolleton commented 1 year ago

Thank you.

sabracrolleton commented 1 year ago

Have made the change to :sbcl with respect to usocket, so closing this issue. Still tracking down the cause of the (drop-prepared-statement "all") failure on sbcl on windows.