Skip to content
This repository has been archived by the owner on Jul 20, 2018. It is now read-only.

consider providing unique identifiers that transformers can use for generating files #12

Open
DartBot opened this issue Jun 5, 2015 · 1 comment

Comments

@DartBot
Copy link

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2049220?v=3" align="left" width="96" height="96"hspace="10"> Issue by sigmundch
Originally opened as dart-lang/sdk#12618


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/)

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/3276024?v=3" align="left" width="48" height="48"hspace="10"> Comment by anders-sandholm


Removed Library-Barback label.
Added Pkg-Barback label.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

1 participant