Commit Graph

22 Commits

Author SHA1 Message Date
Alexander Thomas 1392d61c9b [infra] Modify 2.7.0 make_version hack so that it also works on other branches
The logic only worked on the 'be' branch but if Flutter uses a dev branch hash
they would get a dev release version rather than the hardcoded 2.7.0 version.

Change-Id: I6be3b3a115a10dfb6e2a6d1407d27f96c6d88396
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126823
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-12-02 18:56:41 +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
Alexander Thomas d2bd6df607 [infra] Update make_version.py hack for Flutter for 2.7.0
This prolongs the make_version.py hack for Flutter for the 2.7.0 Dart
release.

Change-Id: Ic8324461b195be65a7c3afd3bb34c7f186b29657
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122501
Reviewed-by: Siva Annamalai <asiva@google.com>
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2019-11-04 11:33:43 +00:00
Alexander Thomas e2fdff1009 [infra] Add hack to hardcode version to 2.5.0 for Flutter 1.9
This adds a temporary hack causing make_version.py to report 2.5.0 if
the VERSION file's major.minor.patch = 2.5.0 and the channel is be and
--custom_for_pub = flutter. As soon as the VERSION file is bumped on
master, the hack will become a no-op and can be removed.

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

Change-Id: Icaff27e35686dfe4c69c17f7edbcf57b6fdf6ae2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113187
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-08-16 23:10:20 +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 Thomas 73e2f469f8 [infra] Always produce a proper Dart version string on release channels
Previously, if --custom_for_pub was used we used the latest dev tag.
This "best effort" for Dart rolls from bleeding edge, but doesn't make
sense when rolling from other channels that have a proper version in the
VERSION file.

Change-Id: Icaf6c26858d9fd2132d26b7d64da21b3a05f0092
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105763
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-06-12 18:24:03 +00:00
Keerti Parthasarathy d9dccc3b0f Pass in no_git_hash option to utils.py when computing version
Change-Id: I744aa2475572cd76c2567fd7ecddaffc727c0a98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103941
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2019-05-28 22:27:47 +00:00
Keerti Parthasarathy b378eef54a Add a option to pass in version file to tools
Change-Id: I3b7224b108cdb8693d17da90d499c0648f140bc3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100721
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2019-04-29 16:40:50 +00:00
Joseph Richey 86fe7ca75c Fix build when python=python3
Right now most of the dart SDK's python is compatible with python2
or python3. This change fixes a few of the build scripts to make
that completely true (at least when building the standard build on
Linux). There are only four types of changes:
  - Bare `print` statements now use the `print ()` function
  - `commands.getoutput` becomes `subprocess.check_output` with `shell=True`
  - `xrange` becomes `range`
  - `print >> sys.stderr` becomes `sys.stderr.write`

Starts work on addressing (but does not completely fix):
https://github.com/dart-lang/sdk/issues/28793

See related issue:
https://fuchsia-review.googlesource.com/c/fuchsia/+/272925

This change applys to both the `dev` and `master` branches.

Change-Id: Ibd3eb9b1f57520d2d745f05c2ac430b1d20943da

Closes #36662
https://github.com/dart-lang/sdk/pull/36662

GitOrigin-RevId: beab165294982a7e369daf6d61aea63efcab1b9b
Change-Id: I6d240749a9ba0889b5a45a08f3c4c2c20291f484
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99707
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2019-04-23 07:48:15 +00:00
Liam Appelbe cc455ecc1d Add use_abi_version flag, and plumb ABI version to version.h
Bug: https://github.com/dart-lang/sdk/issues/36047
Change-Id: Ie810cbd5079e1939bf190e06f6c2494bb4ab0805
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95282
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2019-03-05 17:16:11 +00:00
Zach Anderson 7d7e39a952 [build] Move dart2js run for Observatory from python to GN
Change-Id: Ief90d6125e30c6bed808bacce521fc84957fddb9
Reviewed-on: https://dart-review.googlesource.com/63662
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-07-03 22:50:16 +00:00
Zach Anderson 0b4f01f759 [infra] Fixes to custom version string
related https://github.com/flutter/flutter/issues/14751

Change-Id: Id11048777e9e27fc63b94bc49c45e575b4333d24
Reviewed-on: https://dart-review.googlesource.com/42460
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-02-20 17:53:06 +00:00
Zach Anderson 0d5cf900b0 [infra,flutter] Adds semantically meaningful custom version strings
See https://github.com/flutter/flutter/issues/14751

Change-Id: I3b35c2a32c0dd1301e92abe23b1c6fe2c2e04a6c
Reviewed-on: https://dart-review.googlesource.com/42026
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-02-16 20:44:48 +00:00
Zachary Anderson f4758727dc [infra] Add a GN flag to omit git information
After Clang 6.0, changing the value of a single string can change the
order of symbols in the .rodata section. This confuses Golem's
checks for the equivalence of two binaries.

This change adds a GN flag to omit the git hash and commit time from
the Dart VM's version string to avoid re-running Golem benchmarks on
commits where the only VM change is in the version string.

To use it, pass --gn-args="dart_version_git_info=false" to gn.py

Change-Id: I8134714d50e3c9b6dae750a515dc3c2228d76b53
Reviewed-on: https://dart-review.googlesource.com/33000
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-01-08 18:29:44 +00:00
Ryan Macnak d366f9619a [vm] Toward deterministic builds.
- Remove random build-id.
 - Replace build time in embedded version string with commit time.
 - Remove timestamps from Observatory tarball.
 - Zero-initialize skipped bytes in snapshot streams.
 - Fix uninitialized fields in PatchClass, Script and Library.
 - Disable (under flag) random identity hashes and concurrent GC.

Bug: https://github.com/dart-lang/sdk/issues/31427
Change-Id: I3e95de679c8372841cd27ca60df78d9b00ffbfe1
Reviewed-on: https://dart-review.googlesource.com/22901
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2017-11-23 00:07:56 +00:00
Ryan Macnak f58c5bb78a [vm] Make the snapshot hash depend on the cluster and image snapshot sources.
Change-Id: I0f743fe82e2f47e9cccfabfe2a68ee4651ae6156
Reviewed-on: https://dart-review.googlesource.com/19801
Reviewed-by: Zach Anderson <zra@google.com>
2017-11-10 00:13:30 +00: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
ricow@google.com 77982f1fa9 Add support for ignoring the svn revision when getting the version, use this for gn build
R=zra@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43297 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-29 16:55:08 +00:00
zra@google.com fe36ebadab Disables printing a version string to the console for GN build.
R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43041 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-21 15:18:23 +00:00
zra@google.com 3dfb90f59f Checks snapshot validity using a hash of source file instead of a version string.
R=asiva@google.com, iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40009 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-09 01:44:48 +00:00
whesse@google.com c7d5711688 Build Tools Cleanup
Cleans up Python Code in Build Tools

TEST: build everything and run tests
BUG: https://code.google.com/p/dart/issues/detail?id=19592

R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38573 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-25 11:47:59 +00:00
kustermann@google.com 42813dffe6 Move runtime/tools/make_version.py to tools/ and use GetVersion from utils.py
Currently runtime/tools/make_version.py creates the version string itself.
Since this is already done in tools/release/version.dart, we should use
that. tools/utils.py provides a python wrapper around it with GetVersion().

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15769 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-06 08:52:32 +00:00