Fork me on GitHub
#calva
<
2023-01-19
>
dangercoder07:01:09

Managed to make the load namespace error reproducible, could someone else try? 🙂 1. create a new ns called foo 2. create a new function in foo called profile 3. from ns bar - require foo and load/eval current file and all dependencies - works 4. in ns bar call (foo/profile) in one of bar’s functions, eval ->> no such var foo/profile

bringe02:01:08

I couldn’t reproduce with the steps you provided. I created the bar ns then ran jack-in, then started at #1.

pez20:01:10

@UBN9SNVB4 can you repro that in a minimal deps project (`deps.edn` with {} + src/foo.clj + src/bar.clj)? From a fresh REPL. I added a minimal project like that to the test-data of the Calva repository: https://github.com/BetterThanTomorrow/calva/tree/dev/test-data/projects/load-bar-requiring-foo I can't reproduce it as is.

dangercoder08:03:30

@U0ETXRFEW I figured out why this happens. It’s when I add new things into files e.g. requires or new namespaces without hitting Save and use load requires/dependencies (my old editor used to auto save, this can be configured in vs-code)

dangercoder08:03:22

I checked the calva source code and realised it will read the files on disk when issuing that command which quickly explained my problem 😄

pez08:03:35

Ah, so when I followed your repro steps, I actually added a step myself. The destructive power of assumptions. 😃