aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/util
Commit message (Collapse)AuthorAge
* BES: Introduce PUBLISH_ERROR exit code.Gravatar buchgr2017-05-12
| | | | | | | | When uploading of the BES protocol fails, bazel exits with ExitCode.PUBLISH_ERROR. RELNOTES: None. PiperOrigin-RevId: 155856981
* Parse /showIncludes output for MSVC compilerGravatar Yun Peng2017-04-25
| | | | | | | | Instead of parsing .d file generated by wrapper script, we directly parse the output of /showIncludes option. Change-Id: Id94e20a5cb05a494a793fd6a43756d44d27cea8a PiperOrigin-RevId: 154161939
* Add explicit names to the sandboxing strategies so that they can beGravatar philwo2017-04-24
| | | | | | | | | | | selected even if they're not the preferred one on a platform. Simplify the SandboxActionContextProvider and remove the warning about sandboxing being unsupported. With the ProcessWrapperSandboxedStrategy now being reliable enough and the strategies printing their real name in the UI, this is overall a better UX. PiperOrigin-RevId: 153825986
* Add a custom single-line formatter for java.log.Gravatar schmitt2017-04-13
| | | | | | | | This logger makes it easier to parse log statements and is now enabled for Bazel's java.log. RELNOTES[INC]: Bazel now prints logs in single lines to java.log PiperOrigin-RevId: 152954337
* Allow constructing a dependency group with an initial capacity in ↵Gravatar Googler2017-04-11
| | | | | | | GroupedListHelper RELNOTES: None PiperOrigin-RevId: 152687516
* Add "aarch64" to the set of ARM CPU archsGravatar Daniel Trebbien2017-04-07
| | | | | | | | | | | | | This change, suggested by @tylerfox at https://github.com/tensorflow/tensorflow/issues/851#issuecomment-230810921 allows Bazel 0.4.5 to be built on a Jetson TX1 with JetPack 3.0. The other of @tylerfox's suggested changes was made in 7c4afb6. Refs #1264 Closes #2703. PiperOrigin-RevId: 152498304
* Fix "enums should only have immutable fields, 'Set' is mutable" in CPU.java.Gravatar philwo2017-04-07
| | | | PiperOrigin-RevId: 152491822
* Do not trample the PersistentMap journalGravatar Benjamin Peterson2017-04-07
| | | | | | | | | | | | | | | This fixes https://github.com/bazelbuild/bazel/issues/2660. Basically, if we elect to keep the journal during PersistentMap.save(), we shouldn't stomp over it the next time save() is called. In writeJournal(), we now check if the journal file exists, and open it in append mode if it does. Alternatively, we could simply not close (and thus forget about) the journal in save(), but that would leak the journal file handle if save() was never called with keepJournal() returning false. Change-Id: Id00732f161c8b5a082a6c109aee115591ace2ea7 PiperOrigin-RevId: 152480978
* Refactor all ctor callsites of PathFragment to instead call a static ↵Gravatar nharmata2017-04-05
| | | | | | | | | | | | 'create' method. This paves the way for changing PathFragment to e.g. an abstract class with multiple subclasses. This way we can split out the windows-specific stuff into one of these concrete classes, making the code more readable and also saving memory (since the shallow heap size of the NonWindowsPathFragment subclass will hopefully be smaller than that of the current PathFragment). This also lets us pursue gc churn optimizations. We can now do interning in PathFragment#create and can also get rid of unnecessary intermediate PathFragment allocations. RELNOTES: None PiperOrigin-RevId: 152145768
* Suffix fingerprint of iterable with lengthGravatar michajlo2017-03-31
| | | | | | | This should be morally equivalent to prefixing, with the benefit that we won't prematurely expand NestedSets (not cheap) to get the length. PiperOrigin-RevId: 151721361
* Add new utility function to encode options as argument list Gravatar Klaus Aehlig2017-03-23
| | | | | | | | | | | ...in a way preserving the list structure and without escaping. In other words, return the options as needed for an execve(3) call. -- Change-Id: Ifb168d2e720392fb3a97d557960e0c1f1a83f543 Reviewed-on: https://cr.bazel.build/9458 PiperOrigin-RevId: 151019830 MOS_MIGRATED_REVID=151019830
* Make the spell checker a bit more conservative.Gravatar Laurent Le Brun2017-03-21
| | | | | | | | | Reduce the max spell-checking distance for matching words. "target" will not match "range" anymore. -- PiperOrigin-RevId: 150638073 MOS_MIGRATED_REVID=150638073
* Add a new command "bazel license" that prints the license files of Bazel and ↵Gravatar Philipp Wollermann2017-03-20
| | | | | | | | all embedded open-source components. -- PiperOrigin-RevId: 150435047 MOS_MIGRATED_REVID=150435047
* Global cleanup change.Gravatar Googler2017-03-14
| | | | | | -- PiperOrigin-RevId: 150052074 MOS_MIGRATED_REVID=150052074
* Remove usage of SynchronizedBatchCallback findTargetsBeneathDirectoryAsync; ↵Gravatar Nathan Harmata2017-03-12
| | | | | | | | | | by design, the callback passed in there is thread safe. A previous change accidentally introduced this unnecessary synchronization. Also move SynchronizedBatchCallback to the file with its only current usage. -- PiperOrigin-RevId: 149809083 MOS_MIGRATED_REVID=149809083
* Description redacted.Gravatar Nathan Harmata2017-03-09
| | | | | | -- PiperOrigin-RevId: 149585165 MOS_MIGRATED_REVID=149585165
* Rollback of commit 822c37816ac669e51bec3853b41849a19ec5e230.Gravatar Nathan Harmata2017-03-01
| | | | | | -- PiperOrigin-RevId: 148844518 MOS_MIGRATED_REVID=148844518
* Move UnixFileSystem to lib.unix, WindowsFileSystem to lib.windowsGravatar Ulf Adams2017-02-28
| | | | | | -- PiperOrigin-RevId: 148749485 MOS_MIGRATED_REVID=148749485
* Reimplement blaze query using an async evaluation model. Use a concurrent ↵Gravatar Nathan Harmata2017-02-28
| | | | | | | | | | | | | | | | | | | backend for SkyQueryEnvironment's implementation in order to achieve parallelism. Advantages: -New design has no flaws that the old design had. -Code is structured so that deadlocks due to thread starvation are impossible (yup!). Disadvantages: -The meat of this change needs to all be in a single CL because every single QueryFunction and QueryExpression needs to be rewritten in the async style. Still TODO: -Fully embrace the async model in all QueryFunctions (e.g. 'rdeps', 'allpaths'). -Use concurrency in BlazeQueryEnvironment to achieve parallel evaluation for (non SkyQuery) 'blaze query' and genquery. -- PiperOrigin-RevId: 148690279 MOS_MIGRATED_REVID=148690279
* Read the PersistentMap's backing file into memory all at once when ↵Gravatar Googler2017-02-24
| | | | | | | | | | processing it. We are going to read the whole thing and convert it into data structures, anyway. This shaves some time off of server startup time. -- PiperOrigin-RevId: 148377493 MOS_MIGRATED_REVID=148377493
* Skylark documentation pipeline automatically generates documentation for all ↵Gravatar Florian Weikert2017-02-22
| | | | | | | | | | Skylark modules. With this change, we no longer have to manually register modules whose generation should be generated. Manual registration turned out to be prone to errors since engineers didn't know about it or simply forgot to register their modules. As a result, we had ~20 modules that featured nice documentation texts, but that were not being picked up by the documentation pipeline. -- PiperOrigin-RevId: 148136776 MOS_MIGRATED_REVID=148136776
* Move Classpath.java from src/test/... to src/main/... since it will be used ↵Gravatar Florian Weikert2017-02-21
| | | | | | | | by the documentation generation in the future. -- PiperOrigin-RevId: 148081562 MOS_MIGRATED_REVID=148081562
* Move ProcMeminfoParser to lib.unix, where it belongsGravatar Ulf Adams2017-01-09
| | | | | | -- PiperOrigin-RevId: 143939410 MOS_MIGRATED_REVID=143939410
* Add 'did you mean' suggestion when accessing a struct fieldGravatar Laurent Le Brun2017-01-03
| | | | | | -- PiperOrigin-RevId: 143380643 MOS_MIGRATED_REVID=143380643
* Make StringCanonicalizer use BlazeInterners rather than InternersGravatar Shreya Bhattarai2016-12-22
| | | | | | -- PiperOrigin-RevId: 142686266 MOS_MIGRATED_REVID=142686266
* Streamline Fingerprint implementationGravatar Michajlo Matijkiw2016-12-15
| | | | | | | | | | | | Thread all updates through a CodedOutputStream. This has the benefit of potentially hashing less data, as many int values can be represented more compactly, and reducing the churn of hashing strings (generally), since CodedOutputStream is already heavily optimized for this. While the buffer size is a little generous, it winds up paying off. -- PiperOrigin-RevId: 142151062 MOS_MIGRATED_REVID=142151062
* Record correct exit code for uncaught exceptions in async threads.Gravatar Chloe Calvarin2016-12-13
| | | | | | | | | | Async threads are divorced from the server's error-reporting mechanism. In the event of a server shutdown originating in an async-thread, write the exit code to a file that can be read by the client. -- PiperOrigin-RevId: 141920284 MOS_MIGRATED_REVID=141920284
* Global cleanup change.Gravatar Googler2016-12-07
| | | | | | -- PiperOrigin-RevId: 141307853 MOS_MIGRATED_REVID=141307853
* Remove varargs Fingerprint#addStringsGravatar Michajlo Matijkiw2016-12-07
| | | | | | | | Doesn't add much on top of the Iterable version in the current state of things, and it is too easy to confuse with addString. -- PiperOrigin-RevId: 141300940 MOS_MIGRATED_REVID=141300940
* Use MessageDigest instead of HashFunction for FingerprintGravatar Michajlo Matijkiw2016-12-01
| | | | | | | | | This allows us to reset and reuse the underlying digest implementation, which guava's HashFunction doesn't allow. We do take the clone-if-possible page out of guava's book. -- MOS_MIGRATED_REVID=140624836
* Support multiple mirror URLs for external reposGravatar Justine Tunney2016-11-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change improves upon 4c67807964e37cfd55bbcda4c6374fcc480bcecc. - A urls attribute has been added to the native workspace rules, with the exception of maven_jar and git_repository. The Skylark repository API also supports multiple URLs now. - The earlier mirrors in the list are preferred. Failover will happen automatically in parallel. - The first 32kB of data is checked before choosing a mirror in order to evade captive portals. - If one's Internet goes down or a download times out, then the download will resume automatically where it left off, provided the server supports RFC7233 for that particular file. Please note that GitHub does not support this for archive snapshots. Files should always be mirrored to a CDN, e.g. GCS, because they support this. - A semaphore is now used on downloads so only 8 can happen at once. Fixes #1814 Fixes #2131 Fixes #2008 Fixes #1968 Fixes #1717 Fixes #943 Wont fix #1194 Fixes tensorflow/tensorflow#5933 Fixes tensorflow/tensorflow#5924 Fixes tensorflow/tensorflow#5924 Fixes tensorflow/tensorflow#5432 See #1607 See #821 See tensorflow/tensorflow#5080 See tensorflow/tensorflow#5029 See tensorflow/tensorflow#4583 See tensorflow/tensorflow#4058 RELNOTES: A urls attribute has been added to repository rules to support multiple mirror URLs for reliably downloading files. -- MOS_MIGRATED_REVID=140495736
* Make TargetPattern evaluation during query evaluation more parallel-friendly ↵Gravatar Nathan Harmata2016-11-15
| | | | | | | by introducing TargetPattern#parEval, which allows TargetPatterns' evaluations to explicitly have parallel implementations (no need to secretly use a FJP). -- MOS_MIGRATED_REVID=139101922
* Stop consulting the environment for "originating user" information.Gravatar Googler2016-11-03
| | | | | -- MOS_MIGRATED_REVID=138039276
* Add logging to TimestampGranularityMonitor.Gravatar Julio Merino2016-11-02
| | | | | | | | These new log statements help in understanding what files trigger the TimestampGranularityMonitor's wait logic and when the wait is performed. -- MOS_MIGRATED_REVID=137868235
* If a group of deps has only one unique element, store it bare.Gravatar Janak Ramakrishnan2016-10-25
| | | | | | | | | | Not storing it bare both breaks equality comparison for GroupedList and uses more space. -- Change-Id: Iaf4f88908ecf4293cfc31dbd896f46e1da3b4184 Reviewed-on: https://bazel-review.googlesource.com/#/c/6850/ MOS_MIGRATED_REVID=137099785
* Stop storing a set in GroupedListHelper to deduplicate SkyKey dep requests. ↵Gravatar Janak Ramakrishnan2016-10-14
| | | | | | | Instead, deduplicate when the helper is actually added to a GroupedList. -- MOS_MIGRATED_REVID=136145321
* Adding support for Linux s390xGravatar namrata-ibm2016-10-11
| | | | | | | | | | | We have added support for Linux s390x platform in Bazel. Closes #1891. -- Reviewed-on: https://github.com/bazelbuild/bazel/pull/1891 MOS_MIGRATED_REVID=135777047
* Rollback of commit 0e9a1b2d51f9e03f4493e52d23cb3efc568be59f.Gravatar Googler2016-10-07
| | | | | | | | | | | | | | *** Reason for rollback *** [] hasn't released unknown commit yet. We need to keep the old behavior until then. *** Original change description *** Stop consulting the environment for "originating user" information. -- MOS_MIGRATED_REVID=135441115
* Stop consulting the environment for "originating user" information.Gravatar Googler2016-10-07
| | | | | -- MOS_MIGRATED_REVID=135422529
* Do not write terminal output in the experimental UI character-by-character ↵Gravatar Lukacs Berki2016-09-30
| | | | | | | | | (which results in single-character gRPC messages). Fixes #1861. -- MOS_MIGRATED_REVID=134775680
* Prevent interleaved slow interrupt stack tracesGravatar Michajlo Matijkiw2016-09-28
| | | | | | | | It's possible that there are multiple outstanding interrupts. When this happens avoid interleaving their stack traces. -- MOS_MIGRATED_REVID=134477540
* Check OS X version to decide if sandbox is supported.Gravatar Yue Gan2016-09-09
| | | | | -- MOS_MIGRATED_REVID=132570504
* Fix operator precedence error in LongArrayList.growCapacityGravatar Googler2016-08-31
| | | | | | | + binds tighter than shift operators so this code was essentially doing (i+i)/2 when it was really trying to do i + (i/2). -- MOS_MIGRATED_REVID=131709276
* Fix slow hostname lookupGravatar Marcel Hlopko2016-08-17
| | | | | | | | | | | InetAddress.getLocalHost().getHostName() can take seconds to complete as it performs reverse DNS lookup. Prior to this cl hostname lookup was performed on every build, noticeably slowing down null builds especially. This cl caches computed hostname so null builds are faster for the lifetime of the server. -- Reviewed-on: https://bazel-review.googlesource.com/#/c/5432/ MOS_MIGRATED_REVID=130441617
* Changes DependencyResolver <Attribute, Dep> map from a ListMultimap to new classGravatar Greg Estren2016-08-12
| | | | | | | | | | | | | | | | | | | | | | OrderedSetMultimap. This maintains insertion order while eliminating duplicates. Certain rules, in particular, otherwise break this invariant: https://github.com/bazelbuild/bazel/blo[]e3e28274cca5b87f48abe33884edb84016dd3/src/main/java/com/google/devtools/build/lib/skyframe/ConfiguredTargetFunction.java#L403 There's no reason (to my knowledge) to need multiple instances of the same <Attribute, Dependency> pair. More context from Google code review: (Michael Staib): > There are many things which pass around a dependentNodeMap or help construct one or modify one. We want an interface which has the right guarantees. > ListMultimap is not the right interface because it has no guarantee of unique elements, which we want - we don't want the problem that this CL ran into, and there's no reason (that we know of, to be confirmed) that anyone would want multiple identical Dependencies. > SetMultimap is not the right interface because it has no guarantee of deterministic iteration order or efficient iteration, which we want - dependency order sometimes matters (e.g., Java classpath or C++ link order). > We agreed that the best way to get what we want is to define our own interface with its own simultaneous uniqueness and iterability guarantees. Unspoken in the discussion was why we wouldn't just use LinkedHashMultimap as the thing we pass around. IMO the reason for that is that we don't care that it be a LinkedHashMultimap specifically; if tomorrow Guava comes out with a faster cooler map that has deterministic and efficient iteration and guarantees element uniqueness, we want it. > In this case we're going to make the "interface" be a (final?) class: OrderedSetMultimap, an extension of ForwardingSetMultimap which delegates to LinkedHashMultimap, an implementation which does support both of those guarantees. > I had mentioned in the conversation that none of the Multimap implementations make guarantees about key iteration order, but this is not true - LinkedHashMultimap preserves key insertion order. We should perhaps declare this as part of the OrderedSetMultimap contract as well. -- MOS_MIGRATED_REVID=130037643
* Call precomputed() on static CharMatcher instances.Gravatar Googler2016-07-26
| | | | | | | Removes a noticeable hotspot from LabelValidator.validateTargetName(). -- MOS_MIGRATED_REVID=128359980
* Be less naive with CcLibraryHelper precompiled library collision detection.Gravatar Michael Staib2016-07-25
| | | | | | | | | | The naive algorithm was O(n*m) where n = number of precompiled libraries and m = number of libraries linked during this rule. Ugly! This one provides hopefully much more reasonable performance. -- MOS_MIGRATED_REVID=128206057
* Rephrase Fingerprint in terms of guava HashFunction.Gravatar Eric Fellheimer2016-07-12
| | | | | | | This minimizes API divergence and allows us to make use of performance enhancements in guava, such as https://github.com/google/guava/issues/1197. -- MOS_MIGRATED_REVID=127108107
* Rollback of commit 1e37a5375f918376c132fa537e25695f673f41b8.Gravatar Dmitry Lomov2016-07-07
| | | | | | | | | | | | | *** Reason for rollback *** Apparently we now try to open output files for the process twice: once when we are constructing the output streams, and the second time when we tell the process to redirect its outputs. This causes the outputs to be empty on Windows *** Original change description *** Do redirection of stdout / stderr in Java instead of reimplementing it in every process wrapper again. -- MOS_MIGRATED_REVID=126801016
* Remove Fingerprint.toString() to avoid relying on MessageDigest.clone().Gravatar Googler2016-07-04
| | | | | -- MOS_MIGRATED_REVID=126566280