Skip to content

Commit 150377c

Browse files
j-piaseckimeta-codesync[bot]
authored andcommitted
Move input_filters inside the parser package (facebook#56054)
Summary: Pull Request resolved: facebook#56054 Changelog: [Internal] Moves `input_filers` inside the `parser` package. Imports outside of the package were causing errors when running the snapshot generator in OSS. Reviewed By: cipolleschi Differential Revision: D96109755 fbshipit-source-id: c29d70c895057fd51a92c1a073b331d27c0b289b
1 parent 4e1a877 commit 150377c

10 files changed

Lines changed: 11 additions & 6 deletions

scripts/cxx-api/parser/__main__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ def main():
229229
get_react_native_dir(),
230230
"scripts",
231231
"cxx-api",
232+
"parser",
232233
"input_filters",
233234
"main.py",
234235
)

scripts/cxx-api/parser/builders.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
from doxmlparser import compound
1919

20-
from ..input_filters.handle_objc_interface_generics import decode_objc_generics
20+
from .input_filters.handle_objc_interface_generics import decode_objc_generics
2121
from .member import (
2222
ConceptMember,
2323
EnumMember,
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Copyright (c) Meta Platforms, Inc. and affiliates.
2+
#
3+
# This source code is licensed under the MIT license found in the
4+
# LICENSE file in the root directory of this source tree.

scripts/cxx-api/input_filters/handle_objc_interface_generics.py renamed to scripts/cxx-api/parser/input_filters/handle_objc_interface_generics.py

File renamed without changes.
File renamed without changes.

scripts/cxx-api/input_filters/strip_block_comments.py renamed to scripts/cxx-api/parser/input_filters/strip_block_comments.py

File renamed without changes.

scripts/cxx-api/input_filters/strip_deprecated_msg.py renamed to scripts/cxx-api/parser/input_filters/strip_deprecated_msg.py

File renamed without changes.

scripts/cxx-api/input_filters/strip_ns_unavailable.py renamed to scripts/cxx-api/parser/input_filters/strip_ns_unavailable.py

File renamed without changes.

scripts/cxx-api/tests/test_input_filters.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77

88
import unittest
99

10-
from ..input_filters.handle_objc_interface_generics import (
10+
from ..parser.input_filters.handle_objc_interface_generics import (
1111
decode_objc_generics,
1212
encode_objc_interface_generics,
1313
)
14-
from ..input_filters.strip_block_comments import strip_block_comments
15-
from ..input_filters.strip_deprecated_msg import strip_deprecated_msg
16-
from ..input_filters.strip_ns_unavailable import strip_ns_unavailable
14+
from ..parser.input_filters.strip_block_comments import strip_block_comments
15+
from ..parser.input_filters.strip_deprecated_msg import strip_deprecated_msg
16+
from ..parser.input_filters.strip_ns_unavailable import strip_ns_unavailable
1717

1818

1919
class TestDoxygenStripComments(unittest.TestCase):

scripts/cxx-api/tests/test_snapshots.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def _test(self: unittest.TestCase) -> None:
106106

107107
# Find the filter script in the package resources
108108
pkg_root = ir.files(__package__ if __package__ else "__main__")
109-
filter_script = pkg_root.parent / "input_filters" / "main.py"
109+
filter_script = pkg_root.parent / "parser" / "input_filters" / "main.py"
110110

111111
# Get real filesystem path for filter script if it exists
112112
# IMPORTANT: Keep the context manager active while Doxygen runs,

0 commit comments

Comments
 (0)