platform/upstream/ninja.git
10 years agoMerge pull request #742 from nico/maniperf
Nico Weber [Thu, 17 Apr 2014 05:17:52 +0000 (22:17 -0700)]
Merge pull request #742 from nico/maniperf

Add a manifest parsing perftest.

10 years agoManifest perftest: Try to make it build on Linux.
Nico Weber [Thu, 17 Apr 2014 05:15:09 +0000 (22:15 -0700)]
Manifest perftest: Try to make it build on Linux.

10 years agoManifest perftest: Pull manifest parsing into own function.
Nico Weber [Thu, 17 Apr 2014 05:12:30 +0000 (22:12 -0700)]
Manifest perftest: Pull manifest parsing into own function.

10 years agoAdd manifest_parser_perftest to .gitignore.
Nico Weber [Thu, 17 Apr 2014 05:06:34 +0000 (22:06 -0700)]
Add manifest_parser_perftest to .gitignore.

10 years agoManifest perftest: Also measure command evaluation time.
Nico Weber [Thu, 17 Apr 2014 05:05:32 +0000 (22:05 -0700)]
Manifest perftest: Also measure command evaluation time.

10 years agoAdd a simple manifest parsing perftest.
Nico Weber [Thu, 17 Apr 2014 04:56:49 +0000 (21:56 -0700)]
Add a simple manifest parsing perftest.

10 years agoMerge pull request #741 from nicolasdespres/propagate-file-rename-to-gitignore
Nico Weber [Wed, 16 Apr 2014 17:02:26 +0000 (10:02 -0700)]
Merge pull request #741 from nicolasdespres/propagate-file-rename-to-gitignore

Propagate file rename to gitignore.

10 years agoPropagate file rename to gitignore.
Nicolas Despres [Wed, 16 Apr 2014 06:24:38 +0000 (08:24 +0200)]
Propagate file rename to gitignore.

This was introduced by 68a4bb27d1a747b240ea68cd320a51dbd261ed14.

10 years agoMerge pull request #740 from nico/formatfile
Nico Weber [Wed, 16 Apr 2014 05:09:23 +0000 (22:09 -0700)]
Merge pull request #740 from nico/formatfile

Add a .clang-format file.

10 years agoAdd a .clang-format file.
Nico Weber [Wed, 16 Apr 2014 05:06:01 +0000 (22:06 -0700)]
Add a .clang-format file.

This isn't meant to be authoritative. It's good enough to let the
"indent current line using clang-format" hotkey do the right thing often
enough to be useful.

10 years agoMerge pull request #739 from nico/ren
Nico Weber [Wed, 16 Apr 2014 00:47:28 +0000 (17:47 -0700)]
Merge pull request #739 from nico/ren

Rename parser_perftest to depfile_parser_perftest.

10 years agoRename parser_perftest to depfile_parser_perftest.
Nico Weber [Wed, 16 Apr 2014 00:43:03 +0000 (17:43 -0700)]
Rename parser_perftest to depfile_parser_perftest.

10 years agoMerge pull request #737 from sorbits/bash-completion-fixes
Nico Weber [Tue, 15 Apr 2014 19:00:01 +0000 (12:00 -0700)]
Merge pull request #737 from sorbits/bash-completion-fixes

Bash completion fixes

10 years agoExpand the -C argument via ‘eval’ in bash completion
Allan Odgaard [Tue, 15 Apr 2014 07:27:37 +0000 (14:27 +0700)]
Expand the -C argument via ‘eval’ in bash completion

Previously completion would not work for ‘ninja -C $HOME/Source/foo targ‸’.

We still do not support using tilde in the directory argument.

10 years agoFix bash completion when using command options
Allan Odgaard [Tue, 15 Apr 2014 07:23:47 +0000 (14:23 +0700)]
Fix bash completion when using command options

By quoting the ‘line’ variable we are making it a single word, but ‘getopts’ wants each option as its own word.

Previously bash completion would output an error for a line like: ‘ninja -vn targ‸’.

In addition to removing the quotes (to enable word expansion) I also used it as a regular variable, as that is what it is (not an array).

