Skip to content
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

src,agents: add support for source code collection #240

Conversation

santigimeno
Copy link
Member

The runtime now stores the scriptId and url or path of all the loaded cjs and esm modules.
A new grpc command has been added to retrieve the source code for any scriptId-url|path pair by reading the source code from file. In case the specific scriptId-url|path pair wasn't stored, it returns an error.
In the rare case where a ESM is not loaded from a file URL, the code would be stored on loading time.

@santigimeno santigimeno self-assigned this Dec 18, 2024
@santigimeno santigimeno force-pushed the santi/investigate_source_code_serializing branch from 13efe55 to 56e0a0f Compare December 18, 2024 17:46
The runtime now stores the `scriptId` and `url` or `path` of all the
loaded cjs and esm modules.
A new grpc command has been added to retrieve the source code for any
`scriptId`-`url|path` pair by reading the source code from file.
In case the specific `scriptId`-`url|path` pair wasn't stored, it
returns an error.
In the rare case where a ESM is not loaded from a file URL, the code
would be stored on loading time.
@santigimeno santigimeno force-pushed the santi/investigate_source_code_serializing branch from 56e0a0f to ba7c3b2 Compare December 20, 2024 18:14
@santigimeno
Copy link
Member Author

I update the PR to have a store for every thread and not a single global thread: scriptIds are not unique across threads.

santigimeno added a commit that referenced this pull request Dec 30, 2024
The runtime now stores the `scriptId` and `url` or `path` of all the
loaded cjs and esm modules.
A new grpc command has been added to retrieve the source code for any
`scriptId`-`url|path` pair by reading the source code from file.
In case the specific `scriptId`-`url|path` pair wasn't stored, it
returns an error.
In the rare case where a ESM is not loaded from a file URL, the code
would be stored on loading time.

PR-URL: #240
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
@santigimeno
Copy link
Member Author

Landed in 1d1560f

@santigimeno santigimeno deleted the santi/investigate_source_code_serializing branch December 30, 2024 10:14
santigimeno added a commit that referenced this pull request Jan 3, 2025
The runtime now stores the `scriptId` and `url` or `path` of all the
loaded cjs and esm modules.
A new grpc command has been added to retrieve the source code for any
`scriptId`-`url|path` pair by reading the source code from file.
In case the specific `scriptId`-`url|path` pair wasn't stored, it
returns an error.
In the rare case where a ESM is not loaded from a file URL, the code
would be stored on loading time.

PR-URL: #240
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
santigimeno added a commit that referenced this pull request Jan 9, 2025
The runtime now stores the `scriptId` and `url` or `path` of all the
loaded cjs and esm modules.
A new grpc command has been added to retrieve the source code for any
`scriptId`-`url|path` pair by reading the source code from file.
In case the specific `scriptId`-`url|path` pair wasn't stored, it
returns an error.
In the rare case where a ESM is not loaded from a file URL, the code
would be stored on loading time.

PR-URL: #240
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
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