Skip to content

Commit

Permalink
Revert "[build] Track glob dependencies via depfiles, instead of alwa…
Browse files Browse the repository at this point in the history
…ys re-executing scripts at GN time."

This reverts commit 8d436a2.

Reason for revert: ninja is always dirty

Original change's description:
> [build] Track glob dependencies via depfiles, instead of always re-executing scripts at GN time.
>
> Bug: flutter/flutter#81074
> Change-Id: I3fba7743f89b970dfd8d4d47b21f7d51be7a9cdb
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196981
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Chinmay Garde <chinmaygarde@google.com>
> Reviewed-by: Ben Konyi <bkonyi@google.com>

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

Bug: flutter/flutter#81074
Change-Id: I74c9ce055ad49107ae0d21f2f3b9b74991fc81d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198441
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
  • Loading branch information
rmacnak-google authored and commit-bot@chromium.org committed May 5, 2021
1 parent 06fabd0 commit 5c0ff97
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 67 deletions.
19 changes: 19 additions & 0 deletions tools/create_timestamp_file.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env python3
# Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.

import sys
import os


def main(args):
for file_name in args[1:]:
dir_name = os.path.dirname(file_name)
if not os.path.exists(dir_name):
os.mkdir(dir_name)
open(file_name, 'w').close()


if __name__ == '__main__':
sys.exit(main(sys.argv))
60 changes: 0 additions & 60 deletions tools/list_dart_files_as_depfile.py

This file was deleted.

15 changes: 8 additions & 7 deletions utils/create_timestamp.gni
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ template("create_timestamp_file") {
path = invoker.path
output = invoker.output
action(target_name) {
script = "$_dart_root/tools/list_dart_files_as_depfile.py"
args = [
rebase_path(output),
path,
]
list_args = [ path ]
if (defined(invoker.pattern)) {
args += [ invoker.pattern ]
list_args += [ invoker.pattern ]
}
depfile = output
files = exec_script("$_dart_root/tools/list_dart_files.py",
[ "absolute" ] + list_args,
"list lines")
inputs = [ "$_dart_root/tools/list_dart_files.py" ] + files
outputs = [ output ]
script = "$_dart_root/tools/create_timestamp_file.py"
args = [ rebase_path(output) ]
}
}

0 comments on commit 5c0ff97

Please sign in to comment.