1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-09 00:12:40 +01:00
Commit graph

12 commits

Author SHA1 Message Date
epriestley
7d05dbec15 [Wilds] Rewrite "arc" entrypoints for toolsets
Summary:
Ref T13098. Depends on D19675. This change is headed to the `untamed-wilds` branch.

This change prevents `arc` from running `arc diff`, so I'm copy/pasting it.

This change also completely breaks `arc`, but I'm just generally trying to do this rewrite step-by-step so we have at least a bit of context to refer to in the future.

The major change here is to turn both `arc` and `phage` into scripts which start an `ArcanistRuntime`. This runtime then decides which workflows (like "diff", "patch", or "remote") are available based on `$argv[0]`. This turns `arc` into more of a CLI tools platform: we can build `phage` on it, third parties can build `my-companion-tool-thing`, etc. But all the different entry points can share a lot of infrastructure like: `help`, `alias`, shell-complete, configuration, Conduit, prompting, `--trace`, extension infrastructure, and so on.

`ArcanistRuntime` is roughly a slightly more modern version of `scripts/arcanist.php`. That will be removed eventually, but not everything has ported yet.

Test Plan: This code basically doesn't run yet, although the next patch runs at least a little bit.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13098

Differential Revision: https://secure.phabricator.com/D19677
2018-09-21 15:55:08 -07:00
epriestley
dc65bfbe54 Put a Phage skeleton command on the Arcanist experimental branch
Summary:
Ref T2794. This doesn't do anything useful, but since I'm planning to start using this stuff to do real deployments I don't want to lose it if my laptop gets hit by a bus.

This just adds a skeletal `bin/phage` with enough code that I can add actual workflows to Phacility repositories and get `bin/phage remote --hosts ...` working without the code only existing on my laptop.

Test Plan: Ran `bin/phage`, saw nothin'.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T2794

Differential Revision: https://secure.phabricator.com/D17379
2017-02-17 16:58:13 -08:00
Joshua Spence
d62bd48a81 Added ArcanistTextLinter::LINT_BOF_WHITESPACE and ArcanistTextLinter::LINT_EOF_WHITESPACE
Summary: This might not be universally desireable, but I found myself writing an additional linter (which I had called `WhitespaceTextLinter`) for the sake of these two linter tests. I figured it may be of use upstream, and so I decided to submit it as a diff. I won't be offended if it is rejected however.

Test Plan: `arc lint` and `arc unit` are both okay with it.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley

CC: Korvin, epriestley, aran

Differential Revision: https://secure.phabricator.com/D7957
2014-01-13 18:05:42 -08:00
epriestley
419d7de1bf Fix "arc" when arcanist/ lives in some directory with spaces in the name
Summary: This shell script needs more quotes.

Test Plan: Ran "arc" with `arcanist/` inside a directory called `s p a c e s`.

Reviewers: irinav, vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D5265
2013-03-06 14:43:18 -08:00
epriestley
ed41f3f52c Allow arc.bat to work from paths with spaces in them
Summary: If you dump `arcanist/` into "Program Files" or similar, the `.bat` currently breaks. Quote the path so it doesn't. Fixes T1436.

Test Plan: Ran `arc` with `arcanist/` in a path with spaces in it.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1436

Differential Revision: https://secure.phabricator.com/D4375
2013-01-09 12:34:30 -08:00
Sébastien Santoro
088091ca40 Make bin/arc less linux-centered, more UNIX-agnostic
Summary: Using /usr/bin/env in #! to allow the arc script to run as is in every UNIX OSes, like FreeBSD where bash is installed in /usr/local/bin/bash.

Test Plan: Tested on Solaris, Ubuntu, kFreeBSD/Debian and FreeBSD.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Maniphest Tasks: T1440

Differential Revision: https://secure.phabricator.com/D2913
2012-07-03 06:34:49 -07:00
epriestley
2a66d6bde9 Minor, correct arc handling of relative symlinking (from @makinde). 2012-04-02 16:33:36 -07:00
Nick Harper
0d76ac6968 [arcanist] properly handle arguments with spaces
Summary:
The new wrapper shell script that is bin/arc does not correctly
handle arguments with spaces in them.

Test Plan:
added a print_r($argv) to scripts/arcanist.php and ran bin/arc -m
"testing something" to see that "testing something" got passed in as
one argument instead of two.

Reviewers: jungejason, epriestley

Reviewed By: epriestley

CC: aran

Differential Revision: https://secure.phabricator.com/D2066
2012-03-30 20:34:49 -07:00
epriestley
7c3f8b3041 Resolve arc location through symlinks-of-symlinks, etc
Summary:
Stole this from stackoverflow; seems to work?

http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in

Test Plan: Ran a symlink to bin/arc.

Reviewers: btrahan, zeeg

Reviewed By: btrahan

CC: aran, epriestley

Maniphest Tasks: T124

Differential Revision: https://secure.phabricator.com/D1968
2012-03-21 18:04:35 -07:00
epriestley
27725b073e Replace "bin/arc" with a shell script
Summary: Currently, we use a symlink. Under git bash, it tries to run the symlink. This is not a recipe for success. Instead, use a trivial wrapper script.

Test Plan: Ran "arc" from git bash.

Reviewers: Makinde, btrahan, Koolvin

Reviewed By: Koolvin

CC: aran, epriestley

Maniphest Tasks: T124

Differential Revision: https://secure.phabricator.com/D1939
2012-03-19 19:23:41 -07:00
epriestley
718b8b6d4f Add an arc.bat file for Arcanist
Summary: Allow Windows users to type "arc" with appropriate env config.

Test Plan: Typed "arc", got arc.

Reviewers: Makinde, btrahan, Koolvin, jungejason

Reviewed By: jungejason

CC: aran, epriestley

Maniphest Tasks: T124

Differential Revision: https://secure.phabricator.com/D1937
2012-03-18 19:42:53 -07:00
epriestley
2e73916fa2 Initial commit. 2011-01-09 15:22:25 -08:00