PolymerLabs / arcs

Arcs
BSD 3-Clause "New" or "Revised" License
57 stars 35 forks source link

Tags for Recipe Handles #2592

Open Cypher1 opened 5 years ago

Cypher1 commented 5 years ago

Using the current RecipeHandle syntax we can name handles e.g.

copy as products

but we cannot add tags e.g.

copy as products #shoplist

RecipeHandle should probably use the NameAndTagList syntax used by ParticleArgument and the tags should be passed through appropriately.

mariakleiner commented 5 years ago

We do have a syntax to support tags in RecipeHandle, as in: https://github.com/PolymerLabs/arcs/blob/master/src/runtime/test/manifest-test.ts#L38

RecipeHandle
  = type:RecipeHandleFate ref:(whiteSpace HandleOrSlotRef)? name:(whiteSpace LocalName)? eolWhiteSpace
...

https://github.com/PolymerLabs/arcs/blob/master/src/runtime/manifest-parser.peg#L777 and HandleOrSlotRef is:

HandleOrSlotRef
  = id:id tags:SpaceTagList?
...

https://github.com/PolymerLabs/arcs/blob/master/src/runtime/manifest-parser.peg#L874

But this syntax is used to imply that only a store that already has the specified tags can be used for this handle. AFAIK there is no syntax to say that we want to apply a tag on a handle (or slot fwiw).