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

Cannot import CL packages under recent SBCL #25

Merged
merged 1 commit into from Nov 12, 2018

Conversation

ndantam
Copy link
Contributor

@ndantam ndantam commented Nov 12, 2018

The following file cannot be loaded with clpython:run on recent versions of SBCL:

import CL
CL.PRINT("FOO")

Tested as failing on 1.4.13 and likely starting with the ASDF update in 1.4.2. Here is the backtrace:

ImportError: Loading of module `CL' was aborted. Binary: /tmp/user/1000/clpython-cl-fasl-p6tnmpa2Imported by: /home/ntd/git/tmkit/test.py

1: ((FLET CLPYTHON::LOG-ABORT :IN CLPYTHON::PY-IMPORT) T)
2: ((FLET "CLEANUP-FUN-54" :IN CLPYTHON::PY-IMPORT)) [cleanup]
3: (CLPYTHON::PY-IMPORT (CLPYTHON.USER::CL) :WITHIN-MOD-PATH #P"/home/ntd/git/tmkit/test.py" :WITHIN-MOD-NAME "__main__")
4: (CLPYTHON::|python-module __main__|)
5: (CLPYTHON.USER::|{__main__[0] "import CL" #4138581656636548740}| #<HASH-TABLE :TEST EQ :COUNT 2 {100343ACE3}>)
6: ((FLET CLPYTHON::RUN-TOP-LEVEL-FORMS :IN CLPYTHON::MODULE-INIT) #<HASH-TABLE :TEST EQ :COUNT 2 {100343ACE3}>)
7: ((FLET CLPYTHON:RUN :IN CLPYTHON:RUN-PYTHON-AST))

The issue appears to arise in CLPYTHON::COMPILED-FILE-NAME with the call to (make-instance 'asdf:compile-op). On newer SBCL, this throws the following error:

OPERATION instances must only be created through MAKE-OPERATION.

Replacing cl:make-instance with asdf:make-operation does not throw
the error in COMPILED-FILE-NAME and the above CL import works on
SBCL 1.4.13 and 1.3.14

In recent ASDF, "OPERATION instances must only be created through
MAKE-OPERATION."
@coveralls
Copy link

Coverage Status

Coverage remained the same at 61.346% when pulling 8faa7a2 on ndantam:fix-cl-import into 0f47bf7 on metawilm:master.

@metawilm metawilm merged commit 80be910 into metawilm:master Nov 12, 2018
@metawilm
Copy link
Owner

Thanks!

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

Successfully merging this pull request may close these issues.

None yet

3 participants