node
node copied to clipboard
lib: modify NativeModule to use compileFunction
Modify the NativeModule class to use compileFunction instead of manually wrapping the string source code and then compiling it.
Checklist
- [x]
make -j4 test
(UNIX), orvcbuild test
(Windows) passes - [x] tests and/or benchmarks are included
- [x] documentation is changed or added
- [x] commit message follows commit guidelines
/cc @devsnek @bcoe
@ryzokuken build started: https://ci.nodejs.org/blue/organizations/jenkins/node-test-pull-request-lite-pipeline/detail/node-test-pull-request-lite-pipeline/1347/pipeline
@ryzokuken awesome, thank you for doing this (I'm excited to see if it fixes some of the issues I was seeing around instrumenting internal modules for coverage).
I will get some feedback to you tonight.
@devsnek done! PTAL.
@joyeecheung @jdalton done! PTAL.
@joyeecheung done! PTAL.
CI: https://ci.nodejs.org/job/node-test-pull-request/18227/
@ryzokuken Is this still being worked on? (If yes, should we add an in progress
label? If not, should we close it?)
@Trott it is! The discussion was moved into another sub-change which should be merged soon and unblock this one.
Pointer: https://github.com/nodejs/node/pull/24069
Until that lands, or gets merged into this PR, it will fail the cache generation tests. Although even with that change, this still needs to fix the generator..
@joyeecheung @ryzokuken I believe internal modules no longer have a wrapper prefix? is this work still needed?
Seems like the important issue is https://github.com/nodejs/node/pull/21573
@bcoe IIRC, @joyeecheung took care of this. Working on merging the other one in.
This looks like it may have been abandoned. Should we close this? We can re-open it if someone starts to work on it again?
@Trott I had a talk with @joyeecheung about these, and looks like they still need some work. Please leave it open and I'd try to look deeper into it either later today or next week.
ping @ryzokuken to see if it is moving
I'm super sorry, but I've had no time as of late to finish this. If you don't mind leaving this open, I can try to look into it during vacations later this month or someone else would be interested to pick it up?
@ryzokuken any chance you're able to get to this?
@bnb sorry about that, I'll try to get back to it over the weekend.
This needs a rebase.