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

Pub transformers running on own package get modified package: URIs #890

Closed
DartBot opened this issue Jun 5, 2015 · 3 comments
Closed

Pub transformers running on own package get modified package: URIs #890

DartBot opened this issue Jun 5, 2015 · 3 comments
Assignees
Labels
type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@DartBot
Copy link

DartBot commented Jun 5, 2015

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


When a pub transformer is running on it's own package the Dart source files that it loads have package: imports changed to /package/.

The conversion from package: to /package/ should be an internal detail- if required for isolate loading then assets fetched via transform.readAsInputString should use a different transfer mechanism.

These imports leak when the transformer modifies the source code- if the transformer does not remove the /package/ then this propagates down the chain.

@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


We could probably make [transform.readAsInputString] avoid this, but it would likely be a lot of work and further degrade the "pub serve"/"pub build" startup time. The "/package/" workaround will go away when issue dart-lang/sdk#12474 is fixed, so I'm going to mark this blocked.


Marked this as being blocked by dart-lang/sdk#12474.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

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


Can this be addressed now?


Set owner to @nex3.

@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


I believe this is no longer an issue.


Added Fixed label.

@DartBot DartBot added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) Fixed labels Jun 5, 2015
@DartBot DartBot closed this as completed Jun 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

2 participants