From cfedabcdeff0079523d8e0c929c75fbec618b4ae Mon Sep 17 00:00:00 2001 From: Anton Nikolaev Date: Tue, 18 May 2021 08:06:07 -0700 Subject: [PATCH] Attribute error reports with plugin id and version Summary: This diff adds attributing of all error reports with the information about the plugins caused them. To do that we try to map error stack trace to plugins by searching for plugin directories in it. We can do this only for plugins loaded from disk as we are looking for their physical locations in stack. To make it possible to search for multiple plugins in one go we build and maintain a trie containing all the loaded plugins locations. Reviewed By: passy Differential Revision: D28475938 fbshipit-source-id: 59c8ac39ffe54262b1d57f21fad44eb89748dff2 --- desktop/app/package.json | 1 + desktop/yarn.lock | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/desktop/app/package.json b/desktop/app/package.json index 2a6391a4d..4eb800a2b 100644 --- a/desktop/app/package.json +++ b/desktop/app/package.json @@ -19,6 +19,7 @@ "@emotion/react": "^11.4.0", "@emotion/styled": "^11.3.0", "@iarna/toml": "^2.2.5", + "@tanishiking/aho-corasick": "^0.0.1", "@types/archiver": "^5.1.0", "@types/uuid": "^8.0.1", "JSONStream": "^1.3.1", diff --git a/desktop/yarn.lock b/desktop/yarn.lock index e16736821..6c5da9ced 100644 --- a/desktop/yarn.lock +++ b/desktop/yarn.lock @@ -2376,6 +2376,11 @@ dependencies: defer-to-connect "^2.0.0" +"@tanishiking/aho-corasick@^0.0.1": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@tanishiking/aho-corasick/-/aho-corasick-0.0.1.tgz#013180c33d4d8432fbd83d7db51f5d5f79f944e1" + integrity sha512-70Fy5dKDfoaKq9CaWVaSvheCmQ/M7BxNAlQJfL1qUqX5/cyUZpQvK8nGkGSAUtHs7yokOOlOR6+WlIr6GVJrjw== + "@testing-library/dom@^7.28.1", "@testing-library/dom@^7.31.0": version "7.31.0" resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-7.31.0.tgz#938451abd3ca27e1b69bb395d4a40759fd7f5b3b"