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

Self-references in generated .packages files point to the pubcache. #1294

Closed
pq opened this issue Jul 8, 2015 · 6 comments
Closed

Self-references in generated .packages files point to the pubcache. #1294

pq opened this issue Jul 8, 2015 · 6 comments
Assignees
Labels
type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@pq
Copy link
Member

pq commented Jul 8, 2015

Self-references are not properly encoded. They point to the pubcache rather than the local source.

For example, given a package foo, the .packages reference will look something like this:

foo:file:///Users/somebody/.pub-cache/hosted/pub.dartlang.org/foo-0.0.1/lib/

whereas it should look more like:

foo:file:///Users/somebody/src/dart/pkg/foo/lib/

(Note that pub symlinks do this special-casing. Which is to say we just need to get the .packages file URIs to agree with pub's symlink prior art.)

In the current state URI resolution for self-references in analyzer all fail.

@pq pq added the type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) label Jul 8, 2015
@pq pq assigned lrhn Jul 8, 2015
@nex3 nex3 assigned nex3 and unassigned lrhn Jul 8, 2015
@nex3 nex3 closed this as completed in 9cb2334 Jul 9, 2015
@sethladd
Copy link
Contributor

sethladd commented Jul 9, 2015

Thanks @nex3 !

@pq
Copy link
Member Author

pq commented Jul 9, 2015

w00t. Thank you!

On Thu, Jul 9, 2015 at 12:48 PM, Seth Ladd notifications@github.com wrote:

Thanks @nex3 https://github.com/nex3 !


Reply to this email directly or view it on GitHub
#1294 (comment).

Phil Quitslund
Software Engineer
Google, Inc.

@pq
Copy link
Member Author

pq commented Jul 10, 2015

I'm not sure this is fixed. Running pub from a fresh build of the SDK I'm still seeing mappings to my .pub-cache for a self-reference.

[~/src/git/clones/analyzer_cli] (master) $ pub --version
Pub 1.12.0-edge.ec398a7385e634cd60b392d51a8650c140d4cb5f
[~/src/git/clones/analyzer_cli] (master) $ pub get
Resolving dependencies...
Warning: You are using these overridden dependencies:
! analyzer 0.25.1 from path /Users/me/src/git/clones/dart/sdk/pkg/analyzer
Got dependencies!
[~/src/git/clones/analyzer_cli] (master) $ cat .packages | grep analyzer_cli
analyzer_cli:file:///Users/me/.pub-cache/hosted/pub.dartlang.org/analyzer_cli-1.1.0/lib/

@pq pq reopened this Jul 10, 2015
@pq
Copy link
Member Author

pq commented Jul 10, 2015

Oh wait... @nex3 : maybe we just need to update the pub_rev in DEPS?

@pq
Copy link
Member Author

pq commented Jul 10, 2015

Running pub from the repo seems to do the right thing.

[~/src/git/clones/pub] (master) $ pub run pub get
Resolving dependencies...
Got dependencies!
[~/src/git/clones/pub] (master) $ cat .packages | grep pub:
pub:./lib/

So I think updating DEPS is all we need. :)

@pq
Copy link
Member Author

pq commented Jul 10, 2015

Whoops. Looks like I failed to re(sync) before I built. I just confirmed that DEPS is actually up to date. Closing out since I think we're actually good to go.

@pq pq closed this as completed Jul 10, 2015
nex3 added a commit that referenced this issue Jul 13, 2015
This will help avoid issues like #1294 in the future.

R=rnystrom@google.com, rnystrom@gmail.com

Review URL: https://codereview.chromium.org//1227913009 .
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

4 participants