New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support user-agent specific transformations in pub #19169
Comments
Marked this as blocking #19168. |
I'm skeptical of namespaced transformations in general, and I strongly dislike the idea of serving them based on user-agent sniffing. It's brittle and potentially very confusing to users when they receive different pages on different browsers. I'd much rather solve issue #19168 by making some polymer transformers lazy within the current system if that's at all possible. |
CC: Vijay. I think we are going to move away from a user-agent to indicate Dart VM support.
Agree, I think... I don't deeply understand these issues, but yeah it seems like the issue is we have a whole bunch of transformations we only want to run when the .dart.js file is requested. The "Dartium polyfill" as it were. cc @vsmenon. |
@Siggi does it help if we bring back browser/dart.js in our polymer samples? That way if you load todomvc/web/index.html in Firefox from Pub, it triggers a fetch for index.dart.js which then could run the pipeline maybe? |
We had a few more discussions about this. Having the dartium vs non-dartium distinction in pub-serve also adds lots of complexity in pub/barback that might not be worth it. I'm currently exploring a few things in polymer. Short term, reducing the overhead from using the analyzer (possibly by mocking the SDK libraries). Long term something similar to what you suggest. I'd like to make things lazy like the dart2js transformer is, but additionally we need to be lazy about transforming the HTML as well (I'd like to avoid even inlining html imports if possible). To do that, we might need a second html entrypoint that we use during development, and maybe we can inject a redirect in the original html that triggers only on non-dartium browsers. |
Unmarked this as blocking #19168. |
Added this to the 1.6 milestone. |
Is the title of this still accurate? Marked as High, assigning owner. If I get this wrong, please help me by: * assigning a new owner
Set owner to @sigmundch. |
Removed the owner. |
I think currently this isn't something we're planning to do. Added NotPlanned label. |
This issue has been moved to dart-archive/barback#50. |
[I'm creating this bug so we can gather our ideas or have a place we can point at from other bugs.]
We have many transformers that are only needed at deployment and not at development time.
One example are the polymer transformers, none of which is needed for Dartium. But if you were to load the app in Chrome/FF you need all of them to run. Pub-serve is meant to support both, so we can't just choose to run them or not run them depending on whether we are in pub-serve or pub-build.
We could try to optimize out transformers to be faster, but the bottom line is that the best optimization is not to run them altogether :-).
It would be great to have support for this in pub-serve/barback.
The text was updated successfully, but these errors were encountered: