-
-
Notifications
You must be signed in to change notification settings - Fork 580
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
Continue trying package recognizers even if an Exception has been encountered #3971
Comments
…ition #3971 Signed-off-by: Jono Yang <[email protected]>
Ideally we should be catching this exception in the DatafileHandler on the go inspector side (if this is coming from inside https://github.com/aboutcode-org/go-inspector/blob/main/src/go_inspector/binary.py#L482) and yield nothing instead of failing there. These exceptions usually are catched and swallowed at https://github.com/aboutcode-org/scancode-toolkit/blob/develop/src/scancode/api.py#L268 which is also not ideal, we should probably add these to the resource errors instead too. But since the DataFile handlers at https://github.com/aboutcode-org/scancode-toolkit/blob/develop/src/packagedcode/__init__.py#L52 have an order (because some overlap) I'm not entirely sure of unintended consequences here, but the test suite does not seem to fail so we can look at these when we find them. So this is probably fine in the short term to update go inspector, we can refactor this later (we also need to move the packagedata creation part from go inspector soon too), so let's keep the issue open. |
Signed-off-by: Jono Yang <[email protected]> Continue when an exception has been encountered during package recognition aboutcode-org#3971 Signed-off-by: Jono Yang <[email protected]> Declare ngram variable in select_ngrams Signed-off-by: Jono Yang <[email protected]> Signed-off-by: Varsha U N <[email protected]> add support to parse labels in dockerfile Signed-off-by: Varsha U N <[email protected]> Signed-off-by: Varsha U N <[email protected]>
…ition aboutcode-org#3971 Signed-off-by: Jono Yang <[email protected]>
…ition aboutcode-org#3971 Signed-off-by: Jono Yang <[email protected]> Signed-off-by: Varsha U N <[email protected]>
I am updating go-inspector to v0.5.0 and I am failing the test
test_recognize_winexe
(https://github.com/aboutcode-org/scancode-toolkit/blob/develop/tests/packagedcode/test_recognize.py#L134) with the exception raised by go-inspector saying "Failed to parse file: no valid pclntab found".I don't think it should matter if go-inspector can't parse the file, we should continue and try the other recognizers instead of stopping.
The text was updated successfully, but these errors were encountered: