Re: But how do I finally fix package system?



budden <budden-lisp@xxxxxxx> writes:

And, what could I do if I have already created trash symbols?
I think some interactive "package cleaner tool" would be useful.
How could it look like?

Like this:


C/P2[261]> (defpackage :p1 (:use :cl) (:export :f))
#<PACKAGE P1>
C/P2[262]> (defun p1:f () '(p1::f p1::in p1::p1))
F
C/P2[263]> (defpackage :p3 (:use :cl))
#<PACKAGE P3>
C/P2[264]> (in-package :p3)
#<PACKAGE P3>
C/P3[265]> (defun f () '(f in p3))
F
C/P3[266]> (use-package :p1)

*** - (USE-PACKAGE (#<PACKAGE P1>) #<PACKAGE P3>): 1 name conflicts remain
Which symbol with name "F" should be accessible in #<PACKAGE P3>?
The following restarts are available:
P1 :R1 #<PACKAGE P1>
P3 :R2 #<PACKAGE P3>
ABORT :R3 ABORT
C/Break 1 P3[267]> :r1
T
C/P3[268]> (f)
(F P1::IN P1::P1)
C/P3[269]>



Oops, it already exists in all CL implementations...

I think I could implement this rather easily with wish.
Any additions, ideas, critics?

(defun force-use-package (package)
(loop
(handler-bind ((package-error (lambda (err) (invoke-restart (first (compute-restarts err))))))
(use-package package)
(return-from force-use-package t))))


--
__Pascal Bourguignon__ http://www.informatimago.com/

In a World without Walls and Fences,
who needs Windows and Gates?
.



Relevant Pages

  • RE: Push method question
    ... You can create a special group for laptops and one for pcsand ... Basically in the package folder you will have several programs (laptop, ... Since you have your adv setup to run when you want to. ... On the restarts, I'm wondering how to accomplish that now. ...
    (microsoft.public.sms.swdist)
  • Re: equation labels and figure captions into margin area
    ... You are right, I added "amssymb" package, just for trying. ... I think TeXnicCenter is too strict, maybe, or there's something wrong ... :-) But, oops, ... That extra vertical gap is present ...
    (comp.text.tex)
  • Re: Teac America Repair SCAM
    ... it is incumbent upon the receiver to note any and all shipping damage and take up the claim with the shipper. ... I worked for a company years ago that used to receive a lot of customer returns via UPS (aka OOPS) and almost every package was damaged in some way, some visible on the outside, some only marginally visible from the outside. ... As to receiving stuff at home, if I have the option, I ask for any other way than UPS (FEDEX, etc.). ...
    (rec.audio.pro)
  • Re: Teac America Repair SCAM
    ... policing shipping damage of products that arrive at their door. ... OOPS) and almost every package was damaged in some way, ... FEDEX will deliver on Saturdays. ...
    (rec.audio.pro)
  • Re: portupgrade, packages, and same versions
    ... On Thursday 02 December 2004 05:23 pm, David Syphers wrote: ... > Oops, sorry for the noise. ... it has to fetch the package. ...
    (freebsd-questions)