Commit graph

6409 commits

Author SHA1 Message Date
Clement Skau fcbf5341f0 [SDK] Fixes crash in tools/run_abi_tests.py
logRecords is expected to be of type dict, but the fallback value
was previously set to [] (type list).

This CL changes the fallback values to an empty dict.
It also uses the builtin dict.get() to handle to fallback instead
of manually doing so.

Note: This CL will not make the bot go green.
It will change it from purple (infra failure due to crash) to red
since there are tests that are legitimately failing.

Bug: https://github.com/dart-lang/sdk/issues/42625
Cq-Include-Trybots: dart/try:vm-dartkb-linux-release-x64-abi-try
Change-Id: I12ad7688719039566cd16e128997f0f8efc60a69
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153600
Commit-Queue: Clement Skau <cskau@google.com>
Auto-Submit: Clement Skau <cskau@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2020-07-08 09:56:04 +00:00
Jonas Termansen d47395255b [benchmark] dartdevc doesn't need the --kernel option anymore.
Change-Id: Ibb90f674b181de225ccb4db7087c5733122f2891
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153463
Auto-Submit: Jonas Termansen <sortie@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-07-07 16:11:51 +00:00
Clement Skau bec928c89f [SDK] Bumps ABI version for sdk_hash.
The ABI version was bumped in the first revision of the sdk_hash CL,
but was lost during a rebase:
https://dart-review.googlesource.com/c/sdk/+/152802/1

Change-Id: Ic677ada4923c92b9ad5e799e86564fffdfef0870
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153460
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2020-07-07 14:53:21 +00:00
Clement Skau 0ce83987d6 Reland "[SDK] Adds an SDK hash to kernels and the VM."
Note: This is a reland of https://dart-review.googlesource.com/c/sdk/+/150343

Adds a new SDK hash to kernels and the VM which is optionally checked
to verify kernels are built for the same SDK as the VM.
This helps catch incompatibilities that are currently causing
subtle bugs and (not so subtle) crashes.

The SDK hash is encoded in kernels as a new field in components.
The hash is derived from the 10 byte git short hash.

This new check can be disabled via:
  tools/gn.py ... --no-verify-sdk-hash

This CL bumps the min. (and max.) supported kernel format version,
making the VM backwards incompatible from this point back.

This also bumps the min. and current ABI version.

Bug: https://github.com/dart-lang/sdk/issues/41802
Change-Id: I2f85945045a603eb9dcfd1f2c0d0d024bd84a956
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152802
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-07-07 06:08:20 +00:00
Jonas Termansen a0d77cbc69 [benchmark] Test dart2js sound nullability options.
Change-Id: Ie548ad57094cd334b95d1c49f2a8f02ce762f56f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153207
Reviewed-by: Alexander Thomas <athom@google.com>
2020-07-03 14:27:32 +00:00
Erik Ernst f4d7951a88 For external/abstract fields: add tests and update Dart.g
This CL adds tests in language/external_abstract_fields, testing the
support for abstract instance variables, and for external top-level,
class, and instance variables. It is tested that the syntax of
supported declarations is accepted, and a number of non-supported
forms are rejected, and abstract fields are tested at run time as well.

The implementation of external fields is provided by an implementation
specific mechanism, and no tests are added for any such mechanisms
(that is, with external fields we only test errors).

This CL also updates the spec grammar Dart.g to include grammar
rules for the new kinds of declarations, and it has been verified that
the new tests are passing, respectively cause syntax errors, as
indicated in the test files.

The tests are a further development of the ones in
https://dart-review.googlesource.com/c/sdk/+/145862.

Change-Id: I13be746a05d5acf0117d8cb22151bd9863a71a78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148324
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-07-02 13:39:39 +00:00
Srujan Gaddam f8ff12008e [dart:html] Revert commits using MDN compatibility info
This reverts commits aff77e7e..e24f205d.

Due to a breakage in a Flutter roll, this CL stack needs to be
reverted. It should be reintroduced with changes to Flutter code to
compile with the changes in dart:html.

Breakage: https://github.com/flutter/engine/runs/828631927

