Fork me on GitHub
#conjure
<
2022-11-25
>
Martynas Maciulevičius08:11:52

What do you think about reloading several namespaces at once? When I work on a project that defines an API which is cached in a specific place then I sometimes end up reloading two namespaces. And for tests in those projects I end up creating a fixture that instead creates and caches some value. But that fixture is sometimes inaccurate if I edit one of the child namespaces and not evaluate the parent namespace. Do you think it's possible to reload several napespaces at once? For instance we could have a comment at the top of the file that could be picked up by Conjure :thinking_face: And that comment would say "hey, I depend on this other namespace so evaluate that one after the current one"

Olical11:11:25

There's already hooks into tools.namespace.reload which does exactly this but automatically, I use it a lot. Mappings https://github.com/Olical/conjure/blob/839fe23a7746f03aa9ef1ebf087501cd6126cf0f/doc/conjure-client-clojure-nrepl.txt#L424-L432 Config https://github.com/Olical/conjure/blob/839fe23a7746f03aa9ef1ebf087501cd6126cf0f/doc/conjure-client-clojure-nrepl.txt#L264-L280 My config to reload my code and then restart my system through mount:

(tset vim.g :conjure#relative_file_root (vim.fn.getcwd))
(tset vim.g :conjure#client#clojure#nrepl#refresh#dirs ["src"])
(tset vim.g :conjure#client#clojure#nrepl#refresh#before "mount.core/stop")
(tset vim.g :conjure#client#clojure#nrepl#refresh#after "mount.core/start")

practicalli-johnny12:11:10

If its a Reitit API or other backend project I'll use https://practical.li/clojure-web-services/repl-driven-development/integrant-repl/ to define components and reload everything that has changed by adding a (tools.namespace.reload/refresh) function in my dev/user.clj file. Although I'll have to try the Conjure rr key binding now :)

timo10:11:31

@olical You're not on the clojuriststogether longterm funding list. Is this a mistake?

Olical11:11:16

Not sure? I don't remember apply or anything like that after my last funding round? Is this different?

timo12:11:59

nothing different I guess. I don't know if you had to apply, was just wondering that you're not on the list.

practicalli-johnny12:11:13

From what I understand, https://www.clojuriststogether.org/news/clojurists-together-long-term-funding-for-2022-2023/ (or now teams) for the long-term funding list. Its not something that Ollical would apply for. For example, if Timo were a Clojurist Together member they could nominate Olical. https://www.clojuriststogether.org/open-source/ are applied for by individuals seeking funding, so Olical can apply for this themselves (as I have done on several occasions)

timo12:11:12

Alright, I might have missed that opportunity. Thanks for clarifying!

👍 1
practicalli-johnny13:11:17

If someone does get funding they also need to consider their tax situation too, especially for the quarterly fellowships contracts as they are for specific work. Contributions to a personal pension plan (not a company pension) can help to offset additional tax that may be due when receiving money for specific work, especially for those in a higher tax bracket. The long term funding may have less tax impact (especially for high tax band earners) as it may be considered non-taxable hobby donations if it not for specific work (although advice should be sought from an accountancy specialist)