Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
weinand opened this issue Dec 8, 2016 · 6 comments
Closed

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

weinand opened this issue Dec 8, 2016 · 6 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality
Milestone

Comments

@weinand
Copy link
Contributor

weinand commented Dec 8, 2016

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.

@weinand weinand added debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality labels Dec 8, 2016
@weinand weinand added this to the January 2017 milestone Dec 8, 2016
@weinand weinand self-assigned this Dec 8, 2016
@egamma egamma mentioned this issue Dec 20, 2016
56 tasks
@weinand
Copy link
Contributor Author

weinand commented 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
Copy link
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

@roblourens
Copy link
Member

roblourens commented 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
Copy link
Contributor Author

weinand commented 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
Copy link
Contributor Author

weinand commented 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
Copy link
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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

2 participants