Change-Id: I9c93c4eab823337d09d2e347015ad9ec402f2038
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152910
Auto-Submit: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2020-07-02 01:33:18 +00:00
Srujan Gaddam e24f205d16 [dart:html] Mark setters nullable if incompatible as well
Getter types need to be a subtype of the setter type, so if getters
are nullable due to incompatibility, the setter needs to be as well.
This change makes those changes, updates documentation, and modifies
a template and test file.

Change-Id: I2130538bb4005b3553eb7951af022c1c2ed59c1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152607
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-07-01 22:06:34 +00:00
Srujan Gaddam 7349385185 [dart:html] Changes to template/src to handle compat data
Mostly null-assertions to make code compatible with compat
data changes.

Change-Id: I8f7c6c2421d6427851a44588978910deae8440bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152047
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-07-01 22:06:34 +00:00
Srujan Gaddam 76d7739cf7 [dart:html] Add compatiblity to manually written native getters
Native getters in src/template files are modified to reflect the info
in the compatibility data.

Change-Id: I98f96737e21c7b4ce6bd17ea398e9806c61122b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152046
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-07-01 22:06:34 +00:00
Srujan Gaddam 1d97a4a375 [dart:html] Handle method overrides for MDN
Native getters that are incompatible were marked as nullable even
though they may override methods that aren't nullable. This fixes
those conflicts for various HTML methods.

Change-Id: I7c2456d5d223d825428cedb847d20139b7d271c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152045
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-07-01 22:06:34 +00:00
Srujan Gaddam 45595624f1 [dart:html] Add secure context logic to mdnreader
Bug: https://github.com/dart-lang/sdk/issues/41944

Note that the compatibility data on secure contexts is fairly
sparse and has missing information. There are only two APIs that
have secure context info on them and they're already marked as
incompatible.

Change-Id: Iaf9ecb7a916c8ac20b32e1ea92ed44981f675659
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152044
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-07-01 22:06:34 +00:00
Srujan Gaddam aff77e7ed7 [dart:html] Incorporate MDN compatibility data
Bug: https://github.com/dart-lang/sdk/issues/41905

Uses MDN information in the generator script to get a better idea
of which attributes are compatible and are not. mdnreader.py is
introduced to parse the data present in third_party.

Change-Id: I330ccf918cb42deb4c09ab97db5f3d2f0c432d99
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149800
Reviewed-by: Stephen Adams <sra@google.com>
2020-07-01 22:06:34 +00:00
Jacob MacDonald 51ac86c753 update collection dep, and add flutter-engine patch
Change-Id: I5e8b0eb2b161b71734feebb6e13d039082ad6bc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152860
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2020-07-01 20:50:38 +00:00
Srujan Gaddam ff8f128a76 [dart:html] Update console interface
Closes https://github.com/dart-lang/sdk/issues/42213

Adds nullability to Console, adds missing methods and cleans
cleans existing ones up, and removes a stale template. Most
modifications are derived from https://console.spec.whatwg.org/
and the rest are derived from the MDN.

Change-Id: I26a099b15e53a4748afb61c7532bdbf64d7c4d6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151091
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-06-30 23:32:27 +00:00
Devon Carew fc1999de15 [dartdev] Implement --enable-experiments for dart run and dart pub run.
Related to https://github.com/dart-lang/sdk/issues/42339.

Change-Id: I3fdeee33dcad0ca031f483e2e3692be300392958
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152960
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-06-30 23:22:42 +00:00
Alexander Markov e2e1820c33 Bump ABI version
Fixes https://github.com/dart-lang/sdk/issues/42516

Change-Id: Id6bd07ad1d8ea2e151b0d908edfc98f24dc3a791
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153001
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-06-30 18:33:54 +00:00
Daco Harkes 585fa217a1 [benchmarks/ffi] Migrate benchmarks to NNBD
Change-Id: I36568f4f4d59c0a337aab82b6ca15d40495cb269
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152850
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
2020-06-30 14:44:27 +00:00
Clement Skau 34dbe66e7d [SDK] Clean up tools/utils.py. Style; Py2/3 compatible;
- Imports __future__.print_function to make printing consistent and
  robust across Python versions.
