hundreds-father-404
01/06/2020, 10:55 PMSpec
to AddressSpec
. Why?
We don’t want to expand the current definition of Spec
to include files - it’s a very useful abstraction as is, e.g. that we have logic for SingleAddress
.
At the same time, “specs” is a very useful namespace to describe your specifications for what you want to run against. We would have AddressSpec
, and FileSpec
(maybe DirectorySpec
?). All of these things are `Spec`s.
This is a more sound model than something like Spec
, File
, and Directory
, which are all PositionalArg
. PositionalArg
is an implementation detail - the real core idea is that this is a specification for something to run against.
--
Thoughts and/or opposition?hundreds-breakfast-49010
01/06/2020, 11:11 PMTargetSpec
eventually going to be a subclass of a new abstract class Spec
that is different from the class currently called Spec
?hundreds-father-404
01/06/2020, 11:14 PMSpec
and AddressSpec
and FileSpec
would be subclasses
Conceptually, a Spec
is a specification of something to run Pants against. That specification can come in different forms, e.g. src/python/pants/util:strutil
or src/python/pants/util/strutil.py
A rule could request either Specs
, AddressSpecs
, or FileSpecs
depending on what interface they want to provide. (Possibly, we decide they need to support all 3 interfaces. Unclear, but we can defer that.)hundreds-breakfast-49010
01/06/2020, 11:15 PMwitty-crayon-22786
01/07/2020, 2:07 AMwitty-crayon-22786
01/07/2020, 2:08 AMPossibly, we decide they need to support all 3 interfaces. Unclear, but we can defer that.
witty-crayon-22786
01/07/2020, 2:08 AMSpecs
unless they can be used interchangeably somehowhundreds-father-404
01/07/2020, 2:08 AMSpec
as an alias of AddressSpec
or we can do this without deprecation because the engine isn’t public API? (Although, Spec is used by V1 too)witty-crayon-22786
01/07/2020, 2:09 AMwitty-crayon-22786
01/07/2020, 2:09 AMhundreds-father-404
01/07/2020, 2:09 AMwitty-crayon-22786
01/07/2020, 2:10 AMwitty-crayon-22786
01/07/2020, 2:10 AM