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

Support for Clojure 1.8 #62

Open
daslu opened this issue Aug 22, 2019 · 5 comments
Open

Support for Clojure 1.8 #62

daslu opened this issue Aug 22, 2019 · 5 comments

Comments

@daslu
Copy link

daslu commented Aug 22, 2019

Continuing a recent discussion at Clojurians Slack, I have had some experiments porting Meander to Clojure 1.8.

The following changes were necessary:

  • Changing the Clojure dependency to "1.8.0"
  • Adding clojure-future-spec as a dependency
  • Adding a patch namespace with all the necessary predicates (nat-int?, etc.), that were added at Clojure 1.9.
  • Changing ##Inf with Double/POSITIVE_INFINITY.

So far, all Clojure JVM tests pass, except for

  • seq-zero-or-more-nested-mvr, vec-zero-or-more-nested-mvr, that rely on spec working with some Clojure 1.9 predicate (simple-symbol).
  • rp+-test, that seems to have a typo causes an error at Clojure 1.8.

    Clojurescript may need some more work.

If we want to maintain a version that supports Clojure 1.8, let us discuss:

  • Does it have to be a separate code base?
  • If so, what would be the appropriate namespacing convention.

Maybe it is better to come back to these questions after some experimentation, and after we hopefully understand if there are any differences in functionality.

I will keep experimenting with Meander at Clojure 1.8. For now, just wanted to document the details here.

@daslu daslu changed the title Support for 1.8 Support for Clojure 1.8 Aug 22, 2019
@noprompt
Copy link
Owner

I'm not sure if a separate code base would be needed. It seems like it should be possible to support 1.8 by fixing some of the above issues. The fix with ##Inf, missing functions, etc. seem trivial to fix.

We could add a separate test profile for 1.8 which depends on clojure-future-spec which would be run via the bin/test script. Adding clojure-future-spec as an explicit dependency does not seem necessary since the library consumer could bring that dependency in themselves.

@daslu
Copy link
Author

daslu commented Aug 23, 2019

Thanks.

An explicit clojure-future-spec seems necessary, since Meander itself relies on spec (e.g., s/fdef at various places).

Still haven't manage to make the Clojurescript part work with the Clojure 1.8 patch. I will dive into that a little later.

@noprompt
Copy link
Owner

Interesting. For some reason I thought it wouldn't be needed since, if the library consumer was providing those namespaces by way of clojure-future-spec, those namespaces would be on the class path and resolve properly. I think it is possible to put the burden on the end user to provide those namespaces. I suppose I should try it out locally and see for myself! 😄

@noprompt
Copy link
Owner

We could also place the specs in their own namespace(s).

@noprompt noprompt added the spec label Aug 24, 2019
@noprompt
Copy link
Owner

noprompt commented Jul 1, 2021

Dusting this off. Specs have since been placed in their own namespace. To close this issue

  • ##Inf needs to be replaced. A macro, call it (Inf), could do this and properly target JVM/JS.
  • Missing functions need to be installed, probably in the runtime namespaces.

I'm leaving this ticket open for anyone in the community who would like to take it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants