Skip to content

Just my code: introduce a magic path for core modules #16918

Closed

Description

@weinand

Just my code: introduce a magic path for excluding/including core modules, e.g.:

    "skipFiles": [
        "core_modules/*.js"
    ]

In addition we should use the same magic path when showing core modules in the CALLSTACK view. This will fix the bogus path problem #16913.

Activity

  1. added
    debug
    feature-request
    on Dec 8, 2016
  2. weinand commented on Jan 4, 2017

    @weinand
    ContributorAuthor

    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'.

  3. roblourens commented on Jan 4, 2017

    @roblourens
    Member

    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

  4. roblourens commented on Jan 4, 2017

    @roblourens
    Member

    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}".

  5. weinand commented on Jan 4, 2017

    @weinand
    ContributorAuthor

    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.

  6. weinand commented on Jan 6, 2017

    @weinand
    ContributorAuthor

    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.

  7. roblourens commented on Jan 6, 2017

    @roblourens
    Member

    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.

  8. locked and limited conversation to collaborators on Nov 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

debugfeature-request

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions