You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need the feature to recognize and analyze calls to Node standard library while Jelly does not support it yet.
My planning solution:
Download the source code of the standard lib from https://github.com/nodejs/node/tree/main/lib and cache them in a cache directory like /tmp/node-lib/ if cache does not exist.
The version of code can be determined by process.version
Resolve the path of a builtin module with the code having been downloaded in this part:
requireModule(str: string,resultVar: ConstraintVar|undefined,path: NodePath): ModuleInfo|DummyModuleInfo|undefined{// see requireModule in modulefinder.ts
Process them as a 3rd party dependency and I think it can work
Clear cache after finishing all analysis
Some details
Downloading the source code should be completed before starting the analysis to avoid importing the complexity of async behaviors in many sync functions
Provide some options about this:
a. --ignore-builtin to disable this feature and ignore all calls to standard library such as http.get() just like what it is now. It will not download code.
b. --ignore-dependencies will not analyze code inside builtin modules, which is the same as 3rd party lib.
b. --cache-dir to specify the cache directory
c. --keep-cache to keep the source code cache when analysis is finished.
How about my solution? I am working for this feature since I need it urgently. If it's okay after discussion, I'll open a PR when I finish it.
The text was updated successfully, but these errors were encountered:
Hi @werifu, thanks for looking into this! Improving the support for the Node.js standard library is on our TODO. I'm not sure the best approach is to include the library source code in the analysis, if that's what you suggest. Contact me on [email protected], then we can talk about different approaches.
I need the feature to recognize and analyze calls to Node standard library while Jelly does not support it yet.
My planning solution:
/tmp/node-lib/
if cache does not exist.The version of code can be determined by
process.version
jelly/src/analysis/operations.ts
Line 384 in 4b95271
Some details
a.
--ignore-builtin
to disable this feature and ignore all calls to standard library such ashttp.get()
just like what it is now. It will not download code.b.
--ignore-dependencies
will not analyze code inside builtin modules, which is the same as 3rd party lib.b.
--cache-dir
to specify the cache directoryc.
--keep-cache
to keep the source code cache when analysis is finished.How about my solution? I am working for this feature since I need it urgently. If it's okay after discussion, I'll open a PR when I finish it.
The text was updated successfully, but these errors were encountered: