nqp icon indicating copy to clipboard operation
nqp copied to clipboard

--profile uses wrong prefix to find template.html

Open zopsicle opened this issue 6 years ago • 2 comments

This line uses the MoarVM prefix to find template.html, whereas the file is in fact under the NQP prefix:

https://github.com/perl6/nqp/blob/fd8a7e5f9255d062e230cb2774dbf25c3d254127/src/vm/moar/HLL/Backend.nqp#L618

Error when running with --profile:

Could not locate profiler/template.html; should have been at /nix/store/b74nh0lhimgjpifrxclmgw0m55jakdy6-MoarVM-2019.07/share/nqp/lib/profiler/template.html; outputting sql data instead

If MoarVM and NQP are configured using different prefixes then this file cannot be found when running with --profile.

Example script to find template.html when using my MoarVM and NQP prefixes:

moarvmPrefix=/nix/store/b74nh0lhimgjpifrxclmgw0m55jakdy6-MoarVM-2019.07
nqpPrefix=/nix/store/358djk9pmr1f3ia9272vvkysyvzjgx0a-nqp-2019.07
find $moarvmPrefix -name '*.html'
find $nqpPrefix -name '*.html'

Output:

/nix/store/358djk9pmr1f3ia9272vvkysyvzjgx0a-nqp-2019.07/share/nqp/lib/profiler/template.html

zopsicle avatar Jul 28 '19 08:07 zopsicle

Is this still an issue?

lizmat avatar Feb 05 '20 11:02 lizmat

@lizmat Yes, the issue persists in 2020.02.1. I looked into it but there doesn’t yet seem to be a way to retrieve the NQP prefix from Raku code.

I’m not very familiar with NQP yet, but I’ll make a PR soon.

zopsicle avatar Mar 30 '20 12:03 zopsicle