Skip to content
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

More QuickJS scanner improvements #5120

Merged
merged 1 commit into from
Jul 6, 2024
Merged

Conversation

nickva
Copy link
Contributor

@nickva nickva commented Jul 5, 2024

  • Fix incorrect handling of view libs. These should be under views not at the top level.

  • Reduce false positive log noise when both results fail with a similar errors like compilation errors or a common TypError but their exact message format will be different. An example I noticed was:

{error,{throw,{compilation_error,<<"SyntaxError: unexpected token in expression: 'if' ...
{error,{throw,{compilation_error,<<"Expression does not eval to a function. ...
  • Make the scanner a bit more resilient and skip unsupported junk like map/views/filters that are not the expected object or types. Previously we assumed if they exist (not undefined) or they will be valid.

@nickva nickva force-pushed the more-quickjs-scanner-improvements branch 2 times, most recently from 9cb4d15 to 2b88712 Compare July 6, 2024 02:14
Copy link
Contributor

@jiahuili430 jiahuili430 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very neat code, really like your solution! valid_views/1, one line of code to extract lib from views. I have some questions about start_or_reset_procs/1.

+1, thank you for fixing the issue.

 * Fix incorrect handling of view `lib`s. These should be under `views` not at the
   top level.

 * Reduce false positive log noise when both results fail with a similar errors like
   compilation errors or a common TypError but their exact message format will be
   different. An example I noticed was:

```
{error,{throw,{compilation_error,<<"SyntaxError: unexpected token in expression: 'if' ...
{error,{throw,{compilation_error,<<"Expression does not eval to a function. ...
```

 * Make the scanner a bit more resilient and skip unsupported junk like
   map/views/filters that are not the expected object or types. Previously we
   asssumed if they exist (no undefined) they will be valid.
@nickva nickva force-pushed the more-quickjs-scanner-improvements branch from 2b88712 to 03c9542 Compare July 6, 2024 19:58
@nickva nickva merged commit e7ed1dc into main Jul 6, 2024
17 checks passed
@nickva nickva deleted the more-quickjs-scanner-improvements branch July 6, 2024 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants