polylith

Vladimir Pouzanov 2024-11-25T10:36:08.411379Z

hi o/ I'm trying to get into polylith with the whole clj/cljs thing. I'm aware of the https://github.com/polyfy/polylith/discussions/301 but I'm curious as to what kids of workarounds people use now. My use case is some code shared between clj and cljs backends (protobuf definitions and generated code) so it feels comfortable to keep those things close. At the same time my package.json has mixed concerns between the backends and frontends right now, because that seems to be the only way to make shadow-cljs be happy in a monorepo. Anyone here with a cljs backend? Can you share your story on code structuring?

tengstrand 2024-11-27T16:07:38.444429Z

I can't answer this question myself, but I suggest that you search for "cljs" here in this channel, to find answers to similar questions.

furkan3ayraktar 2024-11-27T21:14:52.540669Z

I explained how we do it https://clojurians.slack.com/archives/C013B7MQHJQ/p1730218366055059.

👍 1
Vladimir Pouzanov 2024-11-25T17:18:49.373659Z

and on a slightly related issue, where do you put your generated code? I would just dump it to src/gen and add it to my :paths in the component (or use relative-references in JS), but then I get Warning 205: Non top namespace gen.com.example was found in mycomponent . I can't easily store the generated js files outside of src/ because then shadow-cljs won't find them. Is the common approach to let them rest in the main classpath under src/com/example/...?