`require :reload` fails where `load-file` succeeds

Description

Here are steps to reproduce at the REPL:

  • `(c.t.n.r/refresh)` succeeds

  • Modify any file in the classpath

  • `(c.t.n.r/refresh)` fails from not having found certain namespace(s) (not always the same one(s))

This always happens with a particular project, but no (known) others of relatively similar complexity. AOT compilation/execution works with the project in question, as do `require`s without using `(c.t.n.r/refresh)`. For `(c.t.n.r/refresh)`, `load-file` works in place of `require :reload` in `clojure.tools.namespace.reload/track-reload-one`. It is not known what the root cause of this bug is beyond `require :reload`, or why `load-file` works instead, but it's a simple enough patch with no known downsides. For now I'm hot-swapping code every time at the REPL.

A fork is available at https://github.com/alexandergunnarson/tools.namespace from which I can submit a patch if desired.

Environment

  • Version 0.2.11

  • Mac OS 10.13., Java 8., Clojure 1.8.0

Assignee

Stuart Sierra

Reporter

import

Labels

None

Approval

None

Patch

None

Priority

Minor
Configure