-
Notifications
You must be signed in to change notification settings - Fork 8
Conversation
fd36788
to
9bf7783
Compare
Hi @dustinbyrne thanks for digging into this. The trace post-processing is rather complex and I remember that the pipeline of modules relies on assertion made earlier. So I don't think you can simply silence assertions. However I agree that producing something is better than panicking. I think the best way to proceed is to try the complex event re-ordering. If it fails (via assertions) we can try a simpler post-processing where we simply make sure the produced appmap is valid but we do not make any guarantee on the order of events. |
9bf7783
to
99d8278
Compare
There are two items blocking this: First, all AppMaps recorded from Jest tests are empty. This may be related to #172 where a transform is being applied. After all, this is using Lastly, Jest command line arguments are not being transformed safely, and I've yet to come up with a strategy which doesn't involve mirroring Jests command line logic. Here are some examples where it breaks down. $ npx jest authn Would result in the following transformed command: $ npx jest --runInBand --setupFilesAfterEnv /module/path.js authn This is incorrect because $ npx jest --runInBand --setupFilesAfterEnv /module/path.js -- authn
$ npx jest --runInBand --setupFilesAfterEnv /module/path.js --testPathPattern authn This is complicated by the fact that the user may add other options to the command line:
Would need to resolve to one of the following:
This is again complicated by the fact that we don't know if |
Ah I did not expect |
f25ed49
to
5a1b22c
Compare
The transformer fix is in the works and I've opened a separate issue for the Jest command line arguments (#179). I don't think it's worth waiting for the outstanding items before shipping these. |
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 work. Some information on the failures you had related the two last commits would help. Cheers!
5a1b22c
to
f6f63ac
Compare
Qualified name is required to exclude functions. And computing the qualified name assumes that there is no functions at the root level. So we need to wrap root level functions before exclusion.
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 still have an issue with your removal of the assertion. I made a fix in #185. You could leave the test but it will need to be updated because the qualified name of a root function is with the filename.
15b57a2
to
e03c634
Compare
I've rebased off the branch in #185 and dropped the commit to pass the assertion. The test seems unnecessary without providing an undefined or null parent. |
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.
Brazinga
🎉 This PR is included in version 13.1.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This fixes an issue found while trying to record @appland/scanner and adds some additional test cases.
Resolves #173