f3f52d4b59
With the introduction of support for ".packages" files, analysis server now uses a slightly different code path for translating the Source objects from imported package files into "package:" URI's. Previously it used PackageUriResolver.resolveAbsolute(); now it uses ResourceUriResolver.resolveAbsolute(), and then translates the resulting file: URI to a package: URI uring the .packages file. The old code path used Source.fullName (the file path) to locate the file in the filesystem; the new code path uses Source.uri. This causes problems because when figuring out the correct import statement to insert, the analysis server creates a bogus Source object whose uri field is null. As a result, import fixups were getting relative paths like "../../../../.pub-cache/..." rather than package imports, which is clearly wrong. As a short term non-invasive fix, we set Source.uri in the bogus Source object, so that the new codepath is able to find the path of the imported file. R=brianwilkerson@google.com Review URL: https://codereview.chromium.org//1281313002 .