- Removes do-nothing os.path.join()s.
- Replaces all " with ' for consistency.
- Further gathers all "consts" and helpers at the top.
- Replaces old-style modulo formatting operator with new-style .format().
- Removes redundant if-return-else-return patterns for readability.
- Parameterises several subprocess cwd instead of hardcoded values.
  This should make it easier to use with other paths (g3 builds).
- Adds decode()'ing to process output to convert bytes to strs.
  This stops json.dump crashing in Py3. As well as Golem crashing in gn.
- Style, formatting, etc., etc.

Change-Id: I2bd7136aa18b12c4b18d9260f1539f16630065a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152842
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2020-06-30 13:22:30 +00:00
Jonas Termansen 5001e461ea [benchmark] Test null safe options.
TBR=athom@google.com

Change-Id: Ic3ea7969ea486f646669e0cff6bb59385bc927c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151843
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-06-30 10:31:26 +00:00
Clement Skau 46bd867651 [SDK] Clean up tools/utils.py. Order consts, helpers.
This refactoring is being done to make it easier to integrate
this code into internal builds.

It has the added benefit of cleaning up some really wonderful code.

Change-Id: I30f22785cc1f3dec00e01fb809115344284375c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152840
Auto-Submit: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2020-06-29 15:05:23 +00:00
William Hesse eb1bc0c6be Revert "[build] Use Goma from depot_tools instead of $HOME/goma"
This reverts commit 7fc61e77e2.

Reason for revert: An internal build is now trying to use goma
  when it shouldn't, and failing. There is no easy way to override
  this setting in build.py, and there should be.

Original change's description:
> [build] Use Goma from depot_tools instead of $HOME/goma
> 
> Goma will only be distributed with depot_tools in the future.
> 
> Change-Id: Ia7a7faf76f2562bde97d4f88cfe5db02ba76b561
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152652
> Reviewed-by: Alexander Thomas <athom@google.com>
> Commit-Queue: Alexander Thomas <athom@google.com>

TBR=karlklose@google.com,athom@google.com,whesse@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I754e4a9d93090e014a995e86c46422989cf536d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152800
Reviewed-by: William Hesse <whesse@google.com>
2020-06-29 08:02:57 +00:00
William Hesse 7fc61e77e2 [build] Use Goma from depot_tools instead of $HOME/goma
Goma will only be distributed with depot_tools in the future.

Change-Id: Ia7a7faf76f2562bde97d4f88cfe5db02ba76b561
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152652
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2020-06-26 21:34:58 +00:00
Jacob MacDonald 25d8ae53c1 add fixnum deps patch for flutter hhh bots
Change-Id: Ib028d99923c52d06a7b43f223d3abfe469820b20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152611
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2020-06-26 19:16:10 +00:00
asiva bb8d145616 Revert "[SDK] Adds an SDK hash to kernels and the VM."
This reverts commit edde575dcd.

Reason for revert: Breaks the Dart to Flutter roll and golem

Original change's description:
> [SDK] Adds an SDK hash to kernels and the VM.
>
> Adds a new SDK hash to kernels and the VM which is optionally checked
> to verify kernels are built for the same SDK as the VM.
> This helps catch incompatibilities that are currently causing
> subtle bugs and (not so subtle) crashes.
>
> The SDK hash is encoded in kernels as a new field in components.
> The hash is derived from the 10 byte git short hash.
>
> This new check can be disabled via:
>   tools/gn.py ... --no-verify-sdk-hash
>
> This CL bumps the min. (and max.) supported kernel format version,
> making the VM backwards incompatible from this point back.
>
> Bug: https://github.com/dart-lang/sdk/issues/41802
> Change-Id: I3cbb2d481239ee64dafdaa0e4aac36c80281931b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150343
> Commit-Queue: Clement Skau <cskau@google.com>
> Reviewed-by: Jens Johansen <jensj@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

TBR=kustermann@google.com,jensj@google.com,cskau@google.com

Change-Id: I34cc7d378e2babdaaca4d932d19c19d0f35422fc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/41802
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152703
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-06-26 18:54:17 +00:00
Clement Skau edde575dcd [SDK] Adds an SDK hash to kernels and the VM.
Adds a new SDK hash to kernels and the VM which is optionally checked
to verify kernels are built for the same SDK as the VM.
This helps catch incompatibilities that are currently causing
subtle bugs and (not so subtle) crashes.

The SDK hash is encoded in kernels as a new field in components.
The hash is derived from the 10 byte git short hash.

This new check can be disabled via:
  tools/gn.py ... --no-verify-sdk-hash

This CL bumps the min. (and max.) supported kernel format version,
making the VM backwards incompatible from this point back.

Bug: https://github.com/dart-lang/sdk/issues/41802
Change-Id: I3cbb2d481239ee64dafdaa0e4aac36c80281931b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150343
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-06-26 13:35:42 +00:00
Karl Klose 99144ed84d [infra] Remove support for approvals from compare_results
Change-Id: I41d80e8d21da0e272c0410f6f1d1e943bf4ae2d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152640
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2020-06-26 11:26:55 +00:00
Karl Klose 718df630ea [infra] Support posting results to staging in post_results_to_pubsub
This adds the option '-s' to select posting the results to the
staging system instead of the production system.

Change-Id: I990a39c7db3d0379935b69007ebc9477da5cc051
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151528
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2020-06-26 06:28:55 +00:00
Alexander Thomas 0a77a1f63e [infra] Add VM/fuchsia builder to the test matrix
Change-Id: I9afdd14957b660ad5366f7fb58e5f341f21effee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152145
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2020-06-25 07:20:48 +00:00
Alexander Aprelev d33e51df3c [build] Support --clang when building dart sdk on Windows.
It relies on flutter copy of clang distribution, same one that is used to build flutter/engine.

It addressed several deprecated warnings from clang compiler for functions like strdup, unlink, etc.

It allows few warnings still since they are triggered in third_party sources.

Change-Id: Ieb13792c011438d46dbbc0fa030e1b5e4ea14315
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142704
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-06-25 03:36:41 +00:00
Jens Johansen 4291a81a02 Add 'alternative-invalidation-strategy' as an experiment
To be used to enable the alternative invalidation strategy for
incremental compilation.

Change-Id: Ie4b140825d90f98aed8209eb3a5da8f2fa4dc192
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150341
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-06-24 07:18:41 +00:00
Srujan Gaddam b5470ae013 [dart:html] Modify scripts to always use NNBD
Since the sdk has been unforked, scripts should be updated to
generate files by always using NNBD. As such, nnbd_src has been
moved to src and the old src has been deleted. This does not address
the nnbd tokens e.g. $NULLABLE. That will be done in a future CL.

Change-Id: I00bead16a9d19569b07ad0601f581fc14400fdce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151864
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-06-23 23:17:35 +00:00
Robert Nystrom 4993179a62 Correctly run legacy tests.
Feels a little weird to be improving a script that will hopefully be
gone in less than a week, but the current behavior is definitely wrong.

Change-Id: I43e8606b82b95f071d359ab348261e85bc4cbe7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152220
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-06-23 23:06:05 +00:00
David Morgan 6bdf55f31f Revert "[vm, service, observatory] Bang Bang (My Type System Shot Me Down)."
This reverts commit 65e3c9d3b1.

Reason for revert: package:logging, package:stack_trace and package:usage need to be migrated first.

Original change's description:
> [vm, service, observatory] Bang Bang (My Type System Shot Me Down).
> 
> Port the service tests and Observatory to Dart 3.
> 
> Changes from the original landing:
> 
>  - The old tests are copied to observatory_2 / service_2 so the service can still be tested when running a legacy mode program
>  - The test harness is taught about 'service_2'
>  - Observatory's package is added to front end's opt-in list
>  - Fixed some places in the bot configuration matrix so ensure 'service' runs on legacy bots and 'service_2' on weak-mode bots
> 
> The ported tests themselves are not changed.
> 
> Change-Id: I1d7e5cc61cdc044e1985e851bea7fd8a18f7d810
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149720
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Ben Konyi <bkonyi@google.com>

