This repository was archived by the owner on Jun 11, 2020. It is now read-only.
feat(definition-parser): include package name in error#788
Open
peterblazejewicz wants to merge 1 commit intomicrosoft:masterfrom
Open
feat(definition-parser): include package name in error#788peterblazejewicz wants to merge 1 commit intomicrosoft:masterfrom
peterblazejewicz wants to merge 1 commit intomicrosoft:masterfrom
Conversation
Contributor
Author
|
sample for the context, here is an output of the DT npm test
> definitely-typed@0.0.3 test /Users/piotrblazejewicz/git/DefinitelyTyped
> node node_modules/types-publisher/bin/tester/test.js --run-from-definitely-typed
Clean data
Clean logs
Clean output
Using local Definitely Typed at /Users/piotrblazejewicz/git/DefinitelyTyped.
Parsing definitions...
Found 6791 packages.
Parsing in parallel...
Error: The latest version is 2.2, so the subdirectory 'v2' is not allowed; since it applies to any 2.* version, up to and including 2.2.
at /Users/piotrblazejewicz/git/DefinitelyTyped/node_modules/types-publisher/bin/lib/definition-parser.js:31:19
at Array.map (<anonymous>)
at Object.getTypingInfo (/Users/piotrblazejewicz/git/DefinitelyTyped/node_modules/types-publisher/bin/lib/definition-parser.js:28:43)
at /Users/piotrblazejewicz/git/DefinitelyTyped/node_modules/types-publisher/bin/lib/definition-parser-worker.js:17:50
at Object.logUncaughtErrors (/Users/piotrblazejewicz/git/DefinitelyTyped/node_modules/types-publisher/bin/util/util.js:78:38)
at process.<anonymous> (/Users/piotrblazejewicz/git/DefinitelyTyped/node_modules/types-publisher/bin/lib/definition-parser-worker.js:15:16)
at process.emit (events.js:210:5)
at emit (internal/child_process.js:876:12)
at processTicksAndRejections (internal/process/task_queues.js:81:21)
Error: Parsing failed.
at fail (/Users/piotrblazejewicz/git/DefinitelyTyped/node_modules/types-publisher/bin/util/util.js:272:20)
at ChildProcess.<anonymous> (/Users/piotrblazejewicz/git/DefinitelyTyped/node_modules/types-publisher/bin/util/util.js:261:21)
at ChildProcess.emit (events.js:210:5)
at finish (internal/child_process.js:861:14)
at processTicksAndRejections (internal/process/task_queues.js:75:11)
npm ERR! Test failed. See above for more details.the stack trace has no notion of the package being parsed. ...
Parsing in parallel...
Error: The latest version of the 'terser-webpack-plugin' package is 2.2, so the subdirectory 'v2' is not allowed; since it applies to any 2.* version, up to and including 2.2.
at /Users/piotrblazejewicz/git/DefinitelyTyped/node_modules/types-publisher/bin/lib/definition-parser.js:31:19
at Array.map (<anonymous>)
...after seeing correct report I could issue: git clean -fxdto clean local artifacts, install dependencies and run tests again. |
This proposed change is intended to allow developers quickly figure out the real reason of `getTypingInfo` failing due to version mismatch. Current error message and related stack trace does not contain a clue about the package failing and with the context of DT repository and local development artifacts, this removes the problem with definition parser failing on the stale data from local repository (non tracked folders, etc). Thanks!
ad550b8 to
cfe160b
Compare
sandersn
approved these changes
Jun 10, 2020
Member
sandersn
left a comment
There was a problem hiding this comment.
I'll port this to DefinitelyTyped-tools.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This proposed change is intended to allow developers quickly figure out
the real reason of
getTypingInfofailing due to version mismatch.Current error message and related stack trace does not contain a clue
about the package failing and with the context of DT repository and
local development artifacts, this removes the problem with definition
parser failing on the stale data from local repository (non tracked
folders, etc).
Thanks!