A non-hidden default source tree

Bug #1293278 reported by Faré
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ASDF
Fix Released
High
Faré

Bug Description

Robert astutely noted that the absence of a default user source tree that isn't a hidden directory is a barrier to coding for new programmers: they have to either adopt one of the ugly XDG paths, or to modify their source registry.

There should

See this long discussion:
http://thread.gmane.org/gmane.lisp.asdf.devel/3851

Proposed names include:
~/lisp/ (is an actual hurdle to p-cos, a bit imprecise for casual users)
~/cl/ (a bit too familiar, but otherwise fine)
~/common-lisp/ (preferred by Faré, simple and self-documenting, not just for asdf)
~/asdf-local-projects/ (preferred by Robert(?), almost guaranteed to be new)

*Usually*, even if the directory already exists, there will be no meaningful clash:
1- the user already configured his ASDF to find his systems, so any defaults don't matter.
 Defaults mostly only matter to newbies and people who don't already have configured systems.
2- new defaults may shadow other lower-priority defaults, but it's hard to conceive
 that the user would specifically keep obsolete versions in ~/common-lisp/
 while at the same time having the system provide a newer one in /usr/share/common-lisp/
 and at the same time the user not having a yet non-obsolete one configured.
 The kind of user who would do that and not partake of the conversation on asdf-devel
 is probably non-existent.

Therefore, though I wouldn't use ~/lisp/ because of the known clash for p-cos as well as because the name doesn't distinguish between many kinds of lisps, I still recommend ~/common-lisp/ as this new default directory. I strongly dislike ~/asdf-local-projects/ because the ASDF source-registry directly descends from the original XCVB search-path, is shared between ASDF and XCVB, and may yet be used by future CL build tools different from ASDF. It's not just for ASDF, it's for all of common-lisp.

The way to add this new default would be to add a new function default-user-source-registry or such, that appears between user-source-registry-directory and system-source-registry in *default-source-registries*. Which raises the question of whether we want to bump *oldest-forward-compatible-asdf-version* or make defparameter* more clever and aware of a compatibility version.

The function itself would be defined as:
(defun default-user-source-registry () `(:source-registry (:tree (:home "common-lisp") :inherit-configuration))

Faré (fahree)
Changed in asdf:
status: New → Confirmed
importance: Undecided → Low
assignee: nobody → Robert P. Goldman (rpgoldman)
milestone: none → version4
Changed in asdf:
importance: Low → High
Revision history for this message
Robert P. Goldman (rpgoldman) wrote :

I'm going to take point of personal privilege and bump the priority of this bug. I was writing the "quick start guide," and the current default location for easy placement of one's lisp code was just too embarrassing.

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

Actually, what I would do is:

1- split default-source-registry into two parts:
   default-user-source-registry, after user-source-registry and user-source-registry-directory,
   and default-system-source-registry, after system-source-registry and system-source-registry-directory.

2- all user stuff go into default-user-source-registry, which seems to be everthing currently in default-source-registry, with exceptions below: XDG_DATA_HOME is for the user, but XDG_DATA_DIRS is for the system. local-appdata and appdata are for the user, but common-appdata is for the system.

3- then comes the issue of upgrade. defparameter* needs be enriched with some optional version thing, and only overwrite the previous value if upgrading from too old a version, which if not necessary older than *oldest-forward-compatible-asdf-version* (but defaulting to it). Instead of using a hook on *post-upgrade-cleanup-hook*, it should probably compare to the version, and overwrite if (version< actual-version-upgraded-from oldest-forward-compatible-asdf-version-for-this-variable).

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

If you want me to do this upgrade surgery, just tell me what directory you want to make the default.

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

Fixed in 3.1.0.102: ~/common-lisp/ is now in the default-user-source-registry.

Changed in asdf:
assignee: Robert P. Goldman (rpgoldman) → Faré (fahree)
status: Confirmed → Fix Committed
Changed in asdf:
milestone: version4 → asdf3-1
Changed in asdf:
status: Fix Committed → Fix Released
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.