aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/unix
Commit message (Collapse)AuthorAge
* Automated rollback of commit 80c8ff1819a889814cbe2dae477d7fedce6aa181.Gravatar tomlu2018-01-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Rolling forward after underlying issue has been fixed. *** Original change description *** Automated rollback of commit d50cbbeef115f28c0cea1ac17572e0f12c0cf312. *** Reason for rollback *** b/71442447 *** Original change description *** Remove synchronization from file system. After the path refactor we will no longer have path instances to synchronize on. The underlying OS file systems are already naturally thread safe, that is, their internal data structures cannot be damaged. Any further synchronization (eg. races between directory creation and deletion) has to be managed at the client level. The l... *** PiperOrigin-RevId: 181368707
* Automated rollback of commit d50cbbeef115f28c0cea1ac17572e0f12c0cf312.Gravatar tomlu2018-01-05
| | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** b/71442447 *** Original change description *** Remove synchronization from file system. After the path refactor we will no longer have path instances to synchronize on. The underlying OS file systems are already naturally thread safe, that is, their internal data structures cannot be damaged. Any further synchronization (eg. races between directory creation and deletion) has to be managed at the client level. The last attempt to do this failed because of races in FileUtils#createDirectoryAndParents on Windows. This method is now gone, rep... *** ROLLBACK_OF=180290901 PiperOrigin-RevId: 180936132
* Remove synchronization from file system.Gravatar tomlu2017-12-28
| | | | | | | | | | After the path refactor we will no longer have path instances to synchronize on. The underlying OS file systems are already naturally thread safe, that is, their internal data structures cannot be damaged. Any further synchronization (eg. races between directory creation and deletion) has to be managed at the client level. The last attempt to do this failed because of races in FileUtils#createDirectoryAndParents on Windows. This method is now gone, replaced by a method from the Java framework that knows how to synchronize. PiperOrigin-RevId: 180290901
* Add FileSystem#createDirectoryAndParents.Gravatar tomlu2017-12-21
| | | | | | | | A native implementation of this (instead of using FileSystemUtils, which can only use public interfaces) should be more efficient and more easy to make correct. In particular, it should allow removing FileSystemUtils#createDirectoriesAndParents, which has poor thread safety characteristics. The latter method has a lot of logic that forces certain unnatural atomicity guarantees on createDirectory, and it also has logic that is conditional on sub-string content of exception messages. PiperOrigin-RevId: 179819623
* Automated rollback of commit 82e68b75304438c96ff878a0c2b8d18b42002486.Gravatar aehlig2017-12-19
| | | | | | | | | | | | | | Fixes #4322, #4306. *** Reason for rollback *** Introduces a deadlock (see https://github.com/bazelbuild/bazel/issues/4322) *** Original change description *** Make FileSystem operate on LocalPath instead of Path. PiperOrigin-RevId: 179549866
* Make FileSystem operate on LocalPath instead of Path.Gravatar tomlu2017-12-14
| | | | PiperOrigin-RevId: 179082062
* Thread FileSystem instance through a few call sites.Gravatar tomlu2017-12-11
| | | | PiperOrigin-RevId: 178704585
* Thread filesystem through codebase.Gravatar tomlu2017-12-08
| | | | | RELNOTES: None PiperOrigin-RevId: 178426166
* Refactor the FileSystem API to allow for different hash functions.Gravatar buchgr2017-11-30
| | | | | | | | | | | | | Refactor the FileSystem class to include the hash function as an instance field. This allows us to have a different hash function per FileSystem and removes technical debt, as currently that's somewhat accomplished by a horrible hack that has a static method to set the hash function for all FileSystem instances. The FileSystem's default hash function remains MD5. RELNOTES: None PiperOrigin-RevId: 177479772
* Replace all usages of Blaze's Preconditions class with guava.Gravatar tomlu2017-11-09
| | | | | | | | Blaze had its own class to avoid GC from varargs array creation for the precondition happy path. Guava now (mostly) implements these, making it unnecessary to maintain our own. This change was almost entirely automated by search-and-replace. A few BUILD files needed fixing up since I removed an export of preconditions from lib:util, which was all done by add_deps. There was one incorrect usage of Preconditions that was caught by error prone (which checks Guava's version of Preconditions) that I had to change manually. PiperOrigin-RevId: 175033526
* Change FileSystem#getDirectoryEntries to return strings of the ↵Gravatar tomlu2017-10-23
| | | | | | | | file/directory names instead of paths. This is a small isolated change that can be done ahead of the big refactoring. PiperOrigin-RevId: 173124518
* Add Path argument to supportsModifications, supports*LinksNatively.Gravatar tomlu2017-10-20
| | | | | | | | This works better with UnionFileSystem, as (eg.) different mapped file systems might not agree on whether they are read-only. No actual code changes have been made that actually uses this argument, so this should be a behaviour no-op. PiperOrigin-RevId: 172782759
* Fall back to guessing available memory on Linux machines running kernels ↵Gravatar Googler2017-10-18
| | | | | | | older than 3.14-rc1 (2014-02-02). RELNOTES: N/A PiperOrigin-RevId: 172356826
* Throw a checked exception if there's an error reading /proc/meminfo, and ↵Gravatar janakr2017-10-12
| | | | | | handle it properly. PiperOrigin-RevId: 171906091
* Rather than logging the amount of free physical memory on Linux systems, log ↵Gravatar Googler2017-10-06
| | | | | | the amount of *available* physical memory. This includes memory used as cache or buffer that will be evicted if an application requests memory, and is a much more realistic metric of utilization than free memory, which is usually <1% of memory available to the machine. PiperOrigin-RevId: 171087122
* Fix assorted ErrorProne warnings.Gravatar lberki2017-09-06
| | | | | RELNOTES: None. PiperOrigin-RevId: 167574104
* Adding support for SHA256 for remote execution. Switch remote execution to useGravatar olaola2017-06-20
| | | | | | | | | the currently defined hash function for blobs. Some refactoring. Adding an option to set the hash function in the remote worker, defaulting to the current behavior (unfortunately it is a build option, have not found a clean way to specify it at runtime). BUG=62622420 TESTED=remote worker RELNOTES: none PiperOrigin-RevId: 159473116
* 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
* Move UnixFileSystem to lib.unix, WindowsFileSystem to lib.windowsGravatar Ulf Adams2017-02-28
| | | | | | -- PiperOrigin-RevId: 148749485 MOS_MIGRATED_REVID=148749485
* Move FileAccessException to the vfs packageGravatar Ulf Adams2017-02-17
| | | | | | | | | | | | | | It was previously in unix, but also used from non-unix file systems, which means it's not actually unix-specific. This is in preparation for splitting compilation of the unix and windows file systems into separate libraries. That improves layering and reduces compile times - note that Bazel already injects the vfs into its lower layers, which should only rely on the normal vfs APIs, not on anything platform-specific. -- PiperOrigin-RevId: 147829659 MOS_MIGRATED_REVID=147829659
* Move ProcMeminfoParser to lib.unix, where it belongsGravatar Ulf Adams2017-01-09
| | | | | | -- PiperOrigin-RevId: 143939410 MOS_MIGRATED_REVID=143939410
* Remove support for using AF_UNIX to communicate between the Bazel cient and ↵Gravatar Lukacs Berki2016-10-07
| | | | | | | | | the Bazel server. RELNOTES[INC]: --command_port=-1 to use AF_UNIX for client/server communications is not supported anymore. -- MOS_MIGRATED_REVID=135355673
* Rollback of commit f107debac45ddf5859b1eb963379769b5815b18f. Also includes ↵Gravatar Janak Ramakrishnan2016-08-12
| | | | | | | | | the logical rollback of commit 67ad82a319ff8959e69e774e7c15d3af904ec23d. RELNOTES[INC]: Bazel supports Unix domain sockets for communication between its client and server again, temporarily, while we diagnose a memory leak. -- MOS_MIGRATED_REVID=130027009
* Remove the AF_UNIX client/server communication protocol.Gravatar Lukacs Berki2016-08-05
| | | | | | | | | It has been superseded by gRPC. RELNOTES[INC]: Blaze doesn't support Unix domain sockets for communication between its client and server anymore. Therefore, the --command_port command line argument doesn't accept -1 as a valid value anymore. -- MOS_MIGRATED_REVID=129424092
* Rename the property io.bazel.UnixFileSystem to io.bazel.EnableJni because ↵Gravatar Lukacs Berki2016-07-01
| | | | | | | | | that's what it does. In particular, it affects Windows. -- MOS_MIGRATED_REVID=126293339
* Fixed some Bazel java tests on WindowsGravatar Yun Peng2016-06-17
| | | | | | | | | | | | | | | | | | | | | | | | With this change, another 5 java_test targets of Bazel passed on Windows: //src/test/java/com/google/devtools/... build/lib/bazel/repository/downloader:DownloaderTests build/lib:graph_test build/lib:java-rules-tests build/lib:profiler-tests build/lib:windows_test Already passing targets are: //src/test/java/com/google/devtools/... build/android/ziputils:ziputils-tests build/lib:BazelDocumentationTests build/lib:objc-rules-tests build/skyframe:skyframe_base_test common/options:options_test -- Change-Id: Ibb63f29615b84d6df44289c902f6d85ab6569d61 Reviewed-on: https://bazel-review.googlesource.com/#/c/3821 MOS_MIGRATED_REVID=125084737
* Add SMT detection for mac. Fixes #963.Gravatar Yue Gan2016-04-05
| | | | | | | -- Change-Id: Ib83af0d0a04dc6b173bef1df28d17abc7a3c824d Reviewed-on: https://bazel-review.googlesource.com/#/c/3120/ MOS_MIGRATED_REVID=119027507
* Rename FilesystemUtils to NativePosixFiles.Gravatar Lukacs Berki2016-01-27
| | | | | | | This helps avoid confusion with File*S*ystemUtils, which differs in only the case of a character but is a completely different class. -- MOS_MIGRATED_REVID=113054116
* Followup change [] that fixes indentation as requested by Ulf.Gravatar Lukacs Berki2016-01-26
| | | | | -- MOS_MIGRATED_REVID=113048962
* Add a (working) windows compatibility mode that makes Bazel create hardlinks ↵Gravatar Lukacs Berki2016-01-26
| | | | | | | | | | | for links to writable files. Curiously enough, the native Unix JNI wrapper already had a function for link(), but it wasn't on the Java interface. build-runfiles is also updated accordingly. -- MOS_MIGRATED_REVID=113029168
* Use JavaIoFileSystem during the bootstrapping, removing JNI compilation.Gravatar Damien Martin-Guillerez2016-01-18
| | | | | | | Another step towards no C++ compilation outside of Bazel for bootstrapping. -- MOS_MIGRATED_REVID=112399835
* Augment JNI utime() method.Gravatar Eric Fellheimer2015-10-30
| | | | | -- MOS_MIGRATED_REVID=106634616
* Introduce Path#isSpecialFile, FileSystem#isSpecialFile, and ↵Gravatar Nathan Harmata2015-10-21
| | | | | | | FileStatus#isSpecialFile to help disambiguate between a regular file and a special file, since the file size of a special file cannot be trusted. -- MOS_MIGRATED_REVID=105903622
* Rationalize copyright headersGravatar Damien Martin-Guillerez2015-09-25
| | | | | | | | | | | The headers were modified with `find . -type f -exec 'sed' '-Ei' 's|Copyright 201([45]) Google|Copyright 201\1 The Bazel Authors|' '{}' ';'` And manual edit for not Google owned copyright. Because of the nature of ijar, I did not modified the header of file owned by Alan Donovan. The list of authors were extracted from the git log. It is missing older Google contributors that can be added on-demand. -- MOS_MIGRATED_REVID=103938715
* Fix "crashes with "Aborted" and no other useful errors on EPERM".Gravatar Philipp Wollermann2015-06-30
| | | | | -- MOS_MIGRATED_REVID=97234432
* Update from Google.Gravatar Han-Wen Nienhuys2015-02-25
-- MOE_MIGRATED_REVID=85702957