feat(metadata-generator): Filter according to specified black/white lists #1246
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.
Each text file contains a list of patterns of the form
moduleGlob:symbolGlob
,where
?
and*
special symbols treated asany symbol
andzero or more symbols
.A symbol is whitelisted if it's module name and native name pair matches a
pattern in the whitelist, or if a whitelist file is not passed as an argument. All
symbols which are not whitelisted or match a pattern in the blacklist are
excluded from the global table of metadata symbols.
blacklist.mdg
file to TestRunner and symlink from the root (becauseSRCROOT of TestRunner points to the directory of the main CMakeLists.txt)
the rules in
blacklist.mdg
If a struct's metadata is missing it's not possible to silently ignore it and
perform the call, because we don't know its size and cannot reliably
allocate the stack frame for the cif. That's why we'll abort the call and
throw a JS exception
objects from a blacklisted class. In this scenario the behavior is the
same as with objects from private classes
metadata is used and handle them in JSC callbacks
to allow correct discovery of interfaces and protocols when they
have been filtered
PR Checklist
What is the current behavior?
Metadata is generated for all discovered supported native symbols
What is the new behavior?
Metadata can be filtered by specifying a whitelist and/or blacklist in
two files residing in $(SRCROOT) (
blacklist.mdg
andwhitelist.mdg
).Each line should be of the form
module-name-pattern[:symbol-name-pattern]
.refs #1209