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

Split out the caching and source-map-fixing into separate modules. #117

Closed
jamestalmage opened this issue Dec 26, 2015 · 8 comments
Closed

Comments

@jamestalmage
Copy link
Member

NYC now does 3 things:

  1. Installs an (optionally cacheable) transform via append-transform that captures coverage and source-map data.
  2. Remaps istanbul reports using source-map data.
  3. Uses spawn-wrap to make all this happen across forked processes.

I think 1 and 2 need to be split out.

@sindresorhus
Copy link
Member

👍

@novemberborn
Copy link
Contributor

Remaps istanbul reports using source-map data.

There's https://github.com/SitePen/remap-istanbul but it already does way too many things besides remapping the reports.

Even if 1 and 2 are split out they may still end up coupled to each other. Not sure I see the point, unless they're moved into Istanbul itself maybe.

@jamestalmage
Copy link
Member Author

I think 1 would almost certainly depend on 2 (but not necessarily the other way around).

Not sure I see the point

It would allow all our hard work getting source-maps and caching working to be used in other contexts.

unless they are moved into Istanbul itself maybe

That may be the ideal solution, but I have got to imagine that there is a good reason that source-map support hasn't found it's way to master yet over there.

// @gotwarlost

@novemberborn
Copy link
Contributor

It would allow all our hard work getting source-maps and caching working to be used in other contexts.

Sure, assuming those other contexts discover the modules.

@jamestalmage
Copy link
Member Author

Sure, assuming those other contexts discover the modules.

You take the risk of being ignored every time you type npm publish. That's just life.

For my part, I am really curious how much overhead spawn-wrap and foreground-child add? How much faster would AVA be if we used those split out modules and provided a --coverage option that called them in every forked process? Our babel.js script runs before any user scripts, so we can already provide many of the guarantees that spawn-wrap provides for NYC. Of course, that wouldn't cover users who are going to be forking again from within their test files. In that case - they need to use NYC.

@bcoe
Copy link
Member

bcoe commented Jun 27, 2016

@jamestalmage it looks like @gotwarlost has been working on his own source-map library as part of the istanbuljs org, could we look at merging efforts?

@stale stale bot added the wontfix label Jan 6, 2019
@stale stale bot added the stale label Mar 7, 2019
@istanbuljs istanbuljs deleted a comment from stale bot Mar 7, 2019
@stale stale bot removed the stale label Mar 7, 2019
@istanbuljs istanbuljs deleted a comment from stale bot Mar 7, 2019
@coreyfarrell
Copy link
Member

Please correct me if I'm wrong but this is resolved by the existence of caching-transform and istanbul-lib-source-maps?

@stale stale bot added the stale label May 6, 2019
@istanbuljs istanbuljs deleted a comment from stale bot May 6, 2019
@stale stale bot removed the stale label May 6, 2019
@coreyfarrell
Copy link
Member

I think caching is resolved and any further source-map work should be incorporated to istanbul-lib-source-maps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants