build(aio): improve ignored example file error message#19265
build(aio): improve ignored example file error message#19265petebacondarwin wants to merge 2 commits into
Conversation
|
Consider reviewing the changes to the spec files with whitespace changes ignored. |
|
You can preview b124ea4 at https://pr19265-b124ea4.ngbuilds.io/. |
There was a problem hiding this comment.
AFAICT, examplePaths will be relative, but filteredExamplePaths will be absolute.
So, this test won't work (and the current tests won't catch this).
There was a problem hiding this comment.
I believe that you know wrong in this case.
There was a problem hiding this comment.
I think the problem stems from the resolve mapping, right? I tested this by using yarn docs with changes to gitignore. I suspect that the resolve is effectively a noop.
There was a problem hiding this comment.
I said "AFAICT" not "AFAIK" 😃 (I never know wrong 😛)
So, which part is wrong? exampleFiles being relative or filteredExampleFiles being absolute?
(I made my assumption based on this line, btw.)
There was a problem hiding this comment.
Damn it you are right!
There was a problem hiding this comment.
The result was false positives, I was reporting examples as ignored when they were actually missing.
There was a problem hiding this comment.
Actually as it turned out, it does indeed work as it is. The point is that if you get to calling the isExampleFiltered function then you already know that the file will not appear in the filteredExamplePaths list, so it doesn't matter that this will never match!
b124ea4 to
8ccf5b7
Compare
|
Hopefully this should be better |
8ccf5b7 to
84cdc18
Compare
|
You can preview 84cdc18 at https://pr19265-84cdc18.ngbuilds.io/. |
|
You can preview 8ccf5b7 at https://pr19265-8ccf5b7.ngbuilds.io/. |
gkalpak
left a comment
There was a problem hiding this comment.
A couple of optional nitpicks.
LGTM otherwise 👍
There was a problem hiding this comment.
Minor: This is a little confusing imo (as pre-filtered could mean that the paths were filtered in advance 😁).
Maybe Unfiltered or All?
There was a problem hiding this comment.
Consider adding a comment that this method is expected to be called with paths that are not "filteredExamplePaths".
84cdc18 to
b11f8e2
Compare
|
I reworked it completely. PTAL @gkalpak |
|
You can preview b11f8e2 at https://pr19265-b11f8e2.ngbuilds.io/. |
| }, | ||
| /** | ||
| * Call this method to find out if an example was ignored. | ||
| * @param path a relative path to the example file to test for being ignored. |
There was a problem hiding this comment.
Might be worth mentioning that the path is relative to the examples folder.
|
Looking for a cherry-pick to stable too @IgorMinar |
|
Landed in stable as 9624fda |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This will provide a better error message for @wardbell in #18707 (comment)