10 years agoMerge pull request #734 from sgraham/no-stderr
Nico Weber [Mon, 14 Apr 2014 21:09:51 +0000 (14:09 -0700)]
Merge pull request #734 from sgraham/no-stderr

CLParser shouldn't read stderr

10 years agoCLParser shouldn't read stderr
Scott Graham [Mon, 14 Apr 2014 20:37:06 +0000 (13:37 -0700)]
CLParser shouldn't read stderr

10 years agoMerge pull request #722 from nico/manifestgen
Nico Weber [Mon, 14 Apr 2014 17:43:15 +0000 (10:43 -0700)]
Merge pull request #722 from nico/manifestgen

add a script to generate large synthetic manifests

10 years agoMerge pull request #732 from bratell-at-opera/bratell/fewer_list_copies_20140414
Nico Weber [Mon, 14 Apr 2014 15:39:21 +0000 (08:39 -0700)]
Merge pull request #732 from bratell-at-opera/bratell/fewer_list_copies_20140414

performance: Writer.build should copy less.

10 years agoperformance: Writer.build should copy less.
Daniel Bratell [Mon, 14 Apr 2014 11:52:02 +0000 (13:52 +0200)]
performance: Writer.build should copy less.

The build method copies the input lists several times. That
cost about 0.1s in the gyp generation for the Chromium project for
no gain.

10 years agoMerge pull request #699 from mostynb/avoid_useless_mkdir_failure
Nico Weber [Mon, 7 Apr 2014 15:22:07 +0000 (08:22 -0700)]
Merge pull request #699 from mostynb/avoid_useless_mkdir_failure

don't Fail if trying to mkdir when the dir already exists

10 years agoMerge pull request #728 from sgraham/both-slashes-on-windows-for-output
Nico Weber [Thu, 3 Apr 2014 21:04:06 +0000 (14:04 -0700)]
Merge pull request #728 from sgraham/both-slashes-on-windows-for-output

Support both slashes on Windows when making output dirs

10 years agoSupport both slashes on Windows when making output dirs
Scott Graham [Wed, 2 Apr 2014 21:11:26 +0000 (14:11 -0700)]
Support both slashes on Windows when making output dirs

10 years agoadd a script to generate large synthetic manifests
Nico Weber [Tue, 25 Mar 2014 15:33:21 +0000 (08:33 -0700)]
add a script to generate large synthetic manifests

To be used by a manifest parser perf test in a follow-up.

10 years agoMerge pull request #710 from purcell/patch-1
Evan Martin [Thu, 23 Jan 2014 16:29:38 +0000 (08:29 -0800)]
Merge pull request #710 from purcell/patch-1

ninja-mode: add autoload cookie for the mode itself

10 years agoninja-mode: add autoload cookie for the mode itself
Steve Purcell [Wed, 22 Jan 2014 12:01:16 +0000 (12:01 +0000)]
ninja-mode: add autoload cookie for the mode itself

10 years agoMerge branch 'fix-provide-form' of git://github.com/yasuyk/ninja
Evan Martin [Tue, 21 Jan 2014 18:57:29 +0000 (10:57 -0800)]
Merge branch 'fix-provide-form' of git://github.com/yasuyk/ninja

Conflicts:
misc/ninja-mode.el

10 years agoMerge branch 'fix-warning' of git://github.com/yasuyk/ninja
Evan Martin [Tue, 21 Jan 2014 18:56:43 +0000 (10:56 -0800)]
Merge branch 'fix-warning' of git://github.com/yasuyk/ninja

Conflicts:
misc/ninja-mode.el

10 years agoMerge pull request #705 from yasuyk/elpa
Evan Martin [Tue, 21 Jan 2014 16:40:26 +0000 (08:40 -0800)]
Merge pull request #705 from yasuyk/elpa

emacs: ELPA compatibility

10 years agoemacs: Place provide form at end of file
Yasuyuki Oka [Tue, 21 Jan 2014 13:33:35 +0000 (22:33 +0900)]
emacs: Place provide form at end of file

