-
Notifications
You must be signed in to change notification settings - Fork 853
Convert JSON parsing failures from assertions to exceptions #7531
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
Changes from 6 commits
46eea97
3c99c1b
d88effd
e4c10dd
8947ac5
a6376a6
f8520e6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,7 @@ if(BUILD_FUZZTEST) | |
| include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/third_party/fuzztest) | ||
| else() | ||
| include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/third_party/googletest/googletest/include) | ||
| include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/third_party/googletest/googlemock/include) | ||
| endif() | ||
|
|
||
| set(unittest_SOURCES | ||
|
|
@@ -18,7 +19,6 @@ set(unittest_SOURCES | |
| possible-contents.cpp | ||
| printing.cpp | ||
| scc.cpp | ||
| source-map.cpp | ||
| stringify.cpp | ||
| suffix_tree.cpp | ||
| topological-sort.cpp | ||
|
|
@@ -29,6 +29,8 @@ set(unittest_SOURCES | |
|
|
||
| if(BUILD_FUZZTEST) | ||
| set(unittest_SOURCES ${unittest_SOURCES} type-domains.cpp) | ||
| else() | ||
| set(unittest_SOURCES ${unittest_SOURCES} source-map.cpp) | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tlively I've had to exclude this file from fuzztest builds, because it uses the gmock-matchers.h header (gmock is included with "standard" gtest but not with the one bundled with fuzztest). I tried including the gmock header along with the fuzztest gtest, but it seems to depend on some kind of internal gtest bit that the fuzztest gtest doesn't have. Do you know if fuzztest's bundled gtest is some sort of subset, or if they have any recommendations for use with gtest features they don't support themselves? Or maybe this is just WAI, and the intention is that fuzztests are logically separate enough from regular unit tests that it just makes sense to build them separately.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, I don't know the details of why fuzztest's bundled gtest is different from normal gtest, nor have I seen any recommendations for this. It's definitely not WAI, though. fuzztests are supposed to coexist peacefully with normal gtests AFAICT. It's probably fine excluding the file to work around the problem for now. The fuzztest build isn't important enough (yet) to spend time on. It would be good to add a comment explaining the problem, though. |
||
| endif() | ||
|
|
||
| # suffix_tree.cpp includes LLVM header using std::iterator (deprecated in C++17) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does "2nd" mean here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A generated JS file can have multiple lines. Mappings for each line are separated by a
;character. But wasm files are treated as if they have only one line, and the column number is treated as the binary offset. I'll add a comment.