TBR=bkonyi@google.com,rmacnak@google.com

Change-Id: I43b72f149d8d7e9fe06006cdd8593fed1726aa3a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152004
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2020-06-23 08:06:00 +00:00
Ryan Macnak 65e3c9d3b1 [vm, service, observatory] Bang Bang (My Type System Shot Me Down).
Port the service tests and Observatory to Dart 3.

Changes from the original landing:

 - The old tests are copied to observatory_2 / service_2 so the service can still be tested when running a legacy mode program
 - The test harness is taught about 'service_2'
 - Observatory's package is added to front end's opt-in list
 - Fixed some places in the bot configuration matrix so ensure 'service' runs on legacy bots and 'service_2' on weak-mode bots

The ported tests themselves are not changed.

Change-Id: I1d7e5cc61cdc044e1985e851bea7fd8a18f7d810
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149720
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2020-06-23 02:12:46 +00:00
Joshua Litt 77db092507 [dart2js] Stop running dart2js_2 suite when running unittests.
Change-Id: Icb16045bade65712dc2a8e18e960696077582f8d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152040
Auto-Submit: Joshua Litt <joshualitt@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-06-22 21:28:31 +00:00
Karl Klose dbefbc3753 [infra] Empty SDK commit to validate recipe changes
TBR=athom@google.com

Change-Id: I119d97af610b2ca28517717fb1fb29760ab41c49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151845
Reviewed-by: Karl Klose <karlklose@google.com>
2020-06-22 04:54:21 +00:00
Liam Appelbe 4f1294e495 Fix bug in utils.py, causing SDK bots to fail
https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8877199214187649920/+/steps/upload_sdk/0/stdout

Change-Id: I08d70c64d8ea17645c5071f58aeafd0d81073137
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151780
Auto-Submit: Liam Appelbe <liama@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-06-18 18:21:36 +00:00
Liam Appelbe 764e72800f Reland "Revert "Add an --os=fuchsia option to build.py:""
This reverts commit d39d4d0d55.

Reason for revert: Relanding with fix

Change-Id: I6d6911b6cdc578a3b576b237db94c7f1db9824b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151600
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-06-18 00:24:31 +00:00
Jonas Termansen 4a7e14a025 [benchmark] Add .dart_tool/package_config.json to builds.
Change-Id: I8043c207a95492f00442750e4cb31700495b799d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151513
Reviewed-by: Alexander Thomas <athom@google.com>
2020-06-17 19:35:23 +00:00
Joshua Litt d14ab0779a [dartdevc] Migrate tests/compiler/dartdevc_native to tests/dartdevc_2.
Change-Id: I9c486f29f3bcf8a6ecf481eb25ea61d0468049b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150667
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-06-17 18:14:00 +00:00
Martin Kustermann 168539d61d Reland "[vm] Build dart2native dependencies with the normal "create_sdk" target"
The flutter engine DEPS got new icu/boringssl so this CL can safely
land and roll into engine. A small change is made in Patchset 1..3.

This removes special logic for creating the `dart-sdk` we distribute
which used to build release and product mode and copied some binaries
from the latter into the former, before the SDK was actuallly ready to
test and distribute.

This changes the GN build rules to build the necessary
gen_snapshot/dart_precompiled_runtime product binaries during the normal
release build.

Normally during --mode=product builds the global build config in
//build/config/BUILDCONFIG.gn will set `-fvisibility=false`.

=> Doing so results in much smaller binaries - because only explicitly
   exported symbols are visible, the rest can be tree shaken by the linker.

Since we are building --mode=release, the `-fvisibility=false` will not
be set. In order to set the flag for the 2 special product-mode binaries
we need to add -fvisibility=hidden manually, in:

  * dart_product_config: Which is used for compiling VM sources.
  * 3rd party double-conversion library
  * 3rd party boringssl library
  * 3rd party icu library

The upstream CLs are:

  * BoringSSL: https://dart-review.googlesource.com/c/boringssl_gen/+/150482
  * ICU: https://chromium-review.googlesource.com/c/chromium/deps/icu/+/2236407

Issue https://github.com/dart-lang/sdk/issues/42230

Change-Id: I8d9b37acbb5eb94e44d97652f838948a946fd372
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151505
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2020-06-17 16:12:26 +00:00
Alexander Thomas 1046888b1b [build] Also default to use a sysroot when the HOST_OS is linux
Previously, gn.py would not enable the sysroot when building for android
on Linux. However, the build also uses the host toolchain to create
tools and these need to be built with the sysroot. Otherwise, the new
goma backend refuses to run the build actions.

b/144018396

Change-Id: Ifda03ac82ce7d4cc8289198924a8316ab6751f45
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151389
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2020-06-17 06:53:40 +00:00
Leaf Petersen d44457f79d [Core Libraries] Eliminate the fork in the core libraries.
Move the nnbd core libraries from sdk_nnbd to sdk, and updates
references in build files and elsewhere accordingly.

Change-Id: I09760fe1e006657aacdfe80f3b22fdf6f7e30a9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151121
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-06-16 23:37:36 +00:00
Martin Kustermann 21222b64c4 Revert "[vm] Build dart2native dependencies with the normal "create_sdk" target"
This reverts commit a88a328b7f.

Reason for revert: Auto roller hasn't rolled previous changes from
Dart yet. Those changes updated DEPS for icu/boringssl. We have to
wait with this CL until the DEPS changes have been done in the engine.

Original change's description:
> [vm] Build dart2native dependencies with the normal "create_sdk" target
> 
> This removes special logic for creating the `dart-sdk` we distribute
> which used to build release and product mode and copied some binaries
> from the latter into the former, before the SDK was actuallly ready to
> test and distribute.
> 
> This changes the GN build rules to build the necessary
> gen_snapshot/dart_precompiled_runtime product binaries during the normal
> release build.
> 
> Normally during --mode=product builds the global build config in
> //build/config/BUILDCONFIG.gn will set `-fvisibility=false`.
> 
> => Doing so results in much smaller binaries - because only explicitly
>    exported symbols are visible, the rest can be tree shaken by the linker.
> 
> Since we are building --mode=release, the `-fvisibility=false` will not
> be set. In order to set the flag for the 2 special product-mode binaries
> we need to add -fvisibility=hidden manually, in:
> 
>   * dart_product_config: Which is used for compiling VM sources.
>   * 3rd party double-conversion library
>   * 3rd party boringssl library
>   * 3rd party icu library
> 
> The upstream CLs are:
> 
>   * BoringSSL: https://dart-review.googlesource.com/c/boringssl_gen/+/150482
>   * ICU: https://chromium-review.googlesource.com/c/chromium/deps/icu/+/2236407
> 
> Issue https://github.com/dart-lang/sdk/issues/42230
> 
> Change-Id: I3e47664d9fadb9ed1ad033bb17d46e769442f741
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150524
> Commit-Queue: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Alexander Thomas <athom@google.com>
> Reviewed-by: Zach Anderson <zra@google.com>

TBR=kustermann@google.com,zra@google.com,athom@google.com,asiva@google.com

Change-Id: Ied0f2f5b58dceb2b59bc2ac6e11e5fd717c8885e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151382
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-06-16 10:41:27 +00:00
Joshua Litt 09ea885dcd [testing] Rename dart2js filesets more generically.
Change-Id: I00b2cea7bad20837940334dadf1862b1511fd698
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151342
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2020-06-16 01:20:26 +00:00
George Wright d39d4d0d55 Revert "Add an --os=fuchsia option to build.py:"
This reverts commit 4ce18ab931.

Reason for revert: bad merge, caused build breakages in flutter/engine

