I agree this is a problem, and we need some sort of centralised repo. The build process will be important.
We should be able to specify annotations for multiple versions of the same jar. Say
(lib-annotations
{:provides-versions #{"0.1" "0.2" "0.3-SNAPSHOT"}
:requires {:all '((:requires [clojure.core.typed :as t] [my.lib :as lib]))}
:configs
#{(for-version
#{"0.1" "0.2"}
{lib/foo '[(t/Coll t/Int) t/Int -> t/Int]})
(for-version
#{"0.3-SNAPSHOT"}
{lib/foo '(t/Fn [(t/Transducer t/Int t/Int) -> t/Int]
[(t/Coll t/Int) t/Int -> t/Int])})}}})
generates:
;; org/typedclojure/ann/my.lib-0.{1,2}.jar/project.clj
======================================================
(defproject org.typedclojure.ann/my.lib-0.{1,2} "0.2.423"
[org.clojure/core.typed "LATEST"]])
;; org/typedclojure/my.lib-0.{1,2}.jar/org/typedclojure/ann/my/lib.clj
======================================================================
(ns org.typedclojure.ann.my.lib
(:require [clojure.core.typed :as t]
[my.lib :as lib]))
(t/ann lib/foo [(t/Coll t/Int) t/Int -> t/Int])
;; org/typedclojure/ann/my.lib-0.3-SNAPSHOT.jar/project.clj
======================================================================
(defproject org.typedclojure.ann/my.lib "0.2.423"
:classifier {:0.3-SNAPSHOT
[org.clojure/core.typed "LATEST"]])
;; org/typedclojure/ann/my.lib-0.3-SNAPSHOT.jar/org/typedclojure/ann/my/lib.clj
======================================================================
(ns org.typedclojure.ann.my.lib
(:require [clojure.core.typed :as t]
[my.lib :as lib]))
(t/ann lib/foo (t/Fn [(t/Transducer t/Int t/Int) -> t/Int] [(t/Coll t/Int) t/Int -> t/Int]))
Thanks,
Ambrose