[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sbcl-devel
Subject:    Re: [Sbcl-devel] [Sbcl-commits] master: Deprecate SB-PCL: exports.
From:       Stas Boukarev <stassats () gmail ! com>
Date:       2020-07-02 13:58:18
Message-ID: CAF63=10diUMLVSA_s7JeoVabLKuzcYYazGZW6ODeG30kfsOUwA () mail ! gmail ! com
[Download RAW message or body]

SB-PCL still exports some stuff, it'd be good to export from SB-MOP
only what's in the MOP.

On Thu, Jul 2, 2020 at 4:33 PM Douglas Katzman via Sbcl-commits
<sbcl-commits@lists.sourceforge.net> wrote:
> 
> I'd prefer to have SB-PCL simply be a nickname of SB-MOP. (Merge the two packages \
> into one) The complexity is thereby reduced, achieving my original goal of not \
> having :reexport, or any resembling it, in terms of unnecessary machinery. 
> On Thu, Jul 2, 2020 at 9:16 AM stassats via Sbcl-commits \
> <sbcl-commits@lists.sourceforge.net> wrote:
> > 
> > The branch "master" has been updated in SBCL:
> > via  8bd38fe7890198e170eb26db7aad2f4b846c4d45 (commit)
> > from  add3a5689115b8a6482c32ba9e2c4efed24f86ce (commit)
> > 
> > - Log -----------------------------------------------------------------
> > commit 8bd38fe7890198e170eb26db7aad2f4b846c4d45
> > Author: Stas Boukarev <stassats@gmail.com>
> > Date:   Thu Jul 2 16:15:24 2020 +0300
> > 
> > Deprecate SB-PCL: exports.
> > ---
> > package-data-list.lisp-expr     | 94 +----------------------------------------
> > src/code/reader.lisp            |  3 ++
> > src/code/target-extensions.lisp | 17 ++++++++
> > src/pcl/fixup.lisp              | 43 +++++++++++++++++++
> > 4 files changed, 64 insertions(+), 93 deletions(-)
> > 
> > diff --git a/package-data-list.lisp-expr b/package-data-list.lisp-expr
> > index c2626877e..852fdb6bc 100644
> > --- a/package-data-list.lisp-expr
> > +++ b/package-data-list.lisp-expr
> > @@ -2690,99 +2690,7 @@ package is deprecated in favour of SB-MOP."
> > 
> > "ILLEGAL-CLASS-NAME-ERROR"
> > "CLASS-NOT-FOUND-ERROR"
> > -               "SPECIALIZER-NAME-SYNTAX-ERROR")
> > -      ;; FIXME: After a little while, these reexports can probably go
> > -      ;; away, as they're superseded by the use of SB-MOP as the
> > -      ;; publically-accessible package.
> > -      :reexport ( ;; CL symbols
> > -                 "ADD-METHOD"
> > -                 "ALLOCATE-INSTANCE"
> > -                 "CLASS-NAME" "COMPUTE-APPLICABLE-METHODS"
> > -                 "ENSURE-GENERIC-FUNCTION" "MAKE-INSTANCE"
> > -                 "METHOD-QUALIFIERS" "REMOVE-METHOD"
> > -                 ;; MOP symbols
> > -                 "ADD-DEPENDENT"
> > -                 "ADD-DIRECT-METHOD"
> > -                 "ADD-DIRECT-SUBCLASS"
> > -                 "CLASS-DEFAULT-INITARGS"
> > -                 "CLASS-DIRECT-DEFAULT-INITARGS"
> > -                 "CLASS-DIRECT-SLOTS"
> > -                 "CLASS-DIRECT-SUBCLASSES"
> > -                 "CLASS-DIRECT-SUPERCLASSES"
> > -                 "CLASS-FINALIZED-P"
> > -                 "CLASS-PRECEDENCE-LIST"
> > -                 "CLASS-PROTOTYPE"
> > -                 "CLASS-SLOTS"
> > -                 "COMPUTE-APPLICABLE-METHODS-USING-CLASSES"
> > -                 "COMPUTE-CLASS-PRECEDENCE-LIST"
> > -                 "COMPUTE-DEFAULT-INITARGS"
> > -                 "COMPUTE-DISCRIMINATING-FUNCTION"
> > -                 "COMPUTE-EFFECTIVE-METHOD"
> > -                 "COMPUTE-EFFECTIVE-SLOT-DEFINITION"
> > -                 "COMPUTE-SLOTS"
> > -                 "DIRECT-SLOT-DEFINITION"
> > -                 "DIRECT-SLOT-DEFINITION-CLASS"
> > -                 "EFFECTIVE-SLOT-DEFINITION"
> > -                 "EFFECTIVE-SLOT-DEFINITION-CLASS"
> > -                 "ENSURE-CLASS"
> > -                 "ENSURE-CLASS-USING-CLASS"
> > -                 "ENSURE-GENERIC-FUNCTION-USING-CLASS"
> > -                 "EQL-SPECIALIZER"
> > -                 "EQL-SPECIALIZER-OBJECT"
> > -                 "EXTRACT-LAMBDA-LIST"
> > -                 "EXTRACT-SPECIALIZER-NAMES"
> > -                 "FINALIZE-INHERITANCE"
> > -                 "FIND-METHOD-COMBINATION"
> > -                 "FORWARD-REFERENCED-CLASS"
> > -                 "FUNCALLABLE-STANDARD-CLASS"
> > -                 "FUNCALLABLE-STANDARD-INSTANCE-ACCESS"
> > -                 "FUNCALLABLE-STANDARD-OBJECT"
> > -                 "GENERIC-FUNCTION-ARGUMENT-PRECEDENCE-ORDER"
> > -                 "GENERIC-FUNCTION-DECLARATIONS"
> > -                 "GENERIC-FUNCTION-LAMBDA-LIST"
> > -                 "GENERIC-FUNCTION-METHOD-CLASS"
> > -                 "GENERIC-FUNCTION-METHOD-COMBINATION"
> > -                 "GENERIC-FUNCTION-METHODS"
> > -                 "GENERIC-FUNCTION-NAME"
> > -                 "INTERN-EQL-SPECIALIZER"
> > -                 "MAKE-METHOD-LAMBDA"
> > -                 "MAP-DEPENDENTS"
> > -                 "METHOD-FUNCTION"
> > -                 "METHOD-GENERIC-FUNCTION"
> > -                 "METHOD-LAMBDA-LIST"
> > -                 "METHOD-SPECIALIZERS"
> > -                 "ACCESSOR-METHOD-SLOT-DEFINITION"
> > -                 "READER-METHOD-CLASS"
> > -                 "REMOVE-DEPENDENT"
> > -                 "REMOVE-DIRECT-METHOD"
> > -                 "REMOVE-DIRECT-SUBCLASS"
> > -                 "SET-FUNCALLABLE-INSTANCE-FUNCTION"
> > -                 "SLOT-BOUNDP-USING-CLASS"
> > -                 "SLOT-DEFINITION"
> > -                 "SLOT-DEFINITION-ALLOCATION"
> > -                 "SLOT-DEFINITION-INITARGS"
> > -                 "SLOT-DEFINITION-INITFORM"
> > -                 "SLOT-DEFINITION-INITFUNCTION"
> > -                 "SLOT-DEFINITION-LOCATION"
> > -                 "SLOT-DEFINITION-NAME"
> > -                 "SLOT-DEFINITION-READERS"
> > -                 "SLOT-DEFINITION-WRITERS"
> > -                 "SLOT-DEFINITION-TYPE"
> > -                 "SLOT-MAKUNBOUND-USING-CLASS"
> > -                 "SLOT-VALUE-USING-CLASS"
> > -                 "SPECIALIZER"
> > -                 "SPECIALIZER-DIRECT-GENERIC-FUNCTIONS"
> > -                 "SPECIALIZER-DIRECT-METHODS"
> > -                 "STANDARD-ACCESSOR-METHOD"
> > -                 "STANDARD-DIRECT-SLOT-DEFINITION"
> > -                 "STANDARD-EFFECTIVE-SLOT-DEFINITION"
> > -                 "STANDARD-INSTANCE-ACCESS"
> > -                 "STANDARD-READER-METHOD"
> > -                 "STANDARD-SLOT-DEFINITION"
> > -                 "STANDARD-WRITER-METHOD"
> > -                 "UPDATE-DEPENDENT"
> > -                 "VALIDATE-SUPERCLASS"
> > -                 "WRITER-METHOD-CLASS"))
> > +               "SPECIALIZER-NAME-SYNTAX-ERROR"))
> > 
> > #s(sb-cold:package-data
> > > name "SB-PRETTY"
> > diff --git a/src/code/reader.lisp b/src/code/reader.lisp
> > index 8a581baee..d71cf1db0 100644
> > --- a/src/code/reader.lisp
> > +++ b/src/code/reader.lisp
> > @@ -1594,6 +1594,9 @@ extended <package-name>::<form-in-package> syntax."
> > (multiple-value-bind (symbol accessibility)
> > (%find-symbol (token-buf-string buf) (token-buf-fill-ptr buf) pkg)
> > (when (eq accessibility :external) (return symbol))
> > +                    (when (and accessibility
> > +                               (check-deprecated-export pkg symbol))
> > +                      (return symbol))
> > (with-simple-restart (continue "Use symbol anyway.")
> > (error 'simple-reader-package-error
> > > package pkg
> > diff --git a/src/code/target-extensions.lisp b/src/code/target-extensions.lisp
> > index 2e084bfa8..7e010303e 100644
> > --- a/src/code/target-extensions.lisp
> > +++ b/src/code/target-extensions.lisp
> > @@ -281,3 +281,20 @@ unspecified."
> > `(defvar ,name ,@(when valuep (list value))))
> > ((:final)
> > `',name))))
> > +
> > +(define-load-time-global *deprecated-exports* nil)
> > +
> > +(defun deprecate-export (package symbol state version)
> > +  (declare (type deprecation-state state)
> > +           (type string version)
> > +           (type symbol symbol))
> > +  (setf (getf (getf *deprecated-exports* package) symbol)
> > +        (cons state version)))
> > +
> > +(defun check-deprecated-export (package symbol)
> > +  (let ((state (getf (getf *deprecated-exports* package) symbol)))
> > +    (when state
> > +      (deprecation-warn (car state) "SBCL" (cdr state) 'symbol
> > +                        (format nil "~A:~A" (package-name package) symbol)
> > +                        (list symbol))
> > +      t)))
> > diff --git a/src/pcl/fixup.lisp b/src/pcl/fixup.lisp
> > index 41d510c10..51d68d08d 100644
> > --- a/src/pcl/fixup.lisp
> > +++ b/src/pcl/fixup.lisp
> > @@ -68,3 +68,46 @@
> > ;;; CLASS-PROTOTYPE for FUNCTION should not use ALLOCATE-INSTANCE.
> > (let ((class (find-class 'function)))
> > (setf (slot-value class 'prototype) #'identity))
> > +
> > +(dolist (symbol '(add-method allocate-instance class-name \
> > compute-applicable-methods +                  ensure-generic-function \
> > make-instance method-qualifiers +                  remove-method add-dependent \
> > add-direct-method add-direct-subclass +                  class-default-initargs \
> > class-direct-default-initargs +                  class-direct-slots \
> > class-direct-subclasses +                  class-direct-superclasses \
> > class-finalized-p class-precedence-list +                  class-prototype \
> > class-slots +                  compute-applicable-methods-using-classes
> > +                  compute-class-precedence-list compute-default-initargs
> > +                  compute-discriminating-function compute-effective-method
> > +                  compute-effective-slot-definition compute-slots
> > +                  direct-slot-definition direct-slot-definition-class
> > +                  effective-slot-definition effective-slot-definition-class
> > +                  ensure-class ensure-class-using-class
> > +                  ensure-generic-function-using-class eql-specializer
> > +                  eql-specializer-object extract-lambda-list
> > +                  extract-specializer-names finalize-inheritance
> > +                  find-method-combination forward-referenced-class
> > +                  funcallable-standard-class \
> > funcallable-standard-instance-access +                  \
> > funcallable-standard-object +                  \
> > generic-function-argument-precedence-order +                  \
> > generic-function-declarations generic-function-lambda-list +                  \
> > generic-function-method-class generic-function-method-combination +               \
> > generic-function-methods generic-function-name +                  \
> > intern-eql-specializer make-method-lambda map-dependents +                  \
> > method-function method-generic-function method-lambda-list +                  \
> > method-specializers accessor-method-slot-definition +                  \
> > reader-method-class remove-dependent remove-direct-method +                  \
> > remove-direct-subclass set-funcallable-instance-function +                  \
> > slot-boundp-using-class slot-definition slot-definition-allocation +              \
> > slot-definition-initargs slot-definition-initform +                  \
> > slot-definition-initfunction slot-definition-location +                  \
> > slot-definition-name slot-definition-readers +                  \
> > slot-definition-writers slot-definition-type +                  \
> > slot-makunbound-using-class slot-value-using-class specializer +                  \
> > specializer-direct-generic-functions specializer-direct-methods +                 \
> > standard-accessor-method standard-direct-slot-definition +                  \
> > standard-effective-slot-definition standard-instance-access +                  \
> > standard-reader-method standard-slot-definition +                  \
> > standard-writer-method update-dependent validate-superclass +                  \
> > writer-method-class)) +  (sb-impl::deprecate-export *package* symbol :early \
> > "2.0.7")) 
> > -----------------------------------------------------------------------
> > 
> > 
> > hooks/post-receive
> > --
> > SBCL
> > 
> > 
> > _______________________________________________
> > Sbcl-commits mailing list
> > Sbcl-commits@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/sbcl-commits
> 
> _______________________________________________
> Sbcl-commits mailing list
> Sbcl-commits@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sbcl-commits


_______________________________________________
Sbcl-devel mailing list
Sbcl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic