Skip to content

Integrate Rtrace with ESM bindings #2595

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

Merged
merged 2 commits into from
Dec 22, 2022
Merged

Integrate Rtrace with ESM bindings #2595

merged 2 commits into from
Dec 22, 2022

Conversation

dcodeIO
Copy link
Member

@dcodeIO dcodeIO commented Dec 22, 2022

The Rtrace utility to inspect the inner workings of the runtime must be installed on the respective imports objects, which did not work as-is with ESM bindings

Hence, add a special case to ESM bindings generation to install Rtrace when used, exclude its imports from instrumentation, and import it with a private package specifier so it can be mapped via imports in package.json. Also unbreaks bootstrap:rtraced in so far as that it executes.

  • I've read the contributing guidelines
  • I've added my name and email to the NOTICE file

@CountBleck
Copy link
Member

I spent way too long yesterday (at least two/three hours) trying to hack around ESM/raw bindings to get rtrace to work. I'm glad it's working now.

Should rtrace be added to CI in case it catches errors before faulty PRs are merged? Or is this bug a special case?

@dcodeIO
Copy link
Member Author

dcodeIO commented Dec 22, 2022

Rtrace is used for some of the tests (when asc_trace is specified), but using it on the compiler itself it is slooow / uses too much memory. Perhaps if we could speed it up somehow, but in its current form it'll likely blow every budget imposed by GH actions.

@dcodeIO dcodeIO merged commit 0e0a3c1 into main Dec 22, 2022
@HerrCai0907 HerrCai0907 deleted the esm-rtrace branch October 17, 2023 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants