Skip to content

[hl] use classpaths relative_path for get_relative_path #12219

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions src/generators/genhl.ml
Original file line number Diff line number Diff line change
Expand Up @@ -333,18 +333,8 @@ let make_debug ctx arr =
| true -> if (Filename.is_relative p.pfile)
then Filename.concat (Sys.getcwd()) p.pfile
else p.pfile
| false -> try
(* lookup relative path *)
let len = String.length p.pfile in
let base = ctx.com.class_paths#find (fun path ->
let path = path#path in
let l = String.length path in
len > l && String.sub p.pfile 0 l = path
) in
let l = String.length base#path in
String.sub p.pfile l (len - l)
with Not_found ->
p.pfile
| false ->
ctx.com.class_paths#relative_path p.pfile
in
let pos = ref (0,0,Globals.null_pos) in
let cur_file = ref 0 in
Expand Down
Loading