Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix vector libspecs #17

Merged
merged 1 commit into from
May 2, 2015

Conversation

athos
Copy link
Contributor

@athos athos commented Apr 22, 2015

This PR makes it possible to use lists and vectors totally interchangeably to represent libspecs in the ns macro.

The current implementation handles libspecs represented with a list and ones represented with a vector in different ways. Especially, only list libspecs are allowed to have prefix lists. So, for example, it can deal with something like:

(ns example.foo
  (:require (example [bar :as bar]
                     [baz :as baz])))
          ; ^ a list libspec

but not:

(ns example.foo
  (:require [example [bar :as bar]
                     [baz :as baz]]))
          ; ^ a vector libspec

A lot of Clojure libraries out there are using lists and vectors interchangeably in their ns declarations. It would make more people (including me) happy if ns-tracker could deal with forms like that :)

@athos
Copy link
Contributor Author

athos commented Apr 22, 2015

Sorry, I wasn't aware some tests failed, but just fixed.

@weavejester
Copy link
Owner

Can you write some tests for this?

athos added a commit to athos/ns-tracker that referenced this pull request Apr 23, 2015
@athos
Copy link
Contributor Author

athos commented Apr 23, 2015

Just added tests (along with it, I fixed a bug found on the way).

@weavejester
Copy link
Owner

Can you squash your commits down, and ensure that the commit summary line is under 70 characters?

@athos athos force-pushed the feature/fix-vector-libspecs branch from a33d2b1 to 48ccb12 Compare April 25, 2015 03:27
@athos
Copy link
Contributor Author

athos commented Apr 25, 2015

Done.

weavejester added a commit that referenced this pull request May 2, 2015
@weavejester weavejester merged commit 183fe1c into weavejester:master May 2, 2015
@athos athos deleted the feature/fix-vector-libspecs branch May 5, 2015 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants