{"action":"created","issue":{"url":"https://api.github.com/repos/tolitius/mount/issues/61","repository_url":"https://api.github.com/repos/tolitius/mount","labels_url":"https://api.github.com/repos/tolitius/mount/issues/61/labels{/name}","comments_url":"https://api.github.com/repos/tolitius/mount/issues/61/comments","events_url":"https://api.github.com/repos/tolitius/mount/issues/61/events","html_url":"https://github.com/tolitius/mount/issues/61","id":171737010,"number":61,"title":"question about fun-with-values test/example","user":{"login":"jmarca","id":70304,"avatar_url":"https://avatars.githubusercontent.com/u/70304?v=3","gravatar_id":"","url":"https://api.github.com/users/jmarca","html_url":"https://github.com/jmarca","followers_url":"https://api.github.com/users/jmarca/followers","following_url":"https://api.github.com/users/jmarca/following{/other_user}","gists_url":"https://api.github.com/users/jmarca/gists{/gist_id}","starred_url":"https://api.github.com/users/jmarca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmarca/subscriptions","organizations_url":"https://api.github.com/users/jmarca/orgs","repos_url":"https://api.github.com/users/jmarca/repos","events_url":"https://api.github.com/users/jmarca/events{/privacy}","received_events_url":"https://api.github.com/users/jmarca/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-08-17T19:12:56Z","updated_at":"2016-08-17T22:30:35Z","closed_at":"2016-08-17T20:52:54Z","body":"Not really an issue; probably more a lack of understanding due to my newness to clojure.\r\n\r\nI'm trying to understand your fun-with-value example.\r\n\r\n`lein test` on your code repo works fine, so clearly there isn't a bug.\r\n\r\nHowever, when I try to *use* the approach in my code, I get errors like:\r\n\r\n```\r\n... .mount_test$g cannot be cast to java.util.concurrent.Future\r\n```\r\n\r\nI copied the test file as is into my project.  I'm using boot, not lein, but otherwise it should work the same.\r\n\r\nMy stripped down version of your test is:\r\n\r\n```\r\n(ns calvad.watcher.mount-test\r\n  (:require [clojure.test :as t :refer [is are deftest testing use-fixtures]]\r\n            [mount.core :as mount :refer [defstate]]))\r\n\r\n(alter-meta! *ns* assoc ::load false)\r\n\r\n\r\n(defn g [a b]\r\n  (+ a b))\r\n\r\n(defstate f-args :start g)\r\n\r\n(defn start-states []\r\n  (mount/start #'calvad.watcher.mount-test/f-args))\r\n\r\n(use-fixtures :once #((start-states) (%) (mount/stop)))\r\n\r\n(deftest fun-with-values\r\n  (is (= (@f-args 41 1) 42)))\r\n```\r\n\r\nWhen run, I get \r\n\r\n```\r\nERROR in (fun-with-values) (core.clj:2206)\r\nexpected: (= ((clojure.core/deref f-args) 41 1) 42)\r\n  actual: java.lang.ClassCastException: calvad.watcher.mount_test$g cannot be cast to java.util.concurrent.Future\r\n```\r\n\r\nAny hints on what is missing would be appreciated."},"comment":{"url":"https://api.github.com/repos/tolitius/mount/issues/comments/240569254","html_url":"https://github.com/tolitius/mount/issues/61#issuecomment-240569254","issue_url":"https://api.github.com/repos/tolitius/mount/issues/61","id":240569254,"user":{"login":"jmarca","id":70304,"avatar_url":"https://avatars.githubusercontent.com/u/70304?v=3","gravatar_id":"","url":"https://api.github.com/users/jmarca","html_url":"https://github.com/jmarca","followers_url":"https://api.github.com/users/jmarca/followers","following_url":"https://api.github.com/users/jmarca/following{/other_user}","gists_url":"https://api.github.com/users/jmarca/gists{/gist_id}","starred_url":"https://api.github.com/users/jmarca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmarca/subscriptions","organizations_url":"https://api.github.com/users/jmarca/orgs","repos_url":"https://api.github.com/users/jmarca/repos","events_url":"https://api.github.com/users/jmarca/events{/privacy}","received_events_url":"https://api.github.com/users/jmarca/received_events","type":"User","site_admin":false},"created_at":"2016-08-17T22:30:35Z","updated_at":"2016-08-17T22:30:35Z","body":"Oh.  I never tried that!  But I will also eventually be using this in cljs, so it is good to know."}}
{"actor":{"display_login":"jmarca"}}