Skip to content

Latest commit

 

History

History
37 lines (33 loc) · 1.67 KB

File metadata and controls

37 lines (33 loc) · 1.67 KB

API design questions:

  • How to handle 1-to-N things like task aliases?
    • Single iterable argument only, eg @task(aliases=('foo', 'bar'))
      • Plus: simple implementation, simple API
      • Minus: requires users to do more work in base case of one alias
    • Singular and plural forms coexisting, e.g. alias='foo' AND aliases=('foo', 'bar')
      • Plus: Base case is now handled
      • Minus: complicates implementation, API, adds concerns like "what happens if both are given?"

Big questions:

  • How to go from subprocess.PIPE to something custom which is capable of middleware-type functionality (e.g. logging, mutating etc)?
    • For now, have ugly overridden Popen object which handles printing in the case of stdin/err=PIPE (which normally just stores.)
    • Via broken-out subroutine which we can use to layer on logging, hiding etc.
  • How to handle global settings without requiring all functionality to be method calls on an object?
    • Require all functionality to be calls on an object, and allow users to use an implicit module-global object as the default target?
  • Failure handling?!
    • Fabric/Make/etc have fast-failure behavior
    • Need simple/easy way to disable that
      • Fab uses context manager
      • Would need to also add decorator and run kwarg to capture all possible desired levels of scope
    • Shell has e.g. foo || whatevs
    • We can't do this (e.g. run('foo') or whatevs()) without breaking fast-fail...can we?
      • Would have to use eg run('foo') or whatevs()and ensurerun()` returns an object that acts Boolean based on failure, not stdout