slagyr / speclj

pronounced "speckle": a TDD/BDD framework for Clojure.
MIT License
459 stars 58 forks source link

Reloads lose namespaces #109

Closed thesoftwarephilosopher closed 9 years ago

thesoftwarephilosopher commented 10 years ago

Reproduction steps

  1. Run tests in an existing project using auto-run mode
  2. Define a test that calls a non-existent function
  3. Implement the function in another file

    What should happen

All tests should pass again.

What actually happens

The tests fail with java.lang.Exception: No namespace: some.random.name.space and an actual namespace. Going into the file for that namespace and saving the file will make this failure go away, but the test will fail with another namespace error. This usually repeats about 4 or 5 times for me before it goes to green.

EDIT

I can reproduce this more simply:

  1. Run test suite in auto-run mode
  2. Change anything in any non-test file and save it
trptcolin commented 10 years ago

I just created a new project via lein new speclj foo, and so far I'm not able to reproduce this.

  1. Does a fresh project (via lein new speclj foo) have the problem for you?
    • If not, is there any trimmed-down project you can share that does, so we can see what's different?
    • If so, what leiningen version are you on? (I'm assuming you're on speclj 3.1.0, but that version might help see what the difference is too.)
  2. There is no number 2 that I can think of right now.
thesoftwarephilosopher commented 10 years ago

I was using 3.0.1 when I reported this bug. Just upgraded to 3.1.0 today and cannot reproduce (although I didn't try very hard). Closing as probably fixed already.

thesoftwarephilosopher commented 10 years ago

I was able to reproduce this again this week, although I still haven't figured out a reliable way to create a small reproducable test-case. It's a very frustrating bug.

slagyr commented 9 years ago

I'm also unable to reproduce. And you're latest "Edit" is very suspicious. Editing and saving any file, including non-test files, is something I am ALWAYS doing and I do not see there error you describe.

Considerations:

Closing for now.

thesoftwarephilosopher commented 9 years ago

@slagyr Good points. To answer your questions:

  1. My IDE isn't creating any extra files when I save.
  2. It's a regular Mac OS X file system (HFS+ Journaled, case sensitive) in Yosemite on a Mac Pro, so I guess it's a pretty average file system.

Either way, someone else seems to be having a similar problem in #127. We should merge these two issues into that one.