Skip to content

Commit

Permalink
(re-)allow include_dependency(directory) (#49244)
Browse files Browse the repository at this point in the history
same for symlinks, adjust docs accordingly and clarify that it refers to the mtime

(cherry picked from commit 93df7e2)
  • Loading branch information
benlorenz authored and KristofferC committed Apr 9, 2023
1 parent c9596ef commit f8a4a37
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions base/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1510,11 +1510,11 @@ end
"""
include_dependency(path::AbstractString)
In a module, declare that the file specified by `path` (relative or absolute) is a
dependency for precompilation; that is, the module will need to be recompiled if this file
changes.
In a module, declare that the file, directory, or symbolic link specified by `path`
(relative or absolute) is a dependency for precompilation; that is, the module will need
to be recompiled if the modification time of `path` changes.
This is only needed if your module depends on a file that is not used via [`include`](@ref). It has
This is only needed if your module depends on a path that is not used via [`include`](@ref). It has
no effect outside of compilation.
"""
function include_dependency(path::AbstractString)
Expand Down Expand Up @@ -2790,7 +2790,7 @@ end
end
for chi in includes
f, ftime_req = chi.filename, chi.mtime
if !isfile(f)
if !ispath(f)
_f = fixup_stdlib_path(f)
if isfile(_f) && startswith(_f, Sys.STDLIB)
# mtime is changed by extraction
Expand Down

0 comments on commit f8a4a37

Please sign in to comment.