Fork me on GitHub
#cursive
<
2018-11-30
>
caleb.macdonaldblack02:11:18

Can I commit my configuration for indentation and resolution as a file to my repo?

tony.kay04:11:03

Hm…I’m getting continual reports of cylcic requires when I use the require-macros trick in a cljc file:

tony.kay04:11:27

I get this when I try to use nREPL reload current ns, and I also get it when trying to run tests that will reload nses

tony.kay04:11:53

strange that this doesn’t happen to me on other projects, which makes me think I’ve made a mistake somewhere, but this is not a particularly helpful error message

todo12:11:58

Is there a way to dump the (ns ...) portion of every .cljs .cljc *.clj file ?

potetm12:11:43

@todo tools.namespace has facilities for 1) finding clj(s/c) files, 2) reading the ns declaration

potetm12:11:52

I would assume it could be used to dump them as well.

todo13:11:37

@potetm: Good point. With regards to @tony.kay’s problem above, I'm surprised no one has written a tool that parses all *.ns , looks for loops, and offers sensible errors [ I have run into similarly annoying to debug cyclic dependency issues in the past ]

tony.kay17:11:00

@cfleming What’s strange is all of the code compiles and runs just fine…it’s just in cursive that it is doing this.

tony.kay17:11:38

so that makes me thing the IDE has a bug….perhaps you could try to reproduce locally: https://github.com/fulcrologic/fulcro-incubator The feature/routing-experiment branch. Using deps.edn. Trying to run tests in the IDE for https://github.com/fulcrologic/fulcro-incubator/blob/feature/routing-experiment/src/test/fulcro/incubator/dynamic_routing_test.cljc. (Using IDE action run tests in current NS in an nREPL set up with IntelliJ classpath with Clojure Deps aliases “dev, provided, test” enabled. (at commit 1e17373fca5e04a7f298789f263ff5f5f85f4beb, this has changed based on messages below) Ah, If I split the test out of a CLJC file into a CLJ and CLJS file, then I can run the tests fine.

tony.kay18:11:02

but then, of course, I have a ton of duplicate code (the files are otherwise identical)

tony.kay18:11:04

Ahah! I think I found it. I was using deftest from the workspaces library (which is supposed to emit a deftest)…when I switch back to normal deftest it is fine.

tony.kay18:11:13

not sure why the IDE gives that particular error, but dropping the use of the alternate deftest fixed it.

cfleming20:11:23

@tony.kay Thanks for the repro case, I’ll try that later. I don’t see why that change would affect things though.