@@ -520,6 +520,7 @@ Use the `pkgdata` version if the files are supplied using relative paths.
520520function init_watching (pkgdata:: PkgData , files= srcfiles (pkgdata))
521521 udirs = Set {String} ()
522522 for file in files
523+ file = String (file):: String
523524 dir, basename = splitdir (file)
524525 dirfull = joinpath (basedir (pkgdata), dir)
525526 already_watching_dir = haskey (watched_files, dirfull)
@@ -643,16 +644,19 @@ function handle_deletions(pkgdata, file)
643644 fi = maybe_parse_from_cache! (pkgdata, file)
644645 maybe_extract_sigs! (fi)
645646 mexsold = fi. modexsigs
646- filep = normpath (joinpath (basedir (pkgdata), file))
647+ idx = fileindex (pkgdata, file)
648+ filep = pkgdata. info. files[idx]
649+ if isa (filep, AbstractString)
650+ filep = normpath (joinpath (basedir (pkgdata), file))
651+ end
647652 topmod = first (keys (mexsold))
648- fileok = file_exists (filep)
653+ fileok = file_exists (String ( filep) :: String )
649654 mexsnew = fileok ? parse_source (filep, topmod) : ModuleExprsSigs (topmod)
650655 if mexsnew != = nothing
651656 delete_missing! (mexsold, mexsnew)
652657 end
653658 if ! fileok
654659 @warn (" $filep no longer exists, deleted all methods" )
655- idx = fileindex (pkgdata, file)
656660 deleteat! (pkgdata. fileinfos, idx)
657661 deleteat! (pkgdata. info. files, idx)
658662 wl = get (watched_files, basedir (pkgdata), nothing )
@@ -875,7 +879,7 @@ it defaults to `Main`.
875879
876880If this produces many errors, check that you specified `mod` correctly.
877881"""
878- function track (mod:: Module , file:: AbstractString ; mode= :sigs , kwargs... )
882+ function track (mod:: Module , file; mode= :sigs , kwargs... )
879883 isfile (file) || error (file, " is not a file" )
880884 # Determine whether we're already tracking this file
881885 id = Base. moduleroot (mod) == Main ? PkgId (mod, string (mod)) : PkgId (mod) # see #689 for `Main`
@@ -913,13 +917,13 @@ function track(mod::Module, file::AbstractString; mode=:sigs, kwargs...)
913917 CodeTracking. _pkgfiles[id] = pkgdata. info
914918 end
915919 push! (pkgdata, relpath (file, pkgdata)=> FileInfo (fm))
916- init_watching (pkgdata, (file,))
920+ init_watching (pkgdata, (String ( file) :: String ,))
917921 pkgdatas[id] = pkgdata
918922 end
919923 return nothing
920924end
921925
922- function track (file:: AbstractString ; kwargs... )
926+ function track (file; kwargs... )
923927 startswith (file, juliadir) && error (" use Revise.track(Base) or Revise.track(<stdlib module>)" )
924928 track (Main, file; kwargs... )
925929end
@@ -985,7 +989,7 @@ try fixing it with something like `push!(LOAD_PATH, "/path/to/my/private/repos")
985989they will not be automatically tracked.
986990(See [`Revise.track`](@ref) to set it up manually.)
987991"""
988- function includet (mod:: Module , file:: AbstractString )
992+ function includet (mod:: Module , file)
989993 prev = Base. source_path (nothing )
990994 file = if prev === nothing
991995 abspath (file)
@@ -1017,7 +1021,7 @@ function includet(mod::Module, file::AbstractString)
10171021 end
10181022 return nothing
10191023end
1020- includet (file:: AbstractString ) = includet (Main, file)
1024+ includet (file) = includet (Main, file)
10211025
10221026"""
10231027 Revise.silence(pkg)
0 commit comments