consider providing unique identifiers that transformers can use for generating files #12618
Labels
area-pkg
Used for miscellaneous pkg/ packages not associated with specific area- teams.
P3
A lower priority bug or feature request
type-enhancement
A request for a change that isn't a bug
It's important for transformers that generate new files to choose a file name that doesn't collide with existing files or files generated by another transformer that runs on the same phase.
We are not sure how much this will be a problem in the future, but one way to reduce the risk of name collisions would be to provide APIs in barback for this. For example, an API to retrieve a unique string or unique ID corresponding to the current transformer at the current phase. Then the transformers can generate unique assets IDs for generated files by including this unique string somewhere in the path.
(more context available in the discussions of this CL https://chromiumcodereview.appspot.com/22825012/)
The text was updated successfully, but these errors were encountered: