landmines shouldn't blow away args.gn |
||||
Issue descriptionI synced on Windows, and I guess there was a landmine for some PCH issue? I was unpleasantly surprised when it blew away one of my out directories entirely (luckily I had a similar args.gn config in another output dir and was able to copy that over)
,
Apr 5 2017
Ah... I didn't pay close enough attention the first time.
gclient sync failed the first time with this message:
________ running 'C:\src\depot_tools\python276_bin\python.exe src/build/landmines.py' in 'C:\src\chrome'
Clobbering due to:
--- old_landmines Wed Oct 12 15:58:07 2016
+++ new_landmines Wed Apr 05 15:25:43 2017
@@ -17,0 +18 @@
+Clobber Windows to fix strange PCH-not-rebuilt errors.
Traceback (most recent call last):
File "src/build/landmines.py", line 138, in <module>
sys.exit(main())
File "src/build/landmines.py", line 132, in main
clobber_if_necessary(landmines, options.src_dir)
File "src/build/landmines.py", line 71, in clobber_if_necessary
clobber.clobber(out_dir)
File "C:\src\chrome\src\build\clobber.py", line 120, in clobber
delete_build_dir(path)
File "C:\src\chrome\src\build\clobber.py", line 83, in delete_build_dir
with open(gn_args_file, 'w') as f:
IOError: [Errno 13] Permission denied: 'C:\\src\\chrome\\src\\out\\Debug\\args.gn'
Error: Command 'C:\\src\\depot_tools\\python276_bin\\python.exe src/build/landmines.py' returned non-zero exit status 1 in C:\src\chrome
Hook ''C:\src\depot_tools\python276_bin\python.exe' src/build/landmines.py' took 29.18 secs
I'm not entirely sure why it failed to write back the args.gn file, but I guess that would explain the entire directory vanishing.
,
Apr 5 2017
,
Apr 5 2017
+1, we shouldn't use landmines generally, as a lengthy comment in get_landmines.py points out. Looks like this one was added in https://codereview.chromium.org/2769283002 to work around MSVC PCH issues.
,
Jun 20 2017
I don't think it's entirely reasonable to say the solution to this bug is just not to use landmines - since there are legitimate reasons why landmines are used (otherwise it wouldn't exist at all). I think we need to make landmines more robust for failure, as I just lost the args.gn for six build directories and had to rebuild them manually. Perhaps always keeping a backup of the args.gn somewhere safe (even if it's just a directory in %temp%) so it can be manually recovered if the script fails? |
||||
►
Sign in to add a comment |
||||
Comment 1 by brucedaw...@chromium.org
, Apr 5 2017