module: add sourceURL magic comment hinting generated source#54402
Merged
nodejs-github-bot merged 2 commits intonodejs:mainfrom Aug 20, 2024
Merged
module: add sourceURL magic comment hinting generated source#54402nodejs-github-bot merged 2 commits intonodejs:mainfrom
nodejs-github-bot merged 2 commits intonodejs:mainfrom
Conversation
Collaborator
|
Review requested:
|
Source map is not necessary in strip-only mode. However, to map the source file in debuggers to the original TypeScript source, add a sourceURL magic comment to hint that it is a generated source.
a6a10cf to
38302fc
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #54402 +/- ##
==========================================
+ Coverage 87.08% 87.31% +0.23%
==========================================
Files 648 648
Lines 182341 182362 +21
Branches 34982 34984 +2
==========================================
+ Hits 158783 159224 +441
+ Misses 16831 16392 -439
- Partials 6727 6746 +19
|
aduh95
approved these changes
Aug 16, 2024
cola119
approved these changes
Aug 16, 2024
Collaborator
Member
Author
|
Stress test on rhel8-arm64: https://ci.nodejs.org/job/node-stress-single-test/523 |
marco-ippolito
approved these changes
Aug 19, 2024
Member
Author
|
Improving the test case to be more stable on inspector disconnection. It should be a separate issue (with about 1/20 reproduce rate). backtrace of SEGVThread 7 Crashed: 0 node 0x100e99604 node::inspector::TcpHolder::WriteRaw(std::__1::vector> const&, void (*)(uv_write_s*, int)) + 48 (inspector_socket.cc:733) 1 node 0x100e9b798 node::inspector::ProtocolHandler::WriteRaw(std::__1::vector> const&, void (*)(uv_write_s*, int)) + 20 (inspector_socket.cc:666) [inlined] 2 node 0x100e9b798 node::inspector::(anonymous namespace)::WsHandler::Write(std::__1::vector>) + 276 (inspector_socket.cc:406) 3 node 0x100e99d24 node::inspector::InspectorSocket::Write(char const*, unsigned long) + 104 (inspector_socket.cc:819) 4 node 0x100e90830 node::inspector::(anonymous namespace)::RequestToServer::Dispatch(node::inspector::InspectorSocketServer*) const + 52 (inspector_io.cc:83) [inlined] 5 node 0x100e90830 node::inspector::(anonymous namespace)::RequestQueueData::DoDispatch() + 232 (inspector_io.cc:153) [inlined] 6 node 0x100e90830 node::inspector::(anonymous namespace)::RequestQueueData::RequestQueueData(uv_loop_s*)::'lambda'(uv_async_s*)::operator()(uv_async_s*) const + 244 (inspector_io.cc:105) [inlined] 7 node 0x100e90830 node::inspector::(anonymous namespace)::RequestQueueData::RequestQueueData(uv_loop_s*)::'lambda'(uv_async_s*)::__invoke(uv_async_s*) + 272 (inspector_io.cc:102) 8 node 0x101ac2c04 uv__async_io + 276 (async.c:176) 9 node 0x101ad5ef4 uv__io_poll + 1032 (kqueue.c:385) 10 node 0x101ac319c uv_run + 412 (core.c:448) 11 node 0x100e8fe54 node::inspector::InspectorIo::ThreadMain() + 1632 (inspector_io.cc:319) 12 libsystem_pthread.dylib 0x18d571f94 _pthread_start + 136 13 libsystem_pthread.dylib 0x18d56cd34 thread_start + 8 |
Collaborator
Collaborator
Collaborator
Collaborator
|
Landed in 5376e69 |
RafaelGSS
pushed a commit
that referenced
this pull request
Aug 25, 2024
Source map is not necessary in strip-only mode. However, to map the source file in debuggers to the original TypeScript source, add a sourceURL magic comment to hint that it is a generated source. PR-URL: #54402 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Source map is not necessary in strip-only mode. However, to map the
source file in debuggers to the original TypeScript source, add a
sourceURL magic comment to hint that it is a generated source.
This has no runtime side-effects.
--enable-source-mapswill skipsources without sourceMappingURL magic comments since error stack
remapping is not needed.
This improves debugger experiences like VSCode JS Debugger allowing
setting breakpoints on the original typescript source files, instead
of popping up the stripped source contents.