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

Update for alpha spec? #2

Closed
danielcompton opened this issue May 1, 2017 · 2 comments
Closed

Update for alpha spec? #2

danielcompton opened this issue May 1, 2017 · 2 comments

Comments

@danielcompton
Copy link
Contributor

danielcompton commented May 1, 2017

Now that alpha spec is out, this library could be migrated to use its clojure.spec.alpha too. One thing to note is that clojure.spec has a different registry to clojure.spec.alpha, so spec registered in one registry can't be checked by code using the other spec version.

(Not saying you have to do this, I might get to it shortly, just leaving this issue as a marker).

@jeaye
Copy link
Owner

jeaye commented May 1, 2017

Thanks for opening this and pointing out the important caveat of the change. I think the way I'd approach this is to try something like this:

(def registry (try
                (require [clojure.spec :as s])
                (catch Throwable _
                  (require [clojure.spec.alpha :as s]))
                (finally
                  (s/registry))))

If you'd like to try this out, I'd be happy to merge. If not, it's certainly something I can do. If this ends up being a hassle, I'd prefer to just jump into clojure.spec.alpha. Since we're working with alpha software here, there's not much reason to stay on any specific version. People can upgrade Orchestra when they upgrade Clojure.

@danielcompton
Copy link
Contributor Author

I think its probably safer to just switch straight to clojure.spec.alpha. There's already going to be quite a bit of confusion about which specs are defined in which registries (for any libraries which define specs but haven't been updated), so I think it's probably better to rip the bandaid off.

@jeaye jeaye closed this as completed in 2e5d492 May 2, 2017
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

No branches or pull requests

2 participants