Regression in 2.007: newly (?) exported symbol ASDF:APPENDF clashes with alexandria:appendf

Bug #627023 reported by Zach Beane
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
IOLib
Fix Released
High
Unassigned

Bug Description

To reproduce:

  - load asdf 2.007

  - load alexandria

  - (make-package "FOO" :use '("ASDF" "ALEXANDRIA"))

This affects, to some degree or another, at least these projects:

clonsigna
cl-redis
clws
cl-zmq
hemlock
iolib
sw-http
symbolicweb
ucw

Revision history for this message
Zach Beane (xach) wrote :

debugger invoked on a NAME-CONFLICT in thread #<THREAD "initial thread" RUNNING
                                                {1002AAEED1}>:
  USE-PACKAGE #<PACKAGE "ASDF"> causes name-conflicts in #<PACKAGE "FOO">
  between the following symbols:
    ASDF-UTILITIES:APPENDF, ALEXANDRIA.0.DEV:APPENDF
See also:
  The ANSI Standard, Section 11.1.1.2.5

Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [RESOLVE-CONFLICT] Resolve conflict.
  1: [ABORT ] Exit debugger, returning to top level.

(NAME-CONFLICT #<PACKAGE "FOO"> USE-PACKAGE #<PACKAGE "ASDF">)[:EXTERNAL]
0]

Revision history for this message
Faré (fahree) wrote :

Who is using both alexandria and asdf at the same time? :-/

What is the proper solution for this bug?

Unhappily, as I see it, the current solution would be to either
1- stop including asdf in the package use list, or
2- (:shadowing-import-from :alexandria #:appendf)

Revision history for this message
Zach Beane (xach) wrote :

Why export this stuff from asdf in the first place? ASDF need not be a utility library.

Revision history for this message
Zach Beane (xach) wrote :

Anyway, it looks like most of the trouble is from iolib.base - if that is fixed, I think that will fix all the others too.

Revision history for this message
Faré (fahree) wrote :

Some of the utilities are quite useful to a lot of ASDF clients that have to deal with configuration: notably, merge-pathnames* or getenv or split.

Which repo are you using for iolib?

Revision history for this message
Zach Beane (xach) wrote : Re: [Bug 627023] Re: Regression in 2.007: newly (?) exported symbol ASDF:APPENDF clashes with alexandria:appendf

Is there a way to offer those functions in a way that won't clash with
legacy code that can't be as easily updated as iolib?

I'm using iolib from git://gitorious.org/iolib/iolib.git.

Revision history for this message
Faré (fahree) wrote :

The joke is that:

* Towards the end of ASDF 1, Gary King created an ASDF-EXTENSIONS package, that imported (but failed to export) some utilities.
* When I released ASDF 2, I had a different, incompatible set of utilities, that I exported as ASDF-UTILITIES.
* To make bootstrapping easier, I created a package ASDF-BOOTSTRAP in which the initial update-friendly symbol/package-wrangling happens.
* Recently, Sam Steingold (of CLISP) complained that there were too many packages in ASDF, and since no one was using it, I merged ASDF-UTILITIES back into ASDF, and eliminated ASDF-BOOTSTRAP.

So we've come full circle.

In any case, I believe it is right for ASDF to export its essential utilities.
I also believe CL has a namespace management problem, but oh well.

Sorry for breaking things, but one way or the other, the ASDF API *will* change, and it is foolish to randomly (:use :asdf) and expect to never have to adapt to a modified API. If you want a fixed set of symbols, use (:import-from ...) and/or (:shadowing-import-from ...), or don't import and use fully qualified symbol names.

Revision history for this message
Faré (fahree) wrote :

I'm re-filing this as a bug against iolib.

For reference the "don't create many packages" bug was
https://bugs.launchpad.net/asdf/+bug/620579

affects: asdf → iolib
Revision history for this message
Zach Beane (xach) wrote :

What about making another project that does nothing but re-export what
you consider to be the essential utilities of asdf? Then people who do
not expect asdf to be a general utility library will not be affected,
and people who want asdf to be a general utility library can access its
utilities by an explicit decision.

Revision history for this message
Attila Lendvai (attila-lendvai) wrote :

...maybe you should have ignored Sam Steingold's request... :)

unless he had an objective reason why and how 3 asdf packages are too many.

but it's only my 0.02

Revision history for this message
Stelian Ionescu (sionescu) wrote :

Zach, could you please test iolib HEAD(a7fb2e60a65fa3c63975687bf528fa277be4f018) ? That commit should avoid this symbol clash

Revision history for this message
Zach Beane (xach) wrote :

iolib HEAD works for me.

Turns out this still breaks SymbolicWeb, though.

Revision history for this message
Zach Beane (xach) wrote :

Scratch that re: symbolicweb.

Changed in iolib:
status: New → Fix Released
importance: Undecided → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.