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

Please release fmap fix #209

Closed
dszakallas opened this issue Oct 30, 2017 · 10 comments
Closed

Please release fmap fix #209

dszakallas opened this issue Oct 30, 2017 · 10 comments

Comments

@dszakallas
Copy link

Hey all

using version 2.1.0, I noticed that in nested fmaps inner functors are coerced to the outermost's type or so:

user> (use 'cats.core)
nil
user> (use 'cats.builtin)
user> (fmap (fn [v] (fmap #(* 2 %) v)) #{[1 2 2]})
#{#{4 2}}

has this been fixed with #192 ?

I tried with the latest master (6e6ff13), and it seems that this works as expected now:

user> (fmap (fn [v] (fmap #(* 2 %) v)) #{[1 2 2]})
#{[2 4 4]}

However the latest release is still 2.1.0, which predates this fix.
When will be this released?

@sovelten
Copy link
Collaborator

I think this is just a matter of bumping cats to a different version, right? You could also clean your cache so that leiningen fetches the most current master version.

@dszakallas
Copy link
Author

Oh I got mixed up, just realized that the version bump to 2.2.1 was only merged into a fork. 😅
I purged the cache and got a fresh release:

david@mac:~/Projects/ingraph/sre% lein repl
Retrieving funcool/cats/2.1.0/cats-2.1.0.pom from clojars
Retrieving funcool/cats/2.1.0/cats-2.1.0.jar from clojars
nREPL server started on port 51754 on host 127.0.0.1 - nrepl://127.0.0.1:51754
REPL-y 0.3.7, nREPL 0.2.12
Clojure 1.8.0
Java HotSpot(TM) 64-Bit Server VM 1.8.0_131-b11
    Docs: (doc function-name-here)
          (find-doc "part-of-name-here")
  Source: (source function-name-here)
 Javadoc: (javadoc java-object-or-class-here)
    Exit: Control+D or (exit) or (quit)
 Results: Stored in vars *1, *2, *3, an exception in *e

user=> (use 'cats.core)
WARNING: when already refers to: #'clojure.core/when in namespace: user, being replaced by: #'cats.core/when
WARNING: filter already refers to: #'clojure.core/filter in namespace: user, being replaced by: #'cats.core/filter
WARNING: sequence already refers to: #'clojure.core/sequence in namespace: user, being replaced by: #'cats.core/sequence
nil
user=> (use 'cats.builtin)
nil
user=> (fmap (fn [v] (fmap #(* 2 %) v)) #{[1 2 2]})
#{#{4 2}}

but it's still doesn't work.

What do you mean by

You could also clean your cache so that leiningen fetches the most current master version.

?
I thought that Leiningen fetches from clojars, or maven central, not GitHub.
And the latest version on Clojars is 2.1.0.

@sovelten
Copy link
Collaborator

sovelten commented Nov 1, 2017

In my case leiningen gets the most recent version, I don't know exactly why. My repositories are like this:

  :repositories  [["central"  {:url "http://repo1.maven.org/maven2/" :snapshots false}]
                         ["clojars"  {:url "https://clojars.org/repo/"}]]

In any case, I think the latest changes are worth a version bump

@dustingetz
Copy link

+1, vendoring master fixed our problems with nested ctx too

@dszakallas
Copy link
Author

Is this project dead? I only asked for releasing an already implemented fix 3 months ago, and it is still not done.

@yurrriq
Copy link
Collaborator

yurrriq commented Dec 28, 2017

I don't use Clojure daily anymore, but I think I still have commit rights here still and could try to help fix things up, if needed.

@dszakallas
Copy link
Author

@yurrriq The fix is already implemented and on master (4a5853e), but hasn't been released yet.

@yurrriq
Copy link
Collaborator

yurrriq commented Dec 28, 2017

So we just need to release a new version then? I don't think I have permissions to push to clojars.

/cc @niwinz

@niwinz
Copy link
Member

niwinz commented Jan 11, 2018

I go to release it right now!

@niwinz
Copy link
Member

niwinz commented Jan 11, 2018

Done.

@niwinz niwinz closed this as completed Jan 11, 2018
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

5 participants