-
Notifications
You must be signed in to change notification settings - Fork 887
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make feature_compiler.py patch extensible
- Loading branch information
Showing
2 changed files
with
24 additions
and
12 deletions.
There are no files selected for viewing
16 changes: 4 additions & 12 deletions
16
patches/tools-json_schema_compiler-feature_compiler.py.patch
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,13 @@ | ||
diff --git a/tools/json_schema_compiler/feature_compiler.py b/tools/json_schema_compiler/feature_compiler.py | ||
index b23dca5689042e1e6f0742ea79c3dcfcc65d168c..fe7105940bf6d6556a6394c689029617457b5f4f 100644 | ||
index b23dca5689042e1e6f0742ea79c3dcfcc65d168c..e06644d657e85fe6b42eb602ac7b597c0615a1a7 100644 | ||
--- a/tools/json_schema_compiler/feature_compiler.py | ||
+++ b/tools/json_schema_compiler/feature_compiler.py | ||
@@ -771,6 +771,16 @@ class FeatureCompiler(object): | ||
@@ -771,6 +771,8 @@ class FeatureCompiler(object): | ||
abs_source_file) | ||
raise | ||
dupes = set(f_json) & set(self._json) | ||
+ dupes.discard('topSites') | ||
+ dupes.discard('extension.inIncognitoContext') | ||
+ dupes.discard('bookmarkManagerPrivate') | ||
+ dupes.discard('bookmarks') | ||
+ dupes.discard('settingsPrivate') | ||
+ dupes.discard('sockets') | ||
+ dupes.discard('sockets.tcp') | ||
+ dupes.discard('sockets.udp') | ||
+ dupes.discard('sockets.tcpServer') | ||
+ dupes.discard('tabs') | ||
+ from feature_compiler_helper import DiscardBraveOverridesFromDupes | ||
+ DiscardBraveOverridesFromDupes(dupes) | ||
assert not dupes, 'Duplicate keys found: %s' % list(dupes) | ||
self._json.update(f_json) | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env python | ||
|
||
# Copyright (c) 2022 The Brave Authors. All rights reserved. | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
# You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
# When update this method, feature_compiler.py should be touched to make | ||
# feature_compiler.py run. json_feature target doesn't have this in its dependency. | ||
def DiscardBraveOverridesFromDupes(dupes): | ||
dupes.discard('topSites') | ||
dupes.discard('extension.inIncognitoContext') | ||
dupes.discard('bookmarkManagerPrivate') | ||
dupes.discard('bookmarks') | ||
dupes.discard('settingsPrivate') | ||
dupes.discard('sockets') | ||
dupes.discard('sockets.tcp') | ||
dupes.discard('sockets.udp') | ||
dupes.discard('sockets.tcpServer') | ||
dupes.discard('tabs') |