@@ -503,13 +503,22 @@ 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
+ const LIB_DIR = normpath (joinpath (Sys. BUILD_ROOT_PATH, " usr" , " lib" ))
508
+
506
509
# Take a file-system path and try to form a concise representation of it
507
510
# based on the package ecosystem
508
511
function short_path (spath:: Symbol , filenamecache:: Dict{Symbol, Tuple{String,String,String}} )
509
512
return get! (filenamecache, spath) do
510
513
path = Base. fixup_stdlib_path (string (spath))
511
514
possible_base_path = normpath (joinpath (Sys. BINDIR, Base. DATAROOTDIR, " julia" , " base" , path))
512
- if isabspath (path)
515
+ if startswith (path, SRC_DIR)
516
+ remainder = only (split (path, SRC_DIR, keepempty= false ))
517
+ return (isfile (path) ? path : " " ), " @src" , remainder
518
+ elseif startswith (path, LIB_DIR)
519
+ remainder = only (split (path, LIB_DIR, keepempty= false ))
520
+ return (isfile (path) ? path : " " ), " @lib" , remainder
521
+ elseif isabspath (path)
513
522
if ispath (path)
514
523
# try to replace the file-system prefix with a short "@Module" one,
515
524
# assuming that profile came from the current machine
0 commit comments