-
Notifications
You must be signed in to change notification settings - Fork 11
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
ns declaration in version.clj should be customizable #21
Comments
I'll have to second this. The plugin solves a problem I had, but every compile shoots out a warning message because of the single namespace. |
I have the same problem as well, I need to be able to have different libraries working with their own versions, all in the same JVM (and eventually überjar). I am super excited to have discovered lein-v, and would be able to use it everywhere if I could have the version namespace be configurable and nested within a project-specific prefix. |
If I can find a little extra time in my spare time for projects, I might try my hand at a pull request for this as well (unless someone else pounces on it first, of course!) I can see a few ways to go, to maintain backwards compatibility. One would be to add a :lein-v {:version-namespace 'my.project.version} which, if your cache directory was A variation could be: :lein-v {:version-namespace-prefix 'my.project} which would yield the same result. In both cases, the file would begin If neither of these appeals, and you want to avoid adding any in-project configuration settings, the meaning of the cache directory could be complected, supporting some sort of compound value like What do people think? |
@brunchboy Sounds good. In the meantime I moved to lein-git-version which serves my needs. |
Ah, thanks for calling that to my attention, @simongray, I almost switched to Speaking of that, how are you able to build snapshot JARs at all, without having put a But after adding
And since I prefer the flexibility |
It wasn’t even that hard to add lazy loading and caching (of course not, this is Clojure 😉) so maybe the only thing that is needed is to update the README showing an example like this as the way to make your version file not clash with other projects using the same technique to version themselves within a single |
@brunchboy I guess the reason why it works in my case is that I don't include the version number in my jars. |
Have you tried building a jar when you have a dependency on a snapshot library? I don’t think it will work no matter what you call the jar. |
This plugin looks great, but I've got a feature request. I have a few different internal libraries that I'd like to use the
version.clj
functionality for, let's sayalpha
andbeta
, which are packaged up as jars and then used by my main application,app
. If all of them declare a top-levelversion
namespace, I won't have any way to specifically getalpha.version
orapp.version
.With the EDN files I can work around this since from
beta
I can generate the file inresources/beta/version.edn
, and then from app I can slurp inbeta/version.edn
to get that specific version.Anyways, what I'd like to be able to do is something like
lein v cache src/beta clj beta.version
and then wind up with a filesrc/beta/version.clj
which starts with(ns beta.version)
.I can probably cook up a pull request for this if it seems like a good idea, but I thought I'd raise the issue first.
The text was updated successfully, but these errors were encountered: