Paul Berry
ea1b511e23
Fix handling of sdk path when building SDK summaries.
...
This was inadvertently broken by c41427383b .
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2245073002 .
2016-08-15 07:29:35 -07:00
Paul Berry
058dd73f1d
Fix instantiateToBounds behavior in summary resynthesizer to match that of StrongTypeSystemImpl.instantiateToBounds.
...
Note that StrongTypeSystemImpl.instantiateToBounds misbehaves if the
bound on one type parameter refers to a later type parameter. I'm not
sure what the intended behavior is in this case, so I've filed
dartbug.com/27072. Once that is fixed we can refine the behavior of
the summary resynthesizer further.
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2244043002 .
2016-08-12 17:29:21 -07:00
Konstantin Shcheglov
4cda900e9b
Publish new analyzer version for new DartSdk.getLinkedBundle() method.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2242663003 .
2016-08-12 15:03:41 -07:00
Sigmund Cherem
a47c9167cd
Delete CPS IR.
...
We can always revert this CL if we want to bring it back later on.
R=sra@google.com
Review URL: https://codereview.chromium.org/2246623002 .
2016-08-12 14:40:50 -07:00
John Messerly
e36fa2b3be
fix #26120 , sideways casts no longer supported
...
R=vsm@google.com
Review URL: https://codereview.chromium.org/2231273002 .
2016-08-12 14:32:36 -07:00
Konstantin Shcheglov
ee3a93a0a8
Add a new Analysis Server flag '--enable-pub-summary-manager'.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2243003002 .
2016-08-12 14:05:55 -07:00
Paul Berry
052a6c867d
Fix summary handling of unresolved imports, exports, and parts.
...
Previously this was working for a few use cases by dumb luck, but it
wasn't well tested and became broken by
b29c6bf330 . This CL fixes it for real
and adds tests to verify the fix.
Note that there is a change to how we represent an unresolved
import/export: instead of storing a URI_EXISTS modifier in the element
model, we simply mark the imported library element as synthetic.
(This library element existed anyway; we just weren't marking it as
synthetic). This makes it easy to tie in with summaries, since it is
easy for the resynthesizer to detect that the library doesn't exist at
the time the library handle is resolved.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2235373003 .
2016-08-12 13:59:51 -07:00
Konstantin Shcheglov
c0631495ef
Throw _LinkException when linking failed.
...
We cannot actually continue linking with a missing dependency, we
have to terminate it and then mark the node as failed.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2243693004 .
2016-08-12 13:25:48 -07:00
Konstantin Shcheglov
a3a031195a
Add DartSdk.getLinkedBundle() and use it in PubSummaryManager.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2242963002 .
2016-08-12 12:11:03 -07:00
Konstantin Shcheglov
9f187f3df5
Normalize paths in PhysicalResourceProvider.getFile()/getFolder().
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2239303004 .
2016-08-12 11:04:02 -07:00
Konstantin Shcheglov
df4baa4332
Fix resolveRelativeUri() to handle correctly empty contained Uri(s).
...
This was breaking linking with `package` Uri(s).
I also added a new test that exhibits this behaviour.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2242883003 .
2016-08-12 10:59:33 -07:00
Stephen Adams
b5efb1c0c1
Don't use library tag for private name prefixes
...
Use only the Uri.
R=sigmund@google.com
Review URL: https://codereview.chromium.org/2245533002 .
2016-08-12 10:20:58 -07:00
Brian Wilkerson
c41427383b
Deprecate DirectoryBasedDartSdk and transition existing uses to the new API
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2242853002 .
2016-08-12 09:18:12 -07:00
Stephen Adams
b7aa65528c
Rerun formatter
...
TBR=het@google.com
Review URL: https://codereview.chromium.org/2239193002 .
2016-08-11 19:05:59 -07:00
Konstantin Shcheglov
b290ea105f
Use existing unlinked bundles even for packages outside of the pub cache.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2232403002 .
2016-08-11 14:11:04 -07:00
Konstantin Shcheglov
bcd9642d84
Link with exports dependencies.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2243463003 .
2016-08-11 14:09:08 -07:00
Brian Wilkerson
110c0f7e0e
Prototype for package-specific cache partitions
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2237893002 .
2016-08-11 14:04:17 -07:00
Konstantin Shcheglov
e1fd213d55
Link packages with an SDK extension.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2231413003 .
2016-08-11 12:43:45 -07:00
Alexei Eleusis Diaz Vera
c365f3023b
fix typo ( #27056 )
2016-08-11 12:19:48 -07:00
Konstantin Shcheglov
bd1c47146e
Compute the linked bundle for the SDK extension.
...
As Brian noticed, we have at most one extension, it would be waste to
implement general multi-extension linking. So, for now we have support
only for one.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2240593002 .
2016-08-11 11:21:02 -07:00
Brian Wilkerson
261ef2bd1f
Bump the version prior to publishing
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2235353002 .
2016-08-11 11:17:36 -07:00
Konstantin Shcheglov
18b6c12f61
Rewrite SdkExtUriResolver into reflective.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2243493002 .
2016-08-11 09:28:59 -07:00
Konstantin Shcheglov
296d81f60a
Issue 27053. Record errors in InferStaticVariableTypeTask and include them into unit errors.
...
R=brianwilkerson@google.com , jmesserly@google.com
BUG=
Review URL: https://codereview.chromium.org/2239613002 .
2016-08-11 09:10:31 -07:00
Johnni Winther
b6a6b19a1e
Ensure correct current element for field initializers.
...
BUG=
R=sigmund@google.com
Review URL: https://codereview.chromium.org/2230853002 .
2016-08-11 13:19:36 +02:00
John Messerly
af13ca9e25
fix wrong order to isAssignableTo for override params
...
Also renames the easy-to-miss overridden/overriding to the more clear base/derived, so these bugs will come up less often.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2236763002 .
2016-08-10 17:50:33 -07:00
Stephen Adams
b6f84a01d6
dart2js: Sort libraries by Uri only.
...
Avoid using the 'library' tag.
Remove compareTo method from CompilationUnitElement and LibraryElement.
BUG=
R=sigmund@google.com
Review URL: https://codereview.chromium.org/2221273002 .
2016-08-10 17:09:27 -07:00
John Messerly
9242687547
fix #27036 , pass definite function types to LUB
...
R=vsm@google.com
Review URL: https://codereview.chromium.org/2221233002 .
2016-08-10 15:29:51 -07:00
Brian Wilkerson
c1c6e95054
Convert ContextBuilder to use FolderBasedSdk
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2235583003 .
2016-08-10 14:56:21 -07:00
Konstantin Shcheglov
5f864e237a
Add support for package cycles linking, more tests.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2227393002 .
2016-08-10 14:53:20 -07:00
Konstantin Shcheglov
e1fa540dc5
Compute both strong and spec mode unlinked bundles.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2233083002 .
2016-08-10 14:41:56 -07:00
Sigmund Cherem
e71fa2b05c
Improve error reporting: use colors and associate the appropiate file with
...
bazel-root uris.
The latter makes it possible to show errors that highlight the original source
code.
BUG=
R=het@google.com
Review URL: https://codereview.chromium.org/2237543002 .
2016-08-10 14:41:08 -07:00
Kevin Moore
78b30272f2
Remove reference to deleted compiler sample in pkg.status
...
R=sigmund@google.com
Review URL: https://codereview.chromium.org/2225683007 .
2016-08-10 14:36:23 -07:00
Konstantin Shcheglov
5ade4b47f9
Add @visibleForTesting annotation to meta.
...
R=brianwilkerson@google.com , pquitslund@google.com
BUG=
Review URL: https://codereview.chromium.org/2231993002 .
2016-08-10 13:23:32 -07:00
Brian Wilkerson
2657536034
Create new error message for missing generated files
...
R=scheglov@google.com , skybrian@google.com
Review URL: https://codereview.chromium.org/2232863004 .
2016-08-10 12:42:14 -07:00
John Messerly
efa73a440e
fix #26812 , function types should support the call method
...
R=leafp@google.com
Review URL: https://codereview.chromium.org/2226903003 .
2016-08-10 10:33:25 -07:00
Konstantin Shcheglov
fa11df13ca
Fix for updating documentationComment for top-level variables.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2238443003 .
2016-08-10 10:29:12 -07:00
Konstantin Shcheglov
0522cad42a
Convert to async/await parts that cause strong mode warnings.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2233633003 .
2016-08-10 10:28:34 -07:00
Sigmund Cherem
9968b369b9
simplify the bazel-provider to use a search path appraoch
...
R=het@google.com
Review URL: https://codereview.chromium.org/2228913004 .
2016-08-10 09:57:45 -07:00
Brian Wilkerson
38689cd848
Fix errors introduced by recent strong-mode changes
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2233913003 .
2016-08-10 09:12:49 -07:00
Brian Wilkerson
07850a6562
Remove false positive from override hint
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2228233003 .
2016-08-10 06:12:41 -07:00
Johnni Winther
5af09978e7
Fix Resolution.getResolvedAst for serialization in production mode
...
- and split analysis_test into 4 subtests.
R=sigmund@google.com
Review URL: https://codereview.chromium.org/2220333007 .
2016-08-10 10:30:05 +02:00
Konstantin Shcheglov
de837749a2
Basic linking in PubSummaryManager.
...
Many features are not implemented yet, but I'd like to show to you and
if it a step in the correct directlion, land it.
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2226973005 .
2016-08-09 18:03:13 -07:00
John Messerly
1c7aca0d6d
fix #25944 , improve Future.then inference
...
also fixes #25322 , return values of async functions are T | F<T>
R=leafp@google.com , vsm@google.com
Review URL: https://codereview.chromium.org/2208953002 .
2016-08-09 16:04:26 -07:00
Carlo Bernaschina
a5443086a0
Converted Observatory isolate-summary element
...
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2217723004 .
2016-08-09 13:15:21 -07:00
Brian Wilkerson
b29c6bf330
Suppress follow-on errors when a file is imported with either a prefix or a show clause
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2226613004 .
2016-08-09 11:11:39 -07:00
Paul Berry
1229cb7ee9
Make API signature based only on unlinked data.
...
Note that this is safe because linked data can be fully derived from
unlinked data.
This should make it more useful for the PubSummaryManager, which only
stores unlinked data at the moment.
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2228083002 .
2016-08-09 10:18:38 -07:00
John Messerly
eafe459b0e
fix #26896 , mark all @proxy ops as dynamic
...
This was already working for calls/methods because we fail to get a FunctionType. But it wasn't working for other cases like operators.
R=vsm@google.com
Review URL: https://codereview.chromium.org/2223343002 .
2016-08-09 10:15:03 -07:00
Konstantin Shcheglov
6df5ea27a5
Revert 6ad38498c8 (PARSED_UNIT).
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2231473002 .
2016-08-09 10:14:18 -07:00
Paul Berry
902ce5e739
Record information about a summary's dependencies in the summary itself.
...
The idea is that we can use this information to help discover related
summary files, and determine when summaries need to be re-linked.
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2226093002 .
2016-08-09 09:31:04 -07:00
Konstantin Shcheglov
43fef756ae
Provide LINE_INFO from ResynthesizerResultProvider.
...
Also, to guarantee that LINE_INFO is computed, we need to replace
context.getLineInfo() with context.computeLineInfo() in the server.
This should be equivalently fast in both summary (from provider) and
non-summary cases (the source should have been scanned and parsed in
order to resolve references to its elements).
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2225893003 .
2016-08-09 09:12:24 -07:00