Commit Graph

13 Commits

Author SHA1 Message Date
Alexander Thomas b5c63ce757 [infra] Migrate scripts to python3
* Migrate to python3; drop python support.
* Update Windows toolchain support.
* Remove some unused methods.
* Python 2.7 is still needed on Windows.
* Update gsutil to a version that supports python3.

Fixes: https://github.com/dart-lang/sdk/issues/28793

TEST=Manually tested common user journeys.

Change-Id: I663a22b237a548bb82dc2e601e399e3bc3649211
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192182
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-04-15 10:10:20 +00:00
Wink Saville bbdb7860f6 [build]: Build on Arch Linux with python 2.7-3.8
This change allow builds to succeed on Arch Linux with python 2.7, 3.7.4
and 3.8. Otherwise it fails with python 3.7.4 and 3.8.

- bin_to_assembly.py

  Using ord(byte) here is an error on python 3.x use a conditional
  expression instead.

- create_archive.py

  Using ord(byte) here is an error on python 3.x use a conditional
  expression instead.

  Use `as inst` syntax which is required by 3.x

- create_string_literal.py
- gen_library_src_paths.py

  Use `as inst` syntax which is required by 3.x

- make_version.py

  print >> sys.stderr syntax is not supported by 3.x use file=sys.stderr
  and add `from __future__ import print_function`

  vmhash.update requires a string use encode('utf-8')

  versopm+cc+text.replace requires a str so use `decode`.

Test: No added tests as there are no behavioral changes.
Change-Id: Id9b0a3187d06ad2b2dce3cf2244144393caddc9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124211
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2019-11-10 21:09:58 +00:00
Nate Bosch 55f81f2210 Mass format python with yapf
- Add `.style.yapf` with configuration to use Google style.
- Run `yapf` on all `.py` files in this repo.
- Manually fix one trailing space in a doc string.
- Run `git cl format runtime` to satisfy presubmit.

Change-Id: I7e6bd11e91f07926b9188362599af398551eed79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111600
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2019-08-05 20:34:31 +00:00
Alexander Aprelev d822bdb797 Prefix scripts from core builtin libraries so the URIs are unique.
After https://dart-review.googlesource.com/c/sdk/+/7588 we ended up with two crypto.dart files in the core prebuilt libraries(io and _http), which caused problem with coverage tool that relied on the fact that script uris can uniquely identify files. https://github.com/dart-lang/coverage/issues/194 was filed to handle non-unique uris.
This CL ensures that core builtin libraries URIs stays unique by prefixing them with 'dart:' library prefix. This makes core builtin libraries scripts have names similarly structured to script names for other core libraries.

Bug:
Change-Id: I79960f4f24e6e958836df866365355584c28df27
Reviewed-on: https://dart-review.googlesource.com/11140
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-10-05 15:47:43 +00:00
Siva Annamalai f436b4986c Related to issue 27860
- Removed code which stored the source code paths for core and
  builtin libraries.

BUG=27860
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2921513002 .
2017-06-01 11:11:09 -07:00
Florian Schneider 15a4d5d6d1 Windows: Link library sources into gen_snapshot/dart_bootstrap
This allows gen_snapshot and dart_bootstrap to run without having
a full SDK snapshot around.

The generated cc file looks like:

static const char source_array_1[] = {
 '\x2f', '\x2f', '\x20', '\x43', '\x6f', ...
};
static const char source_array_2[] = {
 '\x2f', '\x2f', '\x20', '\x43', '\x6f', ...
};
...

const char* dart::Bootstrap::core_source_paths_[] = {
 "dart:core",
 "/path/to/sdk/lib/core/core.dart",
 source_array_1,

 "annotations.dart",
 "/path/to/sdk/lib/core/annotations.dart",
 source_array_2,
...

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2668353004 .
2017-02-01 15:55:59 -08:00
Zachary Anderson 87e1fc7859 Add #! lines and +x scripts run by the build system
Landing https://codereview.chromium.org/2151053002/ for jamesr.

Review URL: https://codereview.chromium.org/2152913002 .
2016-07-14 12:46:57 -07:00
Ivan Posva f28afad353 - Do not include the sources as part of the generated files on
Windows to avoid creating string literals that are too large.

BUG=

Review URL: https://codereview.chromium.org/1453353002 .
2015-11-17 16:11:26 -08:00
Ivan Posva d97c7bdbde - Include sources in gen_snapshot and dart_no_snapshot to allow
creating full snapshots without having a full Dart SDK checkout.

BUG=
R=asiva@google.com, chinmaygarde@google.com

Review URL: https://codereview.chromium.org/1449163003 .
2015-11-17 14:58:09 -08:00
asiva@google.com 4577abd566 Third step towards loading core library scripts directly from the sources
- Read the patch source files using the source mapping array generated for
  patch files instead of relying on a generated buffer containing the sources.

- Modify the gyp files to ensure that all patch libraries are read directly
  from the sources. Remove the source buffer generation step in the gypi
  files for all patch files.

R=hausner@google.com, iposva@google.com

Review URL: https://codereview.chromium.org//14784010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22436 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-06 18:16:25 +00:00
asiva@google.com ea5a3919c5 Resubmit 22380 after fixing the windows build.
R=hausner@google.com

Review URL: https://codereview.chromium.org//14645025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22396 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-03 22:50:26 +00:00
asiva@google.com dab8758e7a Revert 22380 to investigate windows build break.
Review URL: https://codereview.chromium.org//14927003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22382 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-03 18:26:34 +00:00
asiva@google.com 27e78fb6f8 Second step towards loading core library scripts directly from the sources
- Modify the library source generator to generate a source mapping array
  The generated array is of the following format:
  const char* dart::Bootstrap::corelib_source_paths_[] = {
    "dart:core", "/workspace1/dart-all/dart/sdk/lib/core/core.dart", 

    "bool.dart", "/workspace1/dart-all/dart/sdk/lib/core/bool.dart", 
    ...
    ...
  };

- Read the source file using the source mapping array instead of relying on
  a generated buffer containing the sources

- Modify the gyp files to ensure that all libraries are read directly
  from the sources. This CL does not change the patch part yet.
  Remove the source concatentation step in the gypi files for all the core
  libraries.

R=hausner@google.com, iposva@google.com

Review URL: https://codereview.chromium.org//14786012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22380 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-03 18:12:24 +00:00