mirror of
https://github.com/facebook/proxygen.git
synced 2025-08-07 07:02:53 +03:00
mononoke: make mononoke_types OSS-buildable
Summary: (Note: this ignores all push blocking failures!) Reviewed By: farnz Differential Revision: D19948740 fbshipit-source-id: 9d0cfc4ccbcb3c08bb969f23229ed3096470fa86
This commit is contained in:
committed by
Facebook Github Bot
parent
2ad78d3de6
commit
31952e43df
@@ -982,9 +982,12 @@ path = "/dev/null"
|
||||
dep_to_git = {}
|
||||
for dep in dependencies.keys():
|
||||
dep_manifest = self.loader.load_manifest(dep)
|
||||
if dep_manifest.get("build", "builder", ctx=self.ctx) != "cargo":
|
||||
dep_builder = dep_manifest.get("build", "builder", ctx=self.ctx)
|
||||
if dep_builder not in ["cargo", "nop"] or dep == "rust":
|
||||
# This is a direct dependency, but it is not build with cargo
|
||||
# so ignore it.
|
||||
# and it is not simply copying files with nop, so ignore it.
|
||||
# The "rust" dependency is an exception since it contains the
|
||||
# toolchain.
|
||||
continue
|
||||
|
||||
git_conf = dep_manifest.get_section_as_dict("git", ctx=self.ctx)
|
||||
@@ -992,7 +995,10 @@ path = "/dev/null"
|
||||
raise Exception(
|
||||
"A cargo dependency requires git.repo_url to be defined."
|
||||
)
|
||||
git_conf["inst_dir"] = self.loader.get_project_install_dir(dep_manifest)
|
||||
source_dir = self.loader.get_project_install_dir(dep_manifest)
|
||||
if dep_builder == "cargo":
|
||||
source_dir = os.path.join(source_dir, "source")
|
||||
git_conf["source_dir"] = source_dir
|
||||
dep_to_git[dep] = git_conf
|
||||
return dep_to_git
|
||||
|
||||
@@ -1042,7 +1048,7 @@ path = "/dev/null"
|
||||
Tries to find <crate> in git_conf["inst_dir"] by searching a [package]
|
||||
keyword followed by name = "<crate>".
|
||||
"""
|
||||
source_dir = os.path.join(git_conf["inst_dir"], "source")
|
||||
source_dir = git_conf["source_dir"]
|
||||
search_pattern = '[package]\nname = "{}"'.format(crate)
|
||||
|
||||
for root, _, files in os.walk(source_dir):
|
||||
|
20
build/fbcode_builder/manifests/fbthrift-rust
Normal file
20
build/fbcode_builder/manifests/fbthrift-rust
Normal file
@@ -0,0 +1,20 @@
|
||||
[manifest]
|
||||
name = fbthrift-rust
|
||||
fbsource_path = fbcode/thrift
|
||||
shipit_project = fbthrift
|
||||
shipit_fbcode_builder = true
|
||||
|
||||
[git]
|
||||
repo_url = https://github.com/facebook/fbthrift.git
|
||||
|
||||
[build]
|
||||
builder = nop
|
||||
|
||||
[shipit.pathmap]
|
||||
fbcode/thrift/public_tld = .
|
||||
fbcode/thrift = thrift
|
||||
|
||||
[shipit.strip]
|
||||
^fbcode/thrift/thrift-config\.h$
|
||||
^fbcode/thrift/perf/canary.py$
|
||||
^fbcode/thrift/perf/loadtest.py$
|
@@ -27,10 +27,11 @@ tools/rust/ossconfigs = .
|
||||
|
||||
[shipit.strip]
|
||||
# strip all code unrelated to mononoke to prevent triggering unnecessary checks
|
||||
^fbcode/eden/(?!mononoke)/.*$
|
||||
^fbcode/eden/(?!mononoke|scm/lib/xdiff.*)/.*$
|
||||
^fbcode/eden/mononoke/(?!public_autocargo).+/Cargo\.toml$
|
||||
|
||||
[dependencies]
|
||||
fbthrift-rust
|
||||
rust-shed
|
||||
|
||||
[dependencies.fb=on]
|
||||
|
Reference in New Issue
Block a user