Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


clojuredocs doesn't handle libraries with '/' in the title well #1

dakrone opened this Issue · 3 comments

2 participants


Playing around with cd-analyzer, I had it analyze my API client, which has the full name org.thnetos/cd-client. The analyze went fine, going to the actual page (http://localhost:3000/org.thnetos/cd-client) causes a problem:

Processing MainController#ns (for at 2010-09-09 22:03:52) [GET]
Parameters: {"action"=>"ns", "lib"=>"org.thnetos", "ns"=>"cd-client", "controller"=>"main"}
Namespace Columns (4.5ms)   SHOW FIELDS FROM `namespaces`
Namespace Load (2.7ms)   SELECT * FROM `namespaces` WHERE (`namespaces`.`name` = 'cd-client') LIMIT 1
User Columns (1.8ms)   SHOW FIELDS FROM `users`
Library Columns (1.8ms)   SHOW FIELDS FROM `libraries`
Library Load (0.3ms)   SELECT * FROM `libraries` WHERE (`libraries`.`name` = 'org.thnetos') LIMIT 1

It should be loading the "lib"=>"org.thnetos/client", we need something to munge slashes in fully-qualified package names.

Either that, or I imported it improperly :)

zk commented

Nah, you did it correctly. The shitty thing is that there are a couple of options that I can see right now, none of which gets us to the goal of having super-readable urls:

  1. munging it slightly (|client/my-ns/my-var)
  2. Completely (
  3. encoding (, which should but dosen't work with the current stack).

I have to look into this a bit more, but the issue is that some of the allowed characters in lib / ns / var names are going to collide with url reserved characters, so we'd have to map each of those collisions to new chars, or encode. Encoding would solve this problem but affects readability and mentally generating CD urls on the fly.

Ultimately I think I'm just putting off really putting some thought into it in favor of cleaning up the codebase, but we should definitely talk about it on tues.

zk commented

Turns out this will be fixed as part of the versioning stuff. As discussed today, we went the munging route:

  • Added a url_friendly_name column to the libraries and functions tables
  • On import (and migration), names are munged: ? -> _q, / -> \space, \space -> _
  • Result is stored in the url_friendly_name column

I'm still on the fence about the 'encoding' scheme, any suggestions?

zk commented

commit 0b51e2b

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.