From 62c4eb4fe9af2f1608193281b0edfaf0efacaccc Mon Sep 17 00:00:00 2001
From: Francois-Rene Rideau <tunes@google.com>
Date: Wed, 18 Nov 2015 17:51:12 -0500
Subject: [PATCH] Get rid of remnant ASDF 2 backward-compatibility

These backward-compatibility functions aren't required now that we
wholly punt on upgrade from ASDF 2.
Also not used by any system in Quicklisp.
---
 TODO                    |  2 ++
 backward-internals.lisp | 20 +-------------------
 upgrade.lisp            |  6 ------
 3 files changed, 3 insertions(+), 25 deletions(-)

diff --git a/TODO b/TODO
index e7387cd1..8b4be1a5 100644
--- a/TODO
+++ b/TODO
@@ -292,6 +292,8 @@ so these would have to be fixed first.
 And that's why I didn't do it.
 It looks like SWANK can be fixed soon, though, so we'll see.
 
+* Hunt systems that use obsolete APIs
+
 * Get rid of component-properties
 ** directly use component-properties:
 *** yaclml.asd => misguided :features for version comparison
diff --git a/backward-internals.lisp b/backward-internals.lisp
index 03b332e9..3a3be508 100644
--- a/backward-internals.lisp
+++ b/backward-internals.lisp
@@ -4,24 +4,6 @@
 (uiop/package:define-package :asdf/backward-internals
   (:recycle :asdf/backward-internals :asdf)
   (:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/find-system)
-  (:export ;; for internal use
-   #:make-sub-operation
-   #:load-sysdef #:make-temporary-package))
+  (:export))
 (in-package :asdf/backward-internals)
 
-(when-upgrading (:when (fboundp 'make-sub-operation))
-  (defun make-sub-operation (c o dep-c dep-o)
-    (declare (ignore c o dep-c dep-o)) (asdf-upgrade-error)))
-
-;;;; load-sysdef
-(with-upgradability ()
-  (defun load-sysdef (name pathname)
-    (load-asd pathname :name name))
-
-  (defun make-temporary-package ()
-    ;; For loading a .asd file, we don't make a temporary package anymore,
-    ;; but use ASDF-USER. I'd like to have this function do this,
-    ;; but since whoever uses it is likely to delete-package the result afterwards,
-    ;; this would be a bad idea, so preserve the old behavior.
-    (make-package (fresh-package-name :prefix :asdf :index 0) :use '(:cl :asdf))))
-
diff --git a/upgrade.lisp b/upgrade.lisp
index 73e0736e..7834ea74 100644
--- a/upgrade.lisp
+++ b/upgrade.lisp
@@ -112,12 +112,6 @@ previously-loaded version of ASDF."
 ;;; Self-upgrade functions
 
 (with-upgradability ()
-  (defun asdf-upgrade-error ()
-    ;; Important notice for whom it concerns. The crux of the matter is that
-    ;; TRAVERSE can be completely refactored, and so after the find-system returns, it's too late.
-    (error "When a system transitively depends on ASDF, it must :defsystem-depends-on (:asdf)~%~
-          Otherwise, when you upgrade from ASDF 2, you must do it before you operate on any system.~%"))
-
   (defun cleanup-upgraded-asdf (&optional (old-version (first *previous-asdf-versions*)))
     (let ((new-version (asdf-version)))
       (unless (equal old-version new-version)
-- 
GitLab