Commit e8c7b488 authored by Wez Furlong's avatar Wez Furlong Committed by Facebook Github Bot

fbcode_builder: getdeps: add `build --no-deps` flag

Summary:
This is useful especially on Windows where the up-to-date
checks for the dependencies take a long time.

The idea is that you might run this to start:

```
$ getdeps.py build eden
```

and then while in the edit/debug/build iteration cycle:

```
$ getdeps.py build --no-deps eden
```

Reviewed By: pkaush

Differential Revision: D15200352

fbshipit-source-id: 086f2f49db967ef4d1914a69fa80067104d79136
parent a4179ec0
...@@ -222,19 +222,21 @@ class BuildCmd(SubCmd): ...@@ -222,19 +222,21 @@ class BuildCmd(SubCmd):
install_dirs = [] install_dirs = []
for m in projects: for m in projects:
print("Assessing %s..." % m.name)
fetcher = m.create_fetcher(opts, ctx) fetcher = m.create_fetcher(opts, ctx)
if args.clean: if args.clean:
fetcher.clean() fetcher.clean()
change_status = fetcher.update()
reconfigure = change_status.build_changed()
sources_changed = change_status.sources_changed()
dirs = opts.compute_dirs(m, fetcher, manifests_by_name, ctx) dirs = opts.compute_dirs(m, fetcher, manifests_by_name, ctx)
build_dir = dirs["build_dir"] build_dir = dirs["build_dir"]
inst_dir = dirs["inst_dir"] inst_dir = dirs["inst_dir"]
if m == manifest or not args.no_deps:
print("Assessing %s..." % m.name)
change_status = fetcher.update()
reconfigure = change_status.build_changed()
sources_changed = change_status.sources_changed()
built_marker = os.path.join(inst_dir, ".built-by-getdeps") built_marker = os.path.join(inst_dir, ".built-by-getdeps")
if os.path.exists(built_marker): if os.path.exists(built_marker):
with open(built_marker, "r") as f: with open(built_marker, "r") as f:
...@@ -273,6 +275,17 @@ class BuildCmd(SubCmd): ...@@ -273,6 +275,17 @@ class BuildCmd(SubCmd):
"causing the projects to be built from scratch" "causing the projects to be built from scratch"
), ),
) )
parser.add_argument(
"--no-deps",
action="store_true",
default=False,
help=(
"Only build the named project, not its deps. "
"This is most useful after you've built all of the deps, "
"and helps to avoid waiting for relatively "
"slow up-to-date-ness checks"
),
)
@cmd("test", "test a given project") @cmd("test", "test a given project")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment