Skip to content
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

Closed
sigmundch opened this issue Jun 3, 2014 · 11 comments
Closed

support user-agent specific transformations in pub #19169

sigmundch opened this issue Jun 3, 2014 · 11 comments
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. closed-not-planned Closed as we don't intend to take action on the reported issue type-enhancement A request for a change that isn't a bug

Comments

@sigmundch
Copy link
Member

[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.

@sigmundch
Copy link
Member Author

Marked this as blocking #19168.

@nex3
Copy link
Member

nex3 commented Jun 3, 2014

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.

@jmesserly
Copy link

CC: Vijay. I think we are going to move away from a user-agent to indicate Dart VM support.

I'd much rather solve issue #19168 by making some polymer transformers lazy within the current system if that's at all possible.

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.

@jmesserly
Copy link

@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?

@sigmundch
Copy link
Member Author

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.

@sigmundch
Copy link
Member Author

Unmarked this as blocking #19168.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Added this to the 1.6 milestone.

@sethladd
Copy link
Contributor

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

  • changing priority
  • changing milestone

Set owner to @sigmundch.

@sigmundch
Copy link
Member Author

Removed the owner.
Removed this from the 1.6 milestone.
Removed Priority-High label.
Added Priority-Medium label.

@nex3
Copy link
Member

nex3 commented Jul 25, 2014

I think currently this isn't something we're planning to do.


Added NotPlanned label.

@sigmundch sigmundch added Type-Enhancement area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. closed-not-planned Closed as we don't intend to take action on the reported issue labels Jul 25, 2014
@DartBot
Copy link

DartBot commented Jun 5, 2015

This issue has been moved to dart-archive/barback#50.

@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed type-enhancement labels Mar 1, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. closed-not-planned Closed as we don't intend to take action on the reported issue type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

7 participants