Any errors in the code after "provide" will leave the feature
registered, so it should always be at the end.

10 years agoemacs: Fix a warning
Yasuyuki Oka [Tue, 21 Jan 2014 13:29:41 +0000 (22:29 +0900)]
emacs: Fix a warning

Fix a following byte-compile warning:
ninja-mode.el:18:7:Warning: assignment to free variable `ninja-keywords'

10 years agoemacs: ELPA compatibility
Yasuyuki Oka [Tue, 21 Jan 2014 13:19:19 +0000 (22:19 +0900)]
emacs: ELPA compatibility

10 years agoMerge pull request #702 from nickhutchinson/feature/win32-escaping-fix
Nico Weber [Thu, 9 Jan 2014 08:27:35 +0000 (00:27 -0800)]
Merge pull request #702 from nickhutchinson/feature/win32-escaping-fix

Don’t unnecessarily escape backslashes in Win32 paths

10 years agoMerge pull request #701 from nickhutchinson/feature/msvc-gtest-cflags
Nico Weber [Thu, 9 Jan 2014 03:54:01 +0000 (19:54 -0800)]
Merge pull request #701 from nickhutchinson/feature/msvc-gtest-cflags

configure.py: use /FS flag under vs2013 when compiling gtest

10 years agoconfigure.py: use /FS flag under vs2013 when compiling gtest
Nicholas Hutchinson [Thu, 9 Jan 2014 02:35:36 +0000 (15:35 +1300)]
configure.py: use /FS flag under vs2013 when compiling gtest

10 years agoDon’t unnecessarily escape backslashes in Win32 paths
Nicholas Hutchinson [Wed, 8 Jan 2014 20:38:20 +0000 (09:38 +1300)]
Don’t unnecessarily escape backslashes in Win32 paths

Under ::CommandLineToArgvW() rules, the backslash character only gets special treatment if it’s immediately followed by a double quote. So, when checking to see if a string needs Win32 escaping, it’s sufficient to check for the presence of a double quote character. This allows paths like "foo\bar" to be recognised as “sensible” paths, which don’t require the full escaping.

10 years agodon't Fail if trying to mkdir when the dir already exists
Mostyn Bramley-Moore [Tue, 7 Jan 2014 09:33:09 +0000 (10:33 +0100)]
don't Fail if trying to mkdir when the dir already exists

10 years agoMerge pull request #697 from nico/gclogs
Nico Weber [Tue, 7 Jan 2014 00:17:14 +0000 (16:17 -0800)]
Merge pull request #697 from nico/gclogs

Remove old outputs from build log and deps log during recompaction.

10 years agoMake BuildLogUser reference constant.
Nico Weber [Tue, 7 Jan 2014 00:15:23 +0000 (16:15 -0800)]
Make BuildLogUser reference constant.

10 years agoMerge pull request #690 from nickhutchinson/feature/escape-paths-properly
Nico Weber [Mon, 6 Jan 2014 23:57:33 +0000 (15:57 -0800)]
Merge pull request #690 from nickhutchinson/feature/escape-paths-properly

More robust escaping of $in, $out paths

10 years agoMore robust escaping of $in, $out paths
Nicholas Hutchinson [Sat, 30 Nov 2013 22:33:02 +0000 (22:33 +0000)]
More robust escaping of $in, $out paths

In summary: don’t escape if the path doesn’t contain problematic characters, otherwise:
- Shell: enclose string in single quotes, escape embedded single quotes with the magic quote-backslash-quote sequence
- Win32: Escape double quotes by doubling the number of consecutive backslashes that precede them (if any) and adding one more. Finally, double the number of trailing backslashes, and enclose the whole thing in double quotes.

10 years agoAdd a comment.
Nico Weber [Sat, 4 Jan 2014 05:32:41 +0000 (21:32 -0800)]
Add a comment.

10 years agoRename "IsDead" to "BuildLogUser".
Nico Weber [Sat, 4 Jan 2014 05:26:50 +0000 (21:26 -0800)]
Rename "IsDead" to "BuildLogUser".

10 years agoMove duplicated code into a helper function.
Nico Weber [Sat, 4 Jan 2014 05:12:31 +0000 (21:12 -0800)]
Move duplicated code into a helper function.

10 years agoAdd a test for collection of dead log entries.
Nico Weber [Sat, 4 Jan 2014 04:43:42 +0000 (20:43 -0800)]
Add a test for collection of dead log entries.

10 years agoAdd a test for collection of dead deps entries.
Nico Weber [Fri, 3 Jan 2014 05:16:38 +0000 (21:16 -0800)]
Add a test for collection of dead deps entries.

10 years agoFix DepsLogTest.Recompact by making sure outputs aren't garbag-collected.
Nico Weber [Thu, 2 Jan 2014 05:37:47 +0000 (21:37 -0800)]
Fix DepsLogTest.Recompact by making sure outputs aren't garbag-collected.

10 years agoMake tests compile (one fails atm).
Nico Weber [Thu, 2 Jan 2014 04:46:18 +0000 (20:46 -0800)]
Make tests compile (one fails atm).

10 years agoRemove dead entries in .ninja_log and .ninja_deps while recompacting.
Nico Weber [Thu, 2 Jan 2014 04:31:34 +0000 (20:31 -0800)]
Remove dead entries in .ninja_log and .ninja_deps while recompacting.

For .ninja_deps, remove objects that have no in-edges or whose in-edges
do not have a "deps" attribute. (This matches the behaviour of `-t
deps`).

BuildLog doesn't know about state, so let its recompact method take
delegate that decides is a path is life or not, and implement it in
NinjaMain.

10 years agoMerge pull request #695 from nico/norange
Nico Weber [Fri, 13 Dec 2013 21:02:40 +0000 (13:02 -0800)]
Merge pull request #695 from nico/norange

Fix additional range in character class.

10 years agoFix additional range in character class.
Nico Weber [Fri, 13 Dec 2013 21:01:02 +0000 (13:01 -0800)]
Fix additional range in character class.

The range was added in 7ab6dcbdb6447861eefafc47fc3e10f3273cede2, but that
change only tried to add ! to the character class. Fix by moving '-' to the end
of the class.

Fixes #694.

10 years agoMerge pull request #691 from TheOneRing/fix-msvc13
Nico Weber [Fri, 6 Dec 2013 00:10:29 +0000 (16:10 -0800)]
Merge pull request #691 from TheOneRing/fix-msvc13

fixed platform_helper.py msvc_needs_fs test for python 3

10 years agofixed platform_helper.py msvc_needs_fs test
Patrick von Reth [Thu, 5 Dec 2013 09:37:52 +0000 (10:37 +0100)]
fixed platform_helper.py msvc_needs_fs test

10 years agoMerge pull request #688 from ndmitchell/master
Nico Weber [Mon, 18 Nov 2013 10:00:36 +0000 (02:00 -0800)]
Merge pull request #688 from ndmitchell/master

Fix up platform_helper for MSVC

10 years agoFix up platform_helper for MSVC, with Python 2.6.8 the arguments have to be in a...
Neil Mitchell [Mon, 18 Nov 2013 06:32:32 +0000 (06:32 +0000)]
Fix up platform_helper for MSVC, with Python 2.6.8 the arguments have to be in a list, not space separated (unless you set Shell to true)

10 years agoMerge pull request #683 from nico/ruletest
Evan Martin [Mon, 28 Oct 2013 17:21:12 +0000 (10:21 -0700)]
Merge pull request #683 from nico/ruletest

Add a test that shows that there is a single global namespace for rules.

10 years agoAdd a test that shows that there is a single global namespace for rules.
Nico Weber [Sun, 27 Oct 2013 19:38:34 +0000 (12:38 -0700)]
Add a test that shows that there is a single global namespace for rules.

10 years agoMerge pull request #682 from nico/pep8
Nico Weber [Sun, 27 Oct 2013 03:16:07 +0000 (20:16 -0700)]
Merge pull request #682 from nico/pep8

Wrap to 79 colums. No functionality change.

10 years agoWrap to 79 colums. No functionality change.
Nico Weber [Sun, 27 Oct 2013 03:15:23 +0000 (20:15 -0700)]
Wrap to 79 colums. No functionality change.

10 years agoMerge pull request #674 from nico/style
Nico Weber [Sat, 19 Oct 2013 18:03:51 +0000 (11:03 -0700)]
Merge pull request #674 from nico/style

Minor style fixes. No functionality change.

10 years agoMinor style fixes. No functionality change.
Nico Weber [Sat, 19 Oct 2013 18:03:15 +0000 (11:03 -0700)]
Minor style fixes. No functionality change.

10 years agoMerge pull request #665 from syntheticpp/localized-showinclude
Nico Weber [Fri, 18 Oct 2013 23:43:05 +0000 (16:43 -0700)]
Merge pull request #665 from syntheticpp/localized-showinclude

add deps_prefix for localized /showIncludes' output parsing

10 years agoadd deps_prefix for localized /showIncludes' output parsing
Peter Kümmel [Sun, 13 Oct 2013 10:20:17 +0000 (12:20 +0200)]
add deps_prefix for localized /showIncludes' output parsing

10 years agoMerge pull request #671 from sgraham/compile-vs2013
Nico Weber [Fri, 18 Oct 2013 04:16:13 +0000 (21:16 -0700)]
Merge pull request #671 from sgraham/compile-vs2013

Fix compilation on VS2013

10 years agoFix compilation on VS2013
Scott Graham [Fri, 18 Oct 2013 04:12:11 +0000 (21:12 -0700)]
Fix compilation on VS2013

10 years agomark this 1.4.0.git, update RELEASING
Evan Martin [Thu, 12 Sep 2013 02:05:21 +0000 (19:05 -0700)]
mark this 1.4.0.git, update RELEASING

10 years agoMerge pull request #657 from sgraham/keeprsp2
Nico Weber [Wed, 11 Sep 2013 21:50:04 +0000 (14:50 -0700)]
Merge pull request #657 from sgraham/keeprsp2

add -d keeprsp to preserve @rsp files on success on windows

10 years agoadd -d keeprsp to preserve @rsp files on success on windows
Scott Graham [Tue, 10 Sep 2013 22:34:01 +0000 (15:34 -0700)]
add -d keeprsp to preserve @rsp files on success on windows

10 years agoMerge pull request #655 from nico/simp
Nico Weber [Sun, 8 Sep 2013 02:16:49 +0000 (19:16 -0700)]
Merge pull request #655 from nico/simp

Simplify.

10 years agoSimplify.
Nico Weber [Sun, 8 Sep 2013 02:16:21 +0000 (19:16 -0700)]
Simplify.

10 years agoMerge pull request #654 from rgeary1/buildTestFix
Nico Weber [Sun, 8 Sep 2013 02:14:17 +0000 (19:14 -0700)]
Merge pull request #654 from rgeary1/buildTestFix

Fix for build test for BuildWithDepsLogTest.RestatMissingDepfileDepslog

10 years agoFix for build test for BuildWithDepsLogTest.RestatMissingDepfileDepslog
Richard Geary [Sat, 7 Sep 2013 14:03:00 +0000 (10:03 -0400)]
Fix for build test for BuildWithDepsLogTest.RestatMissingDepfileDepslog

10 years agoMerge pull request #653 from nico/msg
Nico Weber [Fri, 6 Sep 2013 21:37:33 +0000 (14:37 -0700)]
Merge pull request #653 from nico/msg

Make depslog v1->v3 message less scary.

10 years agoMake depslog v1->v3 message less scary.
Nico Weber [Fri, 6 Sep 2013 21:29:32 +0000 (14:29 -0700)]
Make depslog v1->v3 message less scary.

See the comment 5 lines up for details.

10 years agoMerge pull request #650 from nico/simplify
Nico Weber [Mon, 2 Sep 2013 23:10:59 +0000 (16:10 -0700)]
Merge pull request #650 from nico/simplify

Simplify.

10 years agoSimplify.
Nico Weber [Mon, 2 Sep 2013 23:09:00 +0000 (16:09 -0700)]
Simplify.

10 years agoMerge pull request #649 from nico/fff
Nico Weber [Mon, 2 Sep 2013 23:02:44 +0000 (16:02 -0700)]
Merge pull request #649 from nico/fff

Delete a line I failed to delete in d7a46654a7be1.

10 years agoDelete a line I failed to delete in d7a46654a7be1.
Nico Weber [Mon, 2 Sep 2013 23:01:46 +0000 (16:01 -0700)]
Delete a line I failed to delete in d7a46654a7be1.

10 years agoMerge pull request #648 from nico/landmaxim
Nico Weber [Mon, 2 Sep 2013 22:52:21 +0000 (15:52 -0700)]
Merge pull request #648 from nico/landmaxim

Land the majority of pull request #608.

10 years agoFix restat rebuild if deps are missing.
Maxim Kalaev [Mon, 2 Sep 2013 22:44:32 +0000 (15:44 -0700)]
Fix restat rebuild if deps are missing.

Fixes issue #603.

Apparently, the problem was caused by my fix r "consider target dirty if
depfile is missing" (bcc8ad1), which was not working correctly with
restat rules cleaning nodes.  Switching to deps only triggered an easily
observable issue.

Fix by setting a flag in edges with invalid deps, and not cleaning edges
with that flag set.

10 years agoShare more code between CleanNode() and RecomputeDirty().
Maxim Kalaev [Mon, 2 Sep 2013 22:32:19 +0000 (15:32 -0700)]
Share more code between CleanNode() and RecomputeDirty().

Move a common loop into the new function RecomputeOutputsDirty().
Simplifies things a bit, and makes it harder for the restat path to have
different behavior from the regular path.

No dramatic behavior change (the restat path now also calls
RestatIfNecessary()).

10 years agoCheck depslog timestamp in LoadDepsFromLog(), not in RecomputeOutputDirty().
Maxim Kalaev [Mon, 2 Sep 2013 22:24:26 +0000 (15:24 -0700)]
Check depslog timestamp in LoadDepsFromLog(), not in RecomputeOutputDirty().

RecomputeOutputDirty() is called from two places:

1. RecomputeDirty(), which calls LoadDeps().
2. CleanNode(), which always passes 0 for the deps mtime.

So this is no behavior change in either case.

deps_mtime was nonzero only in deps mode, and it got passed all over the
place.  This makes things simpler.

10 years agoMerge pull request #647 from bmeurer/SimplifyGetProcessorCount
Evan Martin [Mon, 2 Sep 2013 19:12:23 +0000 (12:12 -0700)]
Merge pull request #647 from bmeurer/SimplifyGetProcessorCount

Simplify implementation of GetProcessorCount().

10 years agoSimplify implementation of GetProcessorCount().
Benedikt Meurer [Sun, 1 Sep 2013 09:12:23 +0000 (11:12 +0200)]
Simplify implementation of GetProcessorCount().

The current implementation is unnecessarily complex, because:

- The BSD derived systems implement sysconf(_SC_NPROCESSORS_ONLN)
  in terms of sysctl({CTL_HW,HW_NCPU}).
- get_nprocs() is a GNU extension, and glibc implements
  sysconf(_SC_NPROCESSORS_ONLN) in terms of get_nprocs().

10 years agoMerge pull request #645 from nico/maximfix
Nico Weber [Wed, 28 Aug 2013 22:03:10 +0000 (15:03 -0700)]
Merge pull request #645 from nico/maximfix

Fix an issue with more than 64k deps, spotted by maximuska.

10 years agoFix an issue with more than 64k deps, spotted by maximuska.
Nico Weber [Wed, 28 Aug 2013 22:00:05 +0000 (15:00 -0700)]
Fix an issue with more than 64k deps, spotted by maximuska.

Also add a test for this case, which would have spotted the issue too.

10 years agoMerge pull request #644 from nico/v3
Nico Weber [Wed, 28 Aug 2013 21:05:04 +0000 (14:05 -0700)]
Merge pull request #644 from nico/v3

Deps log format v3

10 years agodocument an assumption
Nico Weber [Wed, 28 Aug 2013 21:03:53 +0000 (14:03 -0700)]
document an assumption

10 years agoDeps log format v3
Nico Weber [Wed, 28 Aug 2013 20:29:02 +0000 (13:29 -0700)]
Deps log format v3

This fixes two bugs.

1.) It makes the record size field 4 byte instead of 2, and allows a max
    record size of 512kB. This fixes #605, ninja "only" supporting 8k
    dependencies per file -- 512kB have room for 128k dependencies. (If that's
    still not enough, the current design can support at least 4x that if the
    constant is tweaked.)

2.) It makes all records 4-byte aligned, which is probably needed to make the
    `reinterpret_cast<int*>(buf)` work on SPARC (cf issue #481), and it's
    generally nicer too. (Since there's already one reinterpret_cast, convert
    a memcpy() to reinterpret_cast in another branch too).

10 years agoMerge pull request #642 from nico/depslogidx
Nico Weber [Mon, 26 Aug 2013 23:10:24 +0000 (16:10 -0700)]
Merge pull request #642 from nico/depslogidx

Suffix depslog path records with their expected index.

10 years agoSuffix depslog path records with their expected index.
Nico Weber [Mon, 26 Aug 2013 22:19:21 +0000 (15:19 -0700)]
Suffix depslog path records with their expected index.

ninja assumes that numbering path entries in the deps log in order produces
valid dense integer ids.  If two ninja processes write to the same deps log
concurrently, this is not true.  Store the expected indices of path records
in the log and treat the rest of a deps log as invalid if the dense id of a
path record doesn't match the expected id stored in the log.  Addresses the
rest of issue #595.

This requires bumping the deps log file format version.  Do not migrate the
old version to the new, as the old format did not have this protection, and
might hence contain invalid data.  (Unlikely, but possible.)

Also store the record id as one's complement, to make them look less like
regular deps record values.  Since each record is written atomically this
isn't really necessary, but it makes the format somewhat more robust (and
easier to read in a hex editor).

10 years agoMerge pull request #641 from nico/ocd2
Nico Weber [Fri, 23 Aug 2013 19:22:08 +0000 (12:22 -0700)]
Merge pull request #641 from nico/ocd2

Minor style fixes, no behavior change.

10 years agoMinor style fixes, no behavior change.
Nico Weber [Fri, 23 Aug 2013 19:20:55 +0000 (15:20 -0400)]
Minor style fixes, no behavior change.

10 years agoMerge pull request #628 from rnk/wstr
Nico Weber [Fri, 23 Aug 2013 13:59:05 +0000 (06:59 -0700)]
Merge pull request #628 from rnk/wstr

Use fwrite in the msvc tool instead of printf

10 years agoMerge pull request #640 from nico/edgetest
Nico Weber [Thu, 22 Aug 2013 23:27:29 +0000 (16:27 -0700)]
Merge pull request #640 from nico/edgetest

Add a test for issue #638.

10 years agoAdd a test for issue #638.
Nico Weber [Thu, 22 Aug 2013 23:24:04 +0000 (19:24 -0400)]
Add a test for issue #638.

10 years agoMerge pull request #639 from rgeary1/StatusMessageFix
Nico Weber [Thu, 22 Aug 2013 23:16:23 +0000 (16:16 -0700)]
Merge pull request #639 from rgeary1/StatusMessageFix

Fix for #638 incorrect number of total edges in the status message

10 years agoFix for incorrect number of total edges in the status message
Richard Geary [Thu, 22 Aug 2013 22:08:12 +0000 (18:08 -0400)]
Fix for incorrect number of total edges in the status message

10 years agoMerge branch 'master' into wstr
Reid Kleckner [Mon, 19 Aug 2013 23:44:30 +0000 (16:44 -0700)]
Merge branch 'master' into wstr

10 years agoAvoid indexing into an empty string.
Reid Kleckner [Mon, 19 Aug 2013 23:44:16 +0000 (16:44 -0700)]
Avoid indexing into an empty string.