-
-
Notifications
You must be signed in to change notification settings - Fork 358
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
feat: add processinfo index, add externalId #1055
Conversation
e92d40e
to
d5a114c
Compare
e4bfd9f
to
2ffe591
Compare
Docs and tests still TK. Future commit message follows. --- feat: add processinfo index, add externalId If a NYC_PROCESSINFO_EXTERNAL_ID environment variable is set, then it is saved in the processinfo as `externalId`. BREAKING CHANGE: This adds a file named 'index.json' to the .nyc_output/processinfo directory, which has a different format from the other files in this dir. Furthermore, when this file is generated, some additional helpful metadata is memoized to the processinfo json files, to minimize the cost of repeated generation. (This isn't necessarily a breaking change, but it is an update to the de facto schema for those files.) As soon as possible, index generation and process tree display should be migrated out to a new 'istanbul-lib-processinfo' library. This opens the door to add features in the v14 release family to improve support for partial/resumed test runs and file watching. - When a process is run with --clean=false and a previously seen externalId, clear away all the coverage files in the set for that externalId. - When a file is changed, a test runner can use the index to determine which tests (by externalId) ought to be re-run.
- Adds a NYC_PROCESS_ID to environment - Adds `parent` to processInfo object, a uuid referring to parent. - Rebase onto processinfo-numeric-pids branch - Avoid re-writing the processinfo/{uuid}.json files Next: - Update process tree output to rely on process index instead of duplicating effort.
Also, remove some unnecessary fields from process infos
feabd74
to
6fa4332
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy with what we have. I'm not sure I want us to document it yet, or if we do document that it is experimental. I think once we have istanbul-lib-processinfo
we can document it from that module.
I think keeping it out of the docs is sensible for now. I've been taking notes in my early sketch of istanbul-lib-processinfo anyway, but I'll probably put that off until tap v13 is finished, since I'll be able to test out some of the concepts ad hoc and see what works. There may be some additional tweaks necessary, but I don't think the data structure needs to change from what it is right now, so we can avoid any semver major changes in the near future. Would you like to squash, or shall I do the honors? |
Lets give it a couple days to see if @addaleax has any comments since she originally implemented the processinfo functionality. If we don't get any objections I'll squash and merge. Probably do a second pre-release of nyc 14 by the middle of the week. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the ping! It’s been a while since I’ve worked on this, but as far as I am able to review it this is good to go :)
THIS IS A WIP COMMIT FOR REVIEW ONLY, DO NOT MERGE
[ ] docsfeat: add processinfo index, add externalId
If a NYC_PROCESSINFO_EXTERNAL_ID environment variable is set, then it is
saved in the processinfo as
externalId
.BREAKING CHANGE: This adds a file named 'index.json' to the
.nyc_output/processinfo directory, which has a different format from the
other files in this dir.
Furthermore, when this file is generated, some additional helpful
metadata is memoized to the processinfo json files, to minimize the cost
of repeated generation. (This isn't necessarily a breaking change, but
it is an update to the de facto schema for those files.)
As soon as possible, index generation and process tree display should be
migrated out to a new 'istanbul-lib-processinfo' library.
This opens the door to add features in the v14 release family to improve
support for partial/resumed test runs and file watching.
externalId, clear away all the coverage files in the set for that
externalId.
which tests (by externalId) ought to be re-run.