Is it possible to provide the `--nounit` flag to `arc diff` by default?
Event Timeline
Is running arc unit interactively ever desirable? Can you either disconnect the integration entirely, or have it no-op if the --everything flag is not present (if you rely on --target for build integration)?
We have our own build step which just runs arc unit --everything --coverage --ugly in a working copy and then deals with the exit code and json returned.
We still do have people running arc unit locally to see how their tests are for larger / more involved changes, for small changes the tendency is to just put the diff up without building or running the tests locally.
The test engine can figure out if --everything is present or not but I don't think it can reach up to the workflow object right now. So you can disable arc unit as a sub-step of arc diff, but not without also disabling arc unit when run without --everything.
I think it would tentatively be OK to let the engine have access to the workflow (which is an object that represents "arc unit"), and then check if it the workflow has a parent workflow. If it does, and that parent is "arc diff", it could decline to run any tests. That would preserve the behavior of arc unit while preventing tests from running on arc diff.
In the very long run I think there will be more refinement here, but I don't want to muck around with workflow relationships in a general way too much without having a longer-term plan in mind. Providing access to the workflow object is a small, unconcerning API change though.
| Command | Now | Require --everything | Check Parent Workflow |
|---|---|---|---|
| arc diff | Runs Tests | No Tests | No Tests |
| arc unit | Runs Tests | No Tests | Runs Tests |
| arc unit --everything | Runs Tests | Runs Tests | Runs Tests |
Yeah it works for us to just kill it in arc unit for now, we're stuck a few weeks behind master for the time being so an upstream fix wouldn't help us immediately anyways.
Thanks.