Make simple_json_parser a perfetto_component - #6909
Open
MichaelFQuigley wants to merge 5 commits into
Open
Conversation
Move implementation of array helper methods into simple_json_parser.h
to make simple_json_parser a header-only source set and avoid ODR
violations when included by multiple components.
This is in preparation for an upcoming change to parse JSON comments from
Proguard mapping (.map) files, such as:
# {"id":"com.android.tools.r8.mergedClasses", "class_id_field": "$cid", "merged_classes": [{ "name": "ClassA", "class_id": 0 }, { "name": "ClassB", "class_id": 1 }]}
…-json-parser-header-only
🎨 Perfetto UI Builds
|
LalitMaganti
left a comment
Member
There was a problem hiding this comment.
Sorry I'm not understanding the motivation for this patch. Is there a specific. Error etc you are working around?
There should not be any odr issue from have a C++ version of simplejsonpaser as a cc - if there was, we would have really big problems in a lot of places.
Author
|
I encountered this error when trying to upload #6911: i.e. SimpleJsonParser's impl was linked into both the //src/trace_processor/util/deobfuscation:deobfuscator and //src/trace_processor:lib libraries in #6911. I'm a bit new to Bazel-specific nuances, so apologies if there is a more idiomatic way to handle this. |
Member
|
We should make this a perfetto_component as the correct way to solve that problem. |
…r-header-only' of github.com:google/perfetto into dev/michaelquigley/simple-json-parser-header-only
Author
|
Thanks. Uploaded. |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Make simple_json_parser a perfetto_component.
This allows it to become a cc_library and be shared as a dependency in multiple
libraries while avoiding ODR violations.
This is in preparation for an upcoming change to parse JSON comments from
Proguard mapping (.map) files, such as: