From 5d87f3b963de1c125dc87e4de5addf9ef1a7f4e0 Mon Sep 17 00:00:00 2001 From: Michael Wekesa Date: Fri, 13 Oct 2023 09:35:41 +0300 Subject: [PATCH] Scaffolding jdwp for new JDWP debugger project (#62) * add buck2 * remove su * update makefile * initialize buck2 * add buck2 to root * add buck2 to root * Revert "merge auck2" This reverts commit 8d223862e061ee7f5522844626c96b0a303cec44, reversing changes made to 238cfb06f3ebb7876982fea075f9a964f390bbe0. * merge buck2 * add placeholder targets * update pyre configuration * delete file * remove buck2 and prelude with version conflicts * update placeholder targets * add a temp main py file * update tests target * update python toolchains * add copyright --------- Co-authored-by: Michael A. Wekesa --- .buckconfig | 17 +++++++++++++++++ .buckroot | 0 .gitmodules | 3 +++ projects/buck2/REDME | 0 projects/jdwp/.pyre_configuration | 5 +++++ projects/jdwp/BUCK | 14 ++++++++++++++ projects/jdwp/main.py | 7 +++++++ projects/jdwp/tests/BUCK | 6 ++++++ toolchains/BUCK | 19 +++++++++++++++++++ 9 files changed, 71 insertions(+) create mode 100644 .buckconfig create mode 100644 .buckroot create mode 100644 .gitmodules create mode 100644 projects/buck2/REDME create mode 100644 projects/jdwp/.pyre_configuration create mode 100644 projects/jdwp/BUCK create mode 100644 projects/jdwp/main.py create mode 100644 projects/jdwp/tests/BUCK create mode 100644 toolchains/BUCK diff --git a/.buckconfig b/.buckconfig new file mode 100644 index 0000000..2ad8047 --- /dev/null +++ b/.buckconfig @@ -0,0 +1,17 @@ +[repositories] +root = . +prelude = prelude +toolchains = toolchains +none = none + +[repository_aliases] +config = prelude +fbcode = none +fbsource = none +buck = none + +[parser] +target_platform_detector_spec = target:root//...->prelude//platforms:default + +[project] +ignore = .git diff --git a/.buckroot b/.buckroot new file mode 100644 index 0000000..e69de29 diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..faecebb --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "prelude"] + path = prelude + url = https://github.com/facebook/buck2-prelude.git diff --git a/projects/buck2/REDME b/projects/buck2/REDME new file mode 100644 index 0000000..e69de29 diff --git a/projects/jdwp/.pyre_configuration b/projects/jdwp/.pyre_configuration new file mode 100644 index 0000000..f06815d --- /dev/null +++ b/projects/jdwp/.pyre_configuration @@ -0,0 +1,5 @@ +{ + "targets": [ + "//projects/jdwp/..." + ] +} \ No newline at end of file diff --git a/projects/jdwp/BUCK b/projects/jdwp/BUCK new file mode 100644 index 0000000..ee42edd --- /dev/null +++ b/projects/jdwp/BUCK @@ -0,0 +1,14 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. + +python_binary( + name = "main", + main = "main.py", + deps = [], +) + + +python_library( + name = "lib", + srcs = [], + visibility = ["PUBLIC"], +) \ No newline at end of file diff --git a/projects/jdwp/main.py b/projects/jdwp/main.py new file mode 100644 index 0000000..eaf0112 --- /dev/null +++ b/projects/jdwp/main.py @@ -0,0 +1,7 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. + +def main(): + return None + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/projects/jdwp/tests/BUCK b/projects/jdwp/tests/BUCK new file mode 100644 index 0000000..0350ac2 --- /dev/null +++ b/projects/jdwp/tests/BUCK @@ -0,0 +1,6 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. + +python_test( + name = "tests", + srcs = glob(["*.py"]), +) diff --git a/toolchains/BUCK b/toolchains/BUCK new file mode 100644 index 0000000..2b265df --- /dev/null +++ b/toolchains/BUCK @@ -0,0 +1,19 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. + +load("@prelude//toolchains:python.bzl", "system_python_bootstrap_toolchain", "system_python_toolchain") +load("@prelude//toolchains:cxx.bzl", "system_cxx_toolchain") + +system_cxx_toolchain( + name = "cxx", + visibility = ["PUBLIC"], +) + +system_python_toolchain( + name = "python", + visibility = ["PUBLIC"], +) + +system_python_bootstrap_toolchain( + name = "python_bootstrap", + visibility = ["PUBLIC"], +) \ No newline at end of file