@@ -503,13 +503,23 @@ function flatten(data::Vector, lidict::LineInfoDict)
503
503
return (newdata, newdict)
504
504
end
505
505
506
+ const SRC_DIR = normpath (joinpath (Sys. BUILD_ROOT_PATH, " src" ))
507
+
506
508
# Take a file-system path and try to form a concise representation of it
507
509
# based on the package ecosystem
508
510
function short_path (spath:: Symbol , filenamecache:: Dict{Symbol, Tuple{String,String,String}} )
509
511
return get! (filenamecache, spath) do
510
512
path = Base. fixup_stdlib_path (string (spath))
513
+ path_norm = normpath (path)
511
514
possible_base_path = normpath (joinpath (Sys. BINDIR, Base. DATAROOTDIR, " julia" , " base" , path))
512
- if isabspath (path)
515
+ lib_dir = abspath (Sys. BINDIR, Base. LIBDIR)
516
+ if startswith (path_norm, SRC_DIR)
517
+ remainder = only (split (path_norm, SRC_DIR, keepempty= false ))
518
+ return (isfile (path_norm) ? path_norm : " " ), " @juliasrc" , remainder
519
+ elseif startswith (path_norm, lib_dir)
520
+ remainder = only (split (path_norm, lib_dir, keepempty= false ))
521
+ return (isfile (path_norm) ? path_norm : " " ), " @julialib" , remainder
522
+ elseif isabspath (path)
513
523
if ispath (path)
514
524
# try to replace the file-system prefix with a short "@Module" one,
515
525
# assuming that profile came from the current machine
0 commit comments