Original change's description:
> Add an --os=fuchsia option to build.py:
> 
> tools/build.py --os=fuchsia runtime create_sdk
> 
> This is analogous to --os=android. It cross compiles from Linux x64 to
> Fuchsia.
> 
> A lot of the build rules are just slightly different between the existing
> Fuchsia build rules used by Flutter, and the ones added by GN SDK. For
> example "$fuchsia_sdk_root/pkg:fdio" is now "$fuchsia_sdk_root/pkg/fdio".
> So to support this I had to add a new variable, using_fuchsia_gn_sdk,
> analogous to using_fuchsia_sdk. Flutter will need to set this to false.
> 
> Change-Id: Ief275d65f30a42a801607de93cf2d27a1fe825dd
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150689
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Liam Appelbe <liama@google.com>

TBR=rmacnak@google.com,asiva@google.com,liama@google.com,kaushikiska@google.com,matthewcarroll@google.com

Change-Id: If01ee34eba906c55f2d56ba650748a86e81e701c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151321
Auto-Submit: George Wright <wrightgeorge@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2020-06-15 23:01:53 +00:00
Alexander Markov badc77239a [vm/aot] Avoid unbinding canonical names in AOT transformations
AOT transformations (mixin deduplication and TFA tree shaker) were
using CanonicalName.unbind() in order to make sure that kernel
writer will not be able to write dangling references to the deleted
classes or members (to detect such dangling references earlier).

This conflicts with lazy reading from a kernel file if --from-dill
option is used: lazy reader may read a reference to such class after
unbind() and it creates a new Reference object for such canonical name.
This causes crash later when the fresh Reference is used as it doesn't
have Class node filled in.

The solution is to avoid calling CanonicalName.unbind().
Instead, it is enough to nullify node.reference.canonicalName, which
won't break CanonicalName.reference used by lazy reader.

This crash can be reproduced on tests/language_2/vm/regress_flutter_55345_test.dart
if it is compiled in AOT mode using 2-step kernel generation.

Bug: b/158853113
Change-Id: Ib2004dbbbda85d9f56adc56b48882f4ef08869a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151120
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-06-15 22:00:42 +00:00
Liam Appelbe 4ce18ab931 Add an --os=fuchsia option to build.py:
tools/build.py --os=fuchsia runtime create_sdk

This is analogous to --os=android. It cross compiles from Linux x64 to
Fuchsia.

A lot of the build rules are just slightly different between the existing
Fuchsia build rules used by Flutter, and the ones added by GN SDK. For
example "$fuchsia_sdk_root/pkg:fdio" is now "$fuchsia_sdk_root/pkg/fdio".
So to support this I had to add a new variable, using_fuchsia_gn_sdk,
analogous to using_fuchsia_sdk. Flutter will need to set this to false.

Change-Id: Ief275d65f30a42a801607de93cf2d27a1fe825dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150689
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-06-15 20:05:16 +00:00
Martin Kustermann a88a328b7f [vm] Build dart2native dependencies with the normal "create_sdk" target
This removes special logic for creating the `dart-sdk` we distribute
which used to build release and product mode and copied some binaries
from the latter into the former, before the SDK was actuallly ready to
test and distribute.

This changes the GN build rules to build the necessary
gen_snapshot/dart_precompiled_runtime product binaries during the normal
release build.

Normally during --mode=product builds the global build config in
//build/config/BUILDCONFIG.gn will set `-fvisibility=false`.

=> Doing so results in much smaller binaries - because only explicitly
   exported symbols are visible, the rest can be tree shaken by the linker.

Since we are building --mode=release, the `-fvisibility=false` will not
be set. In order to set the flag for the 2 special product-mode binaries
we need to add -fvisibility=hidden manually, in:

  * dart_product_config: Which is used for compiling VM sources.
  * 3rd party double-conversion library
  * 3rd party boringssl library
  * 3rd party icu library

The upstream CLs are:

  * BoringSSL: https://dart-review.googlesource.com/c/boringssl_gen/+/150482
  * ICU: https://chromium-review.googlesource.com/c/chromium/deps/icu/+/2236407

Issue https://github.com/dart-lang/sdk/issues/42230

Change-Id: I3e47664d9fadb9ed1ad033bb17d46e769442f741
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150524
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2020-06-15 15:17:35 +00:00