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 Clojure 1.7 #21

Closed
brandonbloom opened this issue May 2, 2015 · 14 comments
Closed

Support Clojure 1.7 #21

brandonbloom opened this issue May 2, 2015 · 14 comments
Assignees

Comments

@brandonbloom
Copy link
Contributor

Hi Greg,

Clojure 1.7 has some cool new stuff, like tagged literal objects, which affect printing. I've done some major refactors to Fipp's built in Edn printer to make it 1.7-friendly. Work in progress is over on this branch here: https://github.com/brandonbloom/fipp/tree/clj17

I'd love for Puget and Whidbey to support Clojure 1.7 as well. I haven't taken a deep look at Pudget since my Fipp refactors, but I figured I should give you a heads up that I will soon. If I have enough time this weekend, I'll send you a pull request. If I don't find the time, or you just want to make the changes yourself, I can point you in the right direction.

There's a new EdnPrinter type, which implements an IVisitor interface. The visitor will convert the open set of host objects in to the closed set of edn-serializable (plus extra) data types. Any non-printable data will be shoved in to one of the shiny new clojure.lang.TaggedLiteral types. I'd love for Pudget to leverage this visitor, so that its code can focus on value-add, rather than every printer having to recreate the various print-method instances in Clojure 1.7.

Cheers,
Brandon

@greglook
Copy link
Owner

greglook commented May 3, 2015

Awesome, thanks for the heads up @brandonbloom. I'll take a look at your changes when I get a chance.

@greglook greglook self-assigned this May 3, 2015
@brandonbloom
Copy link
Contributor Author

Cool, 1.7 support is merged in to master now.

I'm focused on cljs support for fipp right now, but I'll probably bug you about pudget/whidbey again soon :-)

@trevor
Copy link

trevor commented May 28, 2015

👍

@trevor
Copy link

trevor commented Jul 16, 2015

Looking forward to the update. Any estimated timeframe?

@greglook
Copy link
Owner

Puget itself should work with 1.7 after removing the built-in TaggedLiteral code. I unfortunately haven't had much time to look at the changes to Fipp yet. 😞

@brandonbloom
Copy link
Contributor Author

The changes to Fipp should be backwards compatible, but 1) they have slightly more overlap with the behavior of Pudget now, so you may be able to delete a bunch of code. And 2) It covers the corresponding 1.7 core printing changes, which Pudget doesn't yet, so it may make sense to migrate to use the new stuff.

@trevor
Copy link

trevor commented Sep 25, 2015

Looking forward to the update.

In addition new versions of Datomic will require Clojure 1.7 going forward.

@greglook
Copy link
Owner

greglook commented Oct 8, 2015

Started the clojure17 branch to tackle this.

@brandonbloom
Copy link
Contributor Author

Cool! Let me know how the visitor approach works out for you. Happy to make adjustments if necessary.

@greglook
Copy link
Owner

Released 0.9.0 with these changes.

@trevor
Copy link

trevor commented Oct 16, 2015

Works great, thank you!

(As an aside, on the front page https://github.com/greglook/puget the default branch is develop which is behind master. Perhaps master should be the default?)

@brandonbloom
Copy link
Contributor Author

Just got a chance to try it, overall working great. Thanks! A couple notes:

  • set-color-scheme! is gone, so I had to comment that out of my lein profile. Haven't dug around for a replacement yet.
  • The sort-keys limit seems to have broken. I'll file a ticket on that.

@greglook
Copy link
Owner

@brandonbloom is this through whidbey? I need to release a new version making use of the changes here. You should be setting :color-scheme in the :whidbey options map though.

@trevor I'm following something similar to the git-flow branch model (detail here. Feature branches get merged into develop, and then releases are cut by merging over to master. Develop is the default so when people submit PRs it goes to the right branch. :)

@brandonbloom
Copy link
Contributor Author

@greglook Yup, Whidbey, I'll wait for the new release over there. Thanks.

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

3 participants