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
{{ message }}
Repository navigation
Just my code: introduce a magic path for core modules #16918
roblourens any suggestion what 'magic path' (or better: 'magic segment') to use for core modules?
To prevent collisions with real path segments, we could use a special character like '💻' alone or combine it with a selector, e.g. '💻core_modules'.
We could use just "*.js" as a glob for js files that aren't under any path? I wouldn't want to use a character that I can't type, and any magic path will end up having collisions.
We could also special case it with a new flag, "skipNodeInternals": true
Actually, that wouldn't work under what node2 does, which is to allow giving just the name of a file to skip, even if it's under some path. Would have to walk that back to use "*.js".
Could allow "^*.js" as a pseudo-regex, don't know if that's confusing. Or a special selector like "{node_internals}".
roblourens"{node_internals}" is already glob syntax.
How would you like node2's internal modules be presented in the CALLSTACK view? Today node1's internal modules show up as /<scriptid>/<name> (see bug #16913). If we could find a better representation for this, we could use that for the skipFiles glob pattern as well.
I will introduce a magic segment <node_internals> for internal node modules. With this it is possible to use a glob pattern "<node_internals>/**/*.js" for skipping over internal node modules.
This will also be triggered if anyone evals a script and gives it a sourceURL of some name that isn't an absolute path. I don't think that would be very common in Node, but there's always some weird library, just FYI in case it ever comes up. Maybe we would have to hardcode the list of node script names as a workaround.
Activity
weinand commentedon Jan 4, 2017
roblourens any suggestion what 'magic path' (or better: 'magic segment') to use for core modules?
To prevent collisions with real path segments, we could use a special character like '💻' alone or combine it with a selector, e.g. '💻core_modules'.
roblourens commentedon Jan 4, 2017
We could use just
"*.js"as a glob for js files that aren't under any path? I wouldn't want to use a character that I can't type, and any magic path will end up having collisions.We could also special case it with a new flag,
"skipNodeInternals": trueroblourens commentedon Jan 4, 2017
Actually, that wouldn't work under what node2 does, which is to allow giving just the name of a file to skip, even if it's under some path. Would have to walk that back to use "*.js".
Could allow
"^*.js"as a pseudo-regex, don't know if that's confusing. Or a special selector like"{node_internals}".weinand commentedon Jan 4, 2017
roblourens
"{node_internals}"is already glob syntax.How would you like node2's internal modules be presented in the CALLSTACK view? Today node1's internal modules show up as
/<scriptid>/<name>(see bug #16913). If we could find a better representation for this, we could use that for the skipFiles glob pattern as well.weinand commentedon Jan 6, 2017
I will introduce a magic segment
<node_internals>for internal node modules. With this it is possible to use a glob pattern"<node_internals>/**/*.js"for skipping over internal node modules.roblourens commentedon Jan 6, 2017
This will also be triggered if anyone evals a script and gives it a sourceURL of some name that isn't an absolute path. I don't think that would be very common in Node, but there's always some weird library, just FYI in case it ever comes up. Maybe we would have to hardcode the list of node script names as a workaround.