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

Support custom asset types in barback #20

Open
DartBot opened this issue Jun 5, 2015 · 7 comments
Open

Support custom asset types in barback #20

DartBot opened this issue Jun 5, 2015 · 7 comments
Labels

Comments

@DartBot
Copy link

DartBot commented Jun 5, 2015

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


Users have expressed an interest in defining custom asset types. This would require some sort of pluggable serialization system in order to send these assets between isolates. Alternately, if we say these assets can only be used by transformers in the same library where they're defined, we could potentially find a way around serializing them.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

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


+1 on finding a way to avoid serializing them if possible.

Pete recently also expressed interested in this. Here is an example use case: we want to be able to parse a dart file and store an AST as a custom asset so we don't have to repeat the parsing later on.


cc @blois.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

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


Would the AST be passed between different transformers, or cached for re-use in a single transformer?

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

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


Different transformers. Ideally these could be completely separate transformers. But I have also scenarios where they could be part of the same transformer group. So those would at least be being part of the same isolate.

@DartBot DartBot added the bug label Jun 5, 2015
@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

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


Scenario that I was looking at was a tweak system with support for compiling out the tweaks in release mode. With a series of code transformations such as this, would be nice to not have to re-parse the AST.

Potentially the answer is that there should be a single code-transformer which executes a series of AST modifiers. But I imagine that this same scenario could be generalized.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

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


Removed Area-Library label.
Added Area-pKG label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

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


Removed Area-pKG label.
Added Area-Pkg label.

@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.
Labels
Development

No branches or pull requests

1 participant