Files removed after non-canonical directory scan

Description

If a directory is scanned twice with the same directory, but with different (non-canonical) root directories supplied to c.t.n.dir/scan-dirs, files in the directory will be considered "deleted" and subsequently "unloaded" by c.t.n.reload.

This can happen after using c.t.n.repl/set-refresh-dirs with non-canonical (i.e. local) directory paths.

Steps to reproduce

In a shell:

Copy the following JAR files into the lib directory:

Back in the shell, in the project directory:

The foo namespace should still exist after the second call to refresh, but it has been removed. Calling refresh a third time will not recover the file, because its timestamp has not changed since the previous call.

Note that this does not happen if the foo namespace has no dependencies, because it will not be present in the tracker's dependency map and therefore is never considered as a candidate for unloading.

Environment

tools.namespace 0.3.0-*

Activity

Show:
Stuart Sierra
April 25, 2017, 10:18 PM

Fixed in 0.3.0-alpha4

Completed
Your pinned fields
Click on the next to a field label to start pinning.

Assignee

Stuart Sierra

Reporter

Stuart Sierra