Open stuhood opened 2 years ago
I don't agree with this one. It makes addresses even more complex, and introduces a risk for ambiguity.
We generally encourage using target generators, so I expect the surface area of this to be small.
I don't agree with this one. It makes addresses even more complex, and introduces a risk for ambiguity.
We generally encourage using target generators, so I expect the surface area of this to be small.
I haven't read the update from https://docs.google.com/document/d/1jSCJ3pwvIMg5duafsr8KmiLOO_2ARMaYCSrb8K85JQc/edit# (excited about it: will try to today/tomorrow), but if the name
becomes optional, wouldn't this need to have a file address?
but if the name becomes optional, wouldn't this need to have a file address?
No, because these are explicitly declared atom targets. Only generated targets can have the name=
missing.
That keeps our rules much simpler and predictable:
name
, e.g. python_requirement
and python_source
. No need to teach that sometimes you can, sometimes you can't.name=
is missing, you know it's a target generatorReminder that we don't really encourage users to explicitly create atom targets - you had me rewrite the docs to bias towards generators, which I support. And tailor
encourages you to use generators.
That keeps our rules much simpler and predictable:
any explicitly declared atom target must have a
name
, e.g.python_requirement
andpython_source
. No need to teach that sometimes you can, sometimes you can't.so, if
name=
is missing, you know it's a target generator
That doesn't seem simpler than explaining that:
This also applies to target generators if the glob matches only one file.
I've done some dependencies --transitive
+ grep
stuff where I filtered out anything with :
because I only wanted the list of files. I had to stop filtering :
once I realized that some targets were getting excluded.
An explicitly declared target like:
...will have an
Address
ofexample:example
, rather than theAddress
it would have if it had been created by apython_sources
generator:example/file.py
.We have affordances in the code to allow looking up this kind of target using a file address, but ideally we would change the actual address of the target. There are open questions about that, particularly around collisions with other targets: removing the requirement that a target be named would go a long way though.