Page MenuHomePhabricator

Use real types for build instructions
ClosedPublic

Authored by dduvall on Aug 8 2017, 12:29 AM.

Details

Reviewers
thcipriani
mmodell
Group Reviewers
Release-Engineering-Team
Commits
rGBLBRa0ece14e6e34: Use real types for build instructions
Patch without arc
git checkout -b D741 && curl -L https://phabricator.wikimedia.org/D741?download=true | git apply
Summary

Refactored build instructions to use concrete types and
build.Instruction as an interface instead of relying on a simple enum
and arbitrary string arguments. The formal types result in:

  1. Clearer internal data structures
  2. Partial compilation and proper argument quoting for all instructions moved into the common build package
  3. Higher order instructions like build.RunAll that easily reduce to compiler specific output
Test Plan

Run arc unit or go test ./...

Diff Detail

Repository
rGBLBR Blubber
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

dduvall created this revision.Aug 8 2017, 12:29 AM
Restricted Application added a reviewer: mmodell. · View Herald TranscriptAug 8 2017, 12:29 AM
Restricted Application added a reviewer: Release-Engineering-Team. · View Herald Transcript
Restricted Application added a project: Release-Engineering-Team. · View Herald Transcript
thcipriani accepted this revision.Aug 28 2017, 6:48 PM

minor nit + the golint errors, but overall lgtm!

config/apt.go
23

Wish there were a nicer way to instantiate than having to supply an empty arg.

This revision is now accepted and ready to land.Aug 28 2017, 6:48 PM
This revision was automatically updated to reflect the committed changes.