Commit Graph

254 Commits

Author SHA1 Message Date
Siva Muthusamy
0f10cd4895 Use wget in getdeps to download source code
Summary:
Neither the default "urlretrieve" nor "pycurl" works fine for all of FBOSS'
dependencies. One or other fails (opennsa, libmnl, exprtk, etc...) with these
two options. So, adding support for "wget".

Tried to use python's wget.download() but this also internally uses
"urlretrieve" and hence it fails for some of the FBOSS' dependencies.
So, using wget command directly instead.

Reviewed By: shri-khare

Differential Revision: D40841867

fbshipit-source-id: 229b3064f3faad4b32cf8a3c43fef53f2bb001fd
2022-10-31 10:15:27 -07:00
Ivan Morett
2caaaccfe2 Adding "Accept" header to urllib type request (#180)
Summary:
X-link: https://github.com/facebookincubator/katran/pull/180

The urlretrieve method originally doesn't add this header, and in katran we noticed that the libmnl wasn't fetched anymore. After investigation, the request is blocked with error 403 because this header is missing. Adding it to the request.

Reviewed By: avasylev

Differential Revision: D40386108

fbshipit-source-id: a9b4b937ca12a04bc701d3f945681914151c0110
2022-10-24 06:51:28 -07:00
Pyre Bot Jr
ae788ac982 upgrade pyre version in fbcode/opensource - batch 1
Differential Revision: D38448541

fbshipit-source-id: 6ecf6ec7dc7f9acd35d7c3357b1982e2f44cd8d1
2022-08-05 08:16:25 -07:00
Katie Mancini
a20b9b0500 skip realpathing for prefetch on windows
Summary:
Relative paths can not be calculated between drives, so we should not realpath
here because we don't realpath elsewhere.

Reviewed By: MichaelCuevas

Differential Revision: D38378132

fbshipit-source-id: a20d5c5273a2d09166792fbb9862f67d8040fdd3
2022-08-03 13:23:32 -07:00
Chad Austin
cd38f3ab42 if the record_results endpoint fails, don't fail the job
Summary:
A request to record_results failed, which caused a folly gcc 8 build
regression to slip in, which broke the Watchman and EdenFS builds.

Instead, turn record_results requests into a logged warning.

Reviewed By: xavierd

Differential Revision: D38170729

fbshipit-source-id: d59ae5fa48b5cbcf649281108d958ff95e319e35
2022-07-26 16:43:01 -07:00
Chad Austin
42f5ad9e2d don't fail the build if /proc/meminfo is missing or unexpected
Summary:
Occasionally we see reports [1] that /proc/meminfo is missing or has
unexpected values on Linux. Instead of failing the build, guess a
reasonable value, at the risk that this will unnecessarily limit the
build's concurrency.

[1] https://github.com/facebook/watchman/issues/1040

Reviewed By: genevievehelsel

Differential Revision: D38126612

fbshipit-source-id: 9d9d9f6003703acf6dffcdd5b2022f0f7b3aa691
2022-07-25 16:02:01 -07:00
Zeyi (Rice) Fan
28e0977cee add support to disable test in internal CI
Reviewed By: yns88

Differential Revision: D37802283

fbshipit-source-id: 033bdc054aafd7da0ba1eca0398081a4d0fa77fc
2022-07-15 13:35:57 -07:00
Xavier Deguillard
5b9de15b8b cmake: kill testpilot on Windows
Summary:
TPX is now available on Windows, the testpilot code is thus no longer
necessary.

Reviewed By: fanzeyi

Differential Revision: D37476157

fbshipit-source-id: 885881de2e06eab4990c6c96dcef8f51614a17f5
2022-07-07 16:39:17 -07:00
Xavier Deguillard
0c903dd35f testpilot: prevent using tpx on Windows
Summary:
TPX on Windows is being worked on, but not yet ready for prime time. Let's make
sure that getdeps isn't trying to use TPX on Windows for now.

Reviewed By: splhack

Differential Revision: D37474152

fbshipit-source-id: e636b0b68f6f73472f28295c280803ac44fafebf
2022-06-27 19:56:20 -07:00
Chad Austin
e335e0d5df don't pass --collection or --purpose to tpx in local runs
Summary:
Fix local test runs. Previously, they were silently passing, because
they skipped tests that were unknown to tpx. Instead, treat local runs
separately from CI diff runs.

Reviewed By: xavierd

Differential Revision: D37287032

fbshipit-source-id: a3a88e117cd0e078e18c0f795bae467768d812a5
2022-06-21 14:23:58 -07:00
Xavier Deguillard
809b4c4177 test: create a testinfra run and pass it to tpx/testpilot
Reviewed By: danalex97

Differential Revision: D37196281

fbshipit-source-id: e23c2122711594f8baaa2999853351a3fcf6d559
2022-06-16 12:24:36 -07:00
Mindaugas Rukas
404a1eb96a Fix OpenSSL building on Apple Silicon M1 (ARM) (#1032)
Summary:
Before the change:
```
% uname -m -s
Darwin arm64

% ./autogen.sh
...
ld: warning: ignoring file /private/var/.../installed/openssl-OovnrH2WrHG18y7xi0irAegZLOlNsDyeOGb8BBEcoGw/lib/libssl.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
ld: warning: ignoring file /private/var/.../installed/openssl-OovnrH2WrHG18y7xi0irAegZLOlNsDyeOGb8BBEcoGw/lib/libcrypto.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
...
```

After the change build succeeds.

X-link: https://github.com/facebook/watchman/pull/1032

Reviewed By: fanzeyi

Differential Revision: D37137060

Pulled By: genevievehelsel

fbshipit-source-id: a8381c39821bbd29ddea1d1009b94f5ed6cacb21
2022-06-16 04:07:37 -07:00
Zeyi (Rice) Fan
d0018e9f64 support patchfile on all platforms
Summary: Adding patching support for all platforms using `git apply`

Reviewed By: xavierd

Differential Revision: D36939728

fbshipit-source-id: ccf6e4ccd30257c6928ba804a76882d4d2f71700
2022-06-06 14:11:44 -07:00
Ernesto Avilés Vázquez
503fcfa46e Fix return type in get_linux_type() (#1025)
Summary:
This function is expected to return a tuple of 3 elements. This doesn't happen when it fails opening the `/etc/os-release` file.

X-link: https://github.com/facebook/watchman/pull/1025

Reviewed By: fanzeyi

Differential Revision: D36736667

Pulled By: chadaustin

fbshipit-source-id: a6839235d6c5ebb50267cd78f1c9590b2fb180d7
2022-05-30 11:38:45 -07:00
Chad Austin
8a9b1385c8 make errors better when ctest is not found
Summary:
Without ctest installed, `getdeps.py test $project` would produce a
bad error message about failing to run a `''` command. Instead,
explicitly error early when a command is required.

Reviewed By: genevievehelsel

Differential Revision: D36535929

fbshipit-source-id: d300c6b1b0c124b56dffffae0a71bee9b7f12fe7
2022-05-20 12:33:19 -07:00
CodemodService FBSourceBlackLinterBot
4d706f9a98 Daily arc lint --take BLACK
Reviewed By: strulovich

Differential Revision: D36541099

fbshipit-source-id: 6d0b493b2d07332d96605bda4965b62bce6de3fe
2022-05-20 06:14:17 -07:00
Chad Austin
d467c11b7b don't try to use vendored crates in non-fbsource builds
Summary:
Watchman's vagrant images rely on mapping a watchman source directory
fetched from fbsource into the VM. Thus, they sometimes look like
fbsource, and that's largely okay. However, the vendored cargo support
breaks. Instead, explicitly skip vendored cargo when there is no
fbsource dir.

Reviewed By: xavierd

Differential Revision: D36386674

fbshipit-source-id: 61f2af19507fecd2342cfc94bbb7120ab91c33b4
2022-05-19 16:37:03 -07:00
John Reese
259fe87306 apply import merging for fbcode (8 of 11)
Summary:
Applies new import merging and sorting from µsort v1.0.

When merging imports, µsort will make a best-effort to move associated
comments to match merged elements, but there are known limitations due to
the diynamic nature of Python and developer tooling. These changes should
not produce any dangerous runtime changes, but may require touch-ups to
satisfy linters and other tooling.

Note that µsort uses case-insensitive, lexicographical sorting, which
results in a different ordering compared to isort. This provides a more
consistent sorting order, matching the case-insensitive order used when
sorting import statements by module name, and ensures that "frog", "FROG",
and "Frog" always sort next to each other.

For details on µsort's sorting and merging semantics, see the user guide:
https://usort.readthedocs.io/en/stable/guide.html#sorting

Reviewed By: lisroach

Differential Revision: D36402214

fbshipit-source-id: b641bfa9d46242188524d4ae2c44998922a62b4c
2022-05-15 12:53:03 -07:00
John Reese
2b1bda643c formatting changes from black 22.3.0
Summary:
Applies the black-fbsource codemod with the new build of pyfmt.

paintitblack

Reviewed By: lisroach

Differential Revision: D36324783

fbshipit-source-id: 280c09e88257e5e569ab729691165d8dedd767bc
2022-05-11 19:55:56 -07:00
Pyre Bot Jr
4716eea0e0 suppress errors in fbcode/opensource - batch 1
Differential Revision: D36119836

fbshipit-source-id: 3328102e950e87e1058c60e5f06a8f0bbdb6d331
2022-05-03 23:49:56 -07:00
Pyre Bot Jr
fef90b8b04 Add annotations to opensource/fbcode_builder
Reviewed By: shannonzhu

Differential Revision: D35512626

fbshipit-source-id: db449b0f2dadcbb1ea8917adfde65f2f890ee988
2022-04-08 17:06:18 -07:00
David Greenberg
caa7025121 Add patchfile support to getdeps
Summary:
This adds the ability to specify a patch file to be applied on top of any library in getdeps.

For example, zlib doesn't support static linking with CMake, but there's a small patch that can be applied to support static linking. This is the specific use case this diff is intended to support.

Reviewed By: bigfootjon

Differential Revision: D35410512

fbshipit-source-id: d1af0ddf9ec45ef28aa902c06735af86817ac194
2022-04-07 08:36:02 -07:00
Alexey Spiridonov
4da937e55b Remove mentions of Bistro
Summary: Since Bistro is slated to be deprecated, let us turn off OSS CI for it.

Reviewed By: AnonymousMonkey2021

Differential Revision: D35347845

fbshipit-source-id: be23bcfaa098f77162f27ecfed6469b8db7d3401
2022-04-03 20:54:31 -07:00
Chad Austin
cf08afebdb fixup-dyn-deps: handle duplicate dynamic library paths
Summary:
On GitHub Actions macos-10.15 image, some of the build dependencies
for Watchman reference
/usr/local/opt/openssl@1.1/lib/libcrypto.1.1.dylib and others
reference
/usr/local/Cellar/openssl@1.1/1.1.1m/lib/libcrypto.1.1.dylib.

To avoid overwriting libcrypto in the artifact directory, key
processed_deps on the destination path.

Reviewed By: xavierd

Differential Revision: D34882663

fbshipit-source-id: 60d021bf9956d9b3e34e8945ccec234d31031369
2022-03-17 13:41:28 -07:00
David Greenberg
e8c2323a6c Add argument to pass extra arguments to boost b2 build tool (#28)
Summary:
X-link: https://github.com/facebook/fb303/pull/28

X-link: https://github.com/facebook/fboss/pull/115

X-link: https://github.com/facebook/folly/pull/1736

X-link: https://github.com/facebook/proxygen/pull/403

X-link: https://github.com/facebook/fbthrift/pull/488

This adds a way to pass arguments to the `b2` build tool, used by Boost. This is needed in order to link a getdeps built boost into an relocatable `.so`. The motivating use case is that we need to statically link Boost into a native library used by a python wheel, which must be relocatable. This functionality already exists for CMake-based projects.

Reviewed By: mackorone

Differential Revision: D34796774

fbshipit-source-id: 0d6a9f4703865dc02048b87e77394c44ef646af6
2022-03-14 09:19:39 -07:00
David Greenberg
706b44cc5c use libcurl in getdeps (#76)
Summary:
X-link: https://github.com/facebookincubator/fizz/pull/76

X-link: https://github.com/facebook/proxygen/pull/402

X-link: https://github.com/facebook/folly/pull/1735

X-link: https://github.com/facebook/bistro/pull/60

X-link: https://github.com/facebook/watchman/pull/1012

X-link: https://github.com/facebook/fbthrift/pull/487

X-link: https://github.com/facebook/fboss/pull/114

X-link: https://github.com/facebook/fb303/pull/27

When using getdeps inside of a container, Python's urllib isn't able to download from dewey lfs (see this post for details https://fb.workplace.com/groups/systemd.and.friends/permalink/2747692278870647/).

This allows for getdeps to use `libcurl` to fetch dependencies, which allows for a getdeps build to work inside the container environment.

Reviewed By: mackorone

Differential Revision: D34696330

fbshipit-source-id: 06cae87eef40dfa3cecacacee49234b6737d546f
2022-03-14 09:19:39 -07:00
David Greenberg
919a3c5344 getdeps optionally can get hg info from env var (#911)
Summary:
X-link: https://github.com/rsocket/rsocket-cpp/pull/911

X-link: https://github.com/facebookexperimental/rust-shed/pull/32

X-link: https://github.com/facebookincubator/reindeer/pull/3

X-link: https://github.com/fairinternal/AIRStore/pull/36

X-link: https://github.com/facebookincubator/velox/pull/1197

X-link: https://github.com/facebookincubator/mvfst/pull/242

Pull Request resolved: https://github.com/facebookexperimental/eden/pull/116

X-link: https://github.com/facebookincubator/fizz/pull/75

X-link: https://github.com/facebookincubator/katran/pull/157

X-link: https://github.com/facebook/watchman/pull/1011

X-link: https://github.com/facebook/wangle/pull/205

X-link: https://github.com/facebook/proxygen/pull/401

X-link: https://github.com/facebook/openr/pull/129

X-link: https://github.com/facebook/fbzmq/pull/35

X-link: https://github.com/facebook/fb303/pull/26

X-link: https://github.com/facebook/bistro/pull/59

X-link: https://github.com/facebook/folly/pull/1734

X-link: https://github.com/facebook/fboss/pull/113

Adds an environment variable to getdeps to provide `hg` info to avoid calling `hg` directly.

When using `getdeps` inside a containerized environment (which we need to build Research Super Cluster tooling with the correct linker attributes), `getdeps` fails because of unregistered mercurial extensions in the `hgrc`.

This allows `getdeps` to be useable in an environment where the mercurial extensions used in a project aren't installed/available.

Reviewed By: vivekspai

Differential Revision: D34732506

fbshipit-source-id: 6475088fbf3323347095ca5af8a902382cf8f9d0
2022-03-11 17:05:39 -08:00
Pyre Bot Jr
a60a955b72 Add annotations to opensource/fbcode_builder
Reviewed By: shannonzhu

Differential Revision: D34811565

fbshipit-source-id: 80fd0edb13a88e1a8974993f547727f55b1f71fb
2022-03-10 21:59:34 -08:00
Pyre Bot Jr
9b0fa6eaf5 Add annotations to opensource/fbcode_builder
Reviewed By: shannonzhu

Differential Revision: D34357770

fbshipit-source-id: fde97212d0e0cbd203e094486f3620205d861faa
2022-02-18 20:23:09 -08:00
Pyre Bot Jr
dfc60832ab Add annotations to opensource/fbcode_builder
Reviewed By: shannonzhu

Differential Revision: D34332682

fbshipit-source-id: 498c63851f98dd76502a20a9d1589df5b0c4e7b9
2022-02-17 22:55:48 -08:00
Andrea Aquino
c39de0d284 Fix getdeps test classification
Summary:
If getdeps tests run from fbcode, tpx guesses that the test type is FBCODE rather than FBTEST. This makes UTF ignore the buildsystem=getdeps config, which leads tests to be ignored.

This diff sets the test type explicitly.

More context in [this post](https://fb.workplace.com/groups/tpx.users/permalink/1309289352870499/).

Reviewed By: sandeepkumarpani888

Differential Revision: D34271402

fbshipit-source-id: 2c6c37d706f22d214cd2f7622a7124b4c3f92ba0
2022-02-17 11:14:48 -08:00
Alex Hornby
fcc2d33faa improve crate vendoring (#110)
Summary:
Pull Request resolved: https://github.com/facebookexperimental/eden/pull/110

Pull Request resolved: https://github.com/facebookexperimental/rust-shed/pull/27

Make it so that changes to rust-shed or other common rust source are used locally vendored, so they don't need to be pushed to github before they are visible in a build.

There was already some support for cargo vendoring in getdeps, but it was limited to dependencies between manifests built with cargo builder.  This wasn't enough to build something like eden (cmake is main entry point, with later calls cargo) or eden_scm (make is main entry point, with later calls to cargo), so this diff adds a cargo prepare step for getdeps other primary build systems.

The cargo vendoring is done by using a cargo config file to point to the source files used by getdeps.  It has two modes:

1. per crate, existing mode which is already automatic for cargo to cargo manifest dependencies.  To use it for a non cargo build manifest, add crate.pathmap
2. per git url, existing mode which was only use for crates.io third-party crates, now can be enabled by setting cargo.cargo_config_file

Reviewed By: yancouto

Differential Revision: D33895469

fbshipit-source-id: 7b13c0b679532492a336ce217de875c25fe1be90
2022-02-16 05:04:46 -08:00
Pyre Bot Jr
27fb077f65 Add annotations to opensource/fbcode_builder
Reviewed By: shannonzhu

Differential Revision: D34224272

fbshipit-source-id: 52e19886ab3d4fb015a557244660dd4357a35c17
2022-02-14 16:22:27 -08:00
Alex Hornby
96bef26081 add github actions for EdenFS on linux and fix Eden SCM Mac build (#106)
Summary:
Pull Request resolved: https://github.com/facebookexperimental/eden/pull/106

Pull Request resolved: https://github.com/facebookexperimental/eden/pull/107

Summary

* Add EdenFS builds on external CI now EdenSCM is good

* Mac builds on github actions by using brew for system dependencies

To make this work had to fix some path ordering issues with install directories for Linux and Mac, and generalise the homebrew path fixups we were doing for bison to all the used homebrew packages.

Previously Installed packages were being added after system paths, so our own installed thing might be ignored. On github these meant system python 3.9 was being used for hg tests rather than our specified 3.8 (this showed we have some test fails on python 3.9 with "SystemError: deallocated bytearray object has exported buffers", that are beyond the scope of this diff to fix)

Also needed to include the getdeps generated python into the generated edenscmdeps3.zip archive setup.py produces otherwise EdenFS tests failed to import thrift.Thrift

Eden tests are hanging when run externally about half way through, so disable them on github actions for now as this PR is already fairly large. They work when run locally on an internal devserver, so probably some bit of environment necessary is not defined in the test runner

Reviewed By: chadaustin

Differential Revision: D34116505

fbshipit-source-id: d0d628db5daabc28d0bd8997cd5c1bc885ed1e73
2022-02-14 11:56:53 -08:00
Chad Austin
031b42ca95 fix 'error: Microsoft Visual C++ 14.0 is required' red herring on GitHub Actions (#998)
Summary:
Pull Request resolved: https://github.com/facebook/watchman/pull/998

A detailed description of this change is included in the new comment.

Reviewed By: fanzeyi

Differential Revision: D34124030

fbshipit-source-id: f37c458bae135357e16b256e09f0d6eb8f1f996d
2022-02-10 09:05:16 -08:00
Chad Austin
3ebcc585f7 fix Watchman build on FreeBSD
Summary:
Watchman advertises support for FreeBSD but it's regressed a couple
ways. Ensure it builds on FreeBSD again with a Vagrantfile.

Reviewed By: ahornby

Differential Revision: D33989289

fbshipit-source-id: ff906bc219974bafbc349740ce6bddfe5bd2908f
2022-02-08 18:08:15 -08:00
Chad Austin
49953b107c add freebsd support
Summary: Add some basic support for FreeBSD to getdeps.

Reviewed By: ahornby

Differential Revision: D33989129

fbshipit-source-id: 42ff5f160b7e19c12196bb2e52a726f7815487bd
2022-02-08 18:08:14 -08:00
Chad Austin
9c0479dcd0 fix windows builds
Summary:
The new boost has an MSVC detection algorithm that 1) I don't
understand and 2) does not even seem deterministic. Since our internal
builds are pinned to vc142, force that in the manifest.

Reviewed By: fanzeyi

Differential Revision: D34085081

fbshipit-source-id: d8ce4d8e28aad14f6fa60f9227dafb546ce321e5
2022-02-08 14:08:21 -08:00
Alex Hornby
f312093f72 improve OSS CI jobs for eden and eden_scm
Summary: Make the --facebook-internal flag value available from BuildOptions so can have jobs of both values where required

Reviewed By: xavierd

Differential Revision: D33945588

fbshipit-source-id: 5d0e1b42973bd3e411a4a71075915bdb2755f0eb
2022-02-04 11:02:27 -08:00
Harvey Hunt
884a1d5c2f getdeps: Add support for brew packages and define package dependencies
Summary:
In order to speed up build times on a mac, add homebrew support to
getdeps.

Homebrew packages can be declared in a manifest using the `homebrew` header.

Futher, ahornby has added manifest entries for homebrew packages which are
included in this diff and also included a change to use the correct version of
openssl. Without this openssl change, homebrew cmake configure finds an old
openssl 1.0.2 install.

This diff provides a 2x speed up for building folly:

Timings for clean getdeps folly build on mid-2018 2.9Ghz i9 6 core intel macbook pro with 32GB RAM:

With new homebrew system deps:
```
rm -rf /Users/ahornby/.scratch/UsersZahornbyZfbsource/fbcode_builder_getdeps/
time ./opensource/fbcode_builder/getdeps.py build --allow-system-packages folly
real	17m39.329s
user	76m10.317s
sys	5m50.163s
```

Without:
```
rm -rf /Users/ahornby/.scratch/UsersZahornbyZfbsource/fbcode_builder_getdeps/
time ./opensource/fbcode_builder/getdeps.py build folly
real	32m10.344s
user	105m53.448s
sys	15m57.858s
```

Reviewed By: ahornby

Differential Revision: D33842632

fbshipit-source-id: ac785d4a8dcfa31b77292bddd9e747022ac36e3b
2022-02-04 04:32:42 -08:00
Alex Hornby
37a0fa477e allow expressions for shipit manifest entries
Summary: Add expressions for shipit entries so that we can map different directories if needed

Differential Revision: D33947996

fbshipit-source-id: e765769ae5a6ab90055b63284e538b965d6071b3
2022-02-04 01:20:03 -08:00
Alex Hornby
5ec603e6b8 pick rust installation independently of --facebook-internal
Summary: Create a new fbsource property for manifests so we can still use monorepo rust toolchain when running builds with --no-facebook-internal

Differential Revision: D33945559

fbshipit-source-id: 606af62e03d09c3529018af4478bcafecd0cd640
2022-02-04 01:20:03 -08:00
Chad Austin
1582804af2 upgrade boost to 1.78.0
Summary: Boost 1.69 does not build on Fedora 35, so upgrade to Boost 1.78.

Reviewed By: ahornby

Differential Revision: D33855670

fbshipit-source-id: 85469a835a1dab1a7d5222413b1f1349bdcff280
2022-02-03 15:02:33 -08:00
Chad Austin
e1b6455c66 don't follow mount points when applying shipit transformation
Summary:
If a getdeps project creates a bind mount in a subdirectory, we don't
want the shipit transformer to copy all of the bind mount's contents
to the ship-transformed output.

This manifested when I was using Vagrant inside of Watchman and
`getdeps.py fetch watchman` would copy all of the Vagrant VMs too.

Reviewed By: ahornby

Differential Revision: D33855553

fbshipit-source-id: e2bc50ecfe0d067490c95be05d074d6a844f30d5
2022-02-03 13:55:08 -08:00
Chad Austin
faca2d741d prefetch projects in the background
Summary:
There's no reason to block a getdeps build on prefetching its sources,
so issue all prefetches in the background.

Reviewed By: genevievehelsel

Differential Revision: D33855396

fbshipit-source-id: 1ba01b0587e9bc0e74e6bba5b8571af76bf2516d
2022-02-03 13:55:08 -08:00
Chad Austin
25e0c222bd limit parallelism based on available RAM
Summary:
A long time ago, getdeps scheduled each build up to the number of hardware threads. For some builds, that was too heavy, so it got throttled back to only ever use half the hardware threads. This left parallelism on the table for CPU-bound projects that don't use much RAM per compilation.

This commit makes better use of the hardware with finer-grained logic that allows each manifest to specify a `job_weight_mib` estimate in MiB, and limit concurrency to `available_ram / job_weight`.

Reviewed By: ahornby

Differential Revision: D33754018

fbshipit-source-id: 785bed6c6cfe3c473244e0806a77cec1fc119e1f
2022-02-01 17:12:48 -08:00
Alex Hornby
cdc9ff90c3 move cargo logic to cargo.py
Summary:
Move cargo logic to separate file as builder.py was getting a bit large

It's just a move of source file for CargoBuilder.  Diff looks a bit big as I did hg cp to preserve history

Differential Revision: D33888925

fbshipit-source-id: 2d57343535ab087e09876edba4d00a6f0234fcd0
2022-01-31 13:52:30 -08:00
Alex Hornby
e0f4b03a2a populate THRIFT_INCLUDE_PATH
Summary:
Populate the new environment variable if relevant path for it found.

For the OSS getdeps builds of things depending on fb303 this will allow them to be able to be able to find the fb303 thrift files from the declared fb303 dependency, rather than needing duplicates/stubs inside each package.

Also adds python as dependency to fbthrift manifest,  found it needed it when testing

Reviewed By: HarveyHunt

Differential Revision: D33771979

fbshipit-source-id: 9635221c0e6a2ac225d7d0babe76f1c919b583de
2022-01-27 06:22:50 -08:00
Alex Hornby
b34c0c5114 add support for testing package resolution by distro and distro version
Summary:
Add support for overriding os, distro and distro version to command line when inspecting system packages so one can requested see ubuntu 18.04 package from other OS.  Makes testing easier

Used shlex to shell unquote the value to be tested in the getdeps expression evaluator. getdeps expression parser didn't tolerate 18.04 as . is special char to getdeps expressions, needed to be "18.04"

Reviewed By: quark-zju

Differential Revision: D33741323

fbshipit-source-id: d83397c7fb5180a4d985d0d8ae7b3ff33b72f828
2022-01-25 02:05:10 -08:00
Chad Austin
823053ac69 opt into pyre
Summary:
Now that we have some type annotations, we might as well support
running the type checker.

Reviewed By: xavierd

Differential Revision: D33715757

fbshipit-source-id: baf693e4b2415e0e1aa50b569b744ca0cfb91337
2022-01-24 20:24:23 -08:00