Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Split :launcher into :launcher, :launcherBootstrap and :launcherStartup

in order to isolate Java 6 stuff

Signed-off-by: Paul Merlin <paul@gradle.com>

    • -62
    • +0
    ./CompatibleDaemonExpirationStrategy.java
    • -56
    • +0
    ./DaemonIdleTimeoutExpirationStrategy.java
    • -73
    • +0
    ./DaemonRegistryUnavailableExpirationStrategy.java
    • -172
    • +0
    ./DefaultIncomingConnectionHandler.java
    • -56
    • +0
    ./NotMostRecentlyUsedDaemonExpirationStrategy.java
  1. … 530 more files in changeset.
Split :launcher into :launcher, :launcherBootstrap and :launcherStartup

in order to isolate Java 6 stuff

Let split launcher projects code be shipped in a fat jar

for backwards compatibility

Signed-off-by: Paul Merlin <paul@gradle.com>

    • -62
    • +0
    ./CompatibleDaemonExpirationStrategy.java
    • -56
    • +0
    ./DaemonIdleTimeoutExpirationStrategy.java
    • -73
    • +0
    ./DaemonRegistryUnavailableExpirationStrategy.java
    • -172
    • +0
    ./DefaultIncomingConnectionHandler.java
    • -56
    • +0
    ./NotMostRecentlyUsedDaemonExpirationStrategy.java
  1. … 534 more files in changeset.
Split :launcher into :launcher, :launcherBootstrap and :launcherStartup

in order to isolate Java 6 stuff

Let split launcher projects code be shipped in a fat jar

for backwards compatibility

Signed-off-by: Paul Merlin <paul@gradle.com>

    • -62
    • +0
    ./CompatibleDaemonExpirationStrategy.java
    • -56
    • +0
    ./DaemonIdleTimeoutExpirationStrategy.java
    • -73
    • +0
    ./DaemonRegistryUnavailableExpirationStrategy.java
    • -172
    • +0
    ./DefaultIncomingConnectionHandler.java
    • -56
    • +0
    ./NotMostRecentlyUsedDaemonExpirationStrategy.java
  1. … 534 more files in changeset.
Introduce test that simulates GC activity

    • -0
    • +80
    ./health/gc/DefaultGarbageCollectionMonitor.java
    • -46
    • +10
    ./health/gc/GarbageCollectionMonitor.java
  1. … 4 more files in changeset.
Add integration test that fails if Gradle does not understand the JVM's GC settings

    • -37
    • +0
    ./health/gc/GarbageCollectionMonitor.java
    • -0
    • +47
    ./health/gc/GarbageCollectorMonitoringStrategy.java
  1. … 1 more file in changeset.
Rework daemon GC/memory expiration checks

- Do not sniff for VM vendor to figure out which GC strategies may be used

- Rename permgen -> non-heap in most places, Java 8+ uses metaspace for this memory pool

- Rename tenured -> heap

- Only add GarbageCollectionEvents to the observation window when there's been a GC collection

- This simplifies the calculation of GC rate

- Non-heap memory pools are not GC'd

- Re-enable daemon performance soak test

    • -77
    • +34
    ./health/DaemonMemoryStatus.java
    • -2
    • +2
    ./health/HealthExpirationStrategy.java
    • -0
    • +46
    ./health/LowHeapSpaceDaemonExpirationStrategy.java
    • -0
    • +45
    ./health/LowNonHeapDaemonExpirationStrategy.java
    • -45
    • +0
    ./health/LowPermGenDaemonExpirationStrategy.java
    • -46
    • +0
    ./health/LowTenuredSpaceDaemonExpirationStrategy.java
    • -2
    • +12
    ./health/gc/DefaultSlidingWindow.java
    • -23
    • +30
    ./health/gc/GarbageCollectionCheck.java
    • -3
    • +3
    ./health/gc/GarbageCollectionEvent.java
    • -70
    • +23
    ./health/gc/GarbageCollectionMonitor.java
    • -86
    • +68
    ./health/gc/GarbageCollectionStats.java
    • -22
    • +22
    ./health/gc/GarbageCollectorMonitoringStrategy.java
  1. … 11 more files in changeset.
Change SystemProperties standard/important property methods

Instead of returning a set and having call sites call contains, just return a boolean.

  1. … 2 more files in changeset.
Represent the result of `BuildActionExecuter.execute()` as an object that encapsulates either a result object or a failure, rather than as an opaque return value or a thrown `ReportedException`.

  1. … 23 more files in changeset.
Fix metaspace leak in ShutdownHookActionRegister

This class added a shutdown hook and never removed it,

which created a classloader leak whenever it was used

in an embedded context, e.g. in the in-process Groovy

compiler.

The approach of having a single hook with multiple actions

seems like a premature optimization. Creating a Thread object

is not expensive, starting it is. The class now just serves

as a convenience for adding/removing shutdown hooks, but creates

one thread per hook, so it can be correctly removed again.

  1. … 4 more files in changeset.
Allow starting daemon with lower priority

  1. … 23 more files in changeset.
Replace deprectated `IOUtils.closeQuietly` uses with `IoActions.closeQuietly`

  1. … 20 more files in changeset.
Fix handling of InterruptedExceptions

These exceptions were handled incorrectly throughout the whole

codebase, usually rethrown without restoring the interrupt status

or discarded entirely. This means that the system would not stop

executing even though the user wanted it to. In some cases this

also left the system in an inconsistent state, leading to deadlocks.

The most notable changes include:

- UncheckedException.rethrow automatically restores the interrupt status

- AsyncDispatch is guaranteed to deliver its messages, even when interrupted

- ExecHandle cancels the started process if it is interrupted while waiting

- ExecHandle disconnects from the process' output before killing it

- The worker API cancels the started work items if it is interrupted

- ManagedExecutors shut down immediately if they are interrupted while stopping

- We no longer log exceptions caused by interruption to the console

- Interrupting our caches no longer leaks file locks

    • -0
    • +92
    ./exec/DaemonConnectionBackedEventConsumer.java
  1. … 36 more files in changeset.
Make environment variable mutation work on Java9+

Mutating the environment requires reflection on the

java.util package, so we need to open that package

up to Gradle. Since Gradle is not modularized, this

means opening it up to the whole classpath. This is

less than desirable, but the only way to restore the

behavior we had on Java 8 and below.

We should start limiting access to environment variables

going forward so users don't depend on arbitrary values.

However, this change allows us to unblock users who are

currently either not using Java 9 or running Gradle in

no-daemon mode, both of which are terrible solutions.

  1. … 11 more files in changeset.
Fix tests, mark more internal listeners

  1. … 22 more files in changeset.
Switch to GradleSystem.getenv()

This commit replaces all System.getenv() with GradleSystem.getenv() in Gradle code base.

  1. … 23 more files in changeset.
Honor singleUse when creating GlobalScopeServices (#5966)

Previously, DaemonServerConfiguration.isSingleUse is totally ignored

when creating GlobalScopeServices, which makes GradleBuildEnvironment.isLongLivingProcess()

always return true. This commit fixes this issue.

  1. … 1 more file in changeset.
Add Gradle.getenv() api

  1. … 9 more files in changeset.
Make OutputEventRenderer asynchronous

  1. … 5 more files in changeset.
Avoid spurious failures during connection tear-down

Remove remaining Java serialization from the initial build request message sent from the client to the daemon. There is now no Java serialization used between the client and daemon when running builds from the command-line. There is still some when using the Tooling API.

  1. … 23 more files in changeset.
Don't emit a warning that the “daemon will cancel the build”.

This makes no sense to users.

  1. … 1 more file in changeset.
Close System.in after build

  1. … 1 more file in changeset.
Rename to EndOnClosedInputStream

Attempt to fix https://github.com/gradle/gradle-private/issues/975

This PR adds a guard for PipedInputStream to make sure it's safe to

read after being closed.

  1. … 4 more files in changeset.
Address review feedback

- use DaemonServerConfiguration to pass information further down

- remove BuildAndStop command

- change naming to use singleUse

+review REVIEW-6567

  1. … 10 more files in changeset.
Address review feedback

- change parameter ordering in DefaultDaemonScanInfo

  1. … 1 more file in changeset.
Add marker annotation and proper javadoc

Expose single run daemon usage in DaemonScanInfo

  1. … 11 more files in changeset.
Strive to keep Gradle's monotonic clock in sync with the system clock

  1. … 70 more files in changeset.
Simplify time handling internally and for build scans (#2857)

* Don't make TimeProvider Serializable.

This isn't safe and generally doesn't make sense.

* Extract and promote the concept of a build timer.

This was previously not well defined and being overlaid with the concept of when a user/tool requested something, which is not always the same thing.

* Pare down the deprecated org.gradle.util.Clock down to the minimum required.

Internal usage is replaced by a `getStartTime()` directly on BuildRequestContext.

What is left is only kept for backwards compatibility with scans.

* Rename TimeProvider to Clock.

* Move BuildExecutionTimer out of baseServices into core, and into a better package.

* Remove unused.

* Simplify the time package by merging types.

* Prevent the client's build started timestamp from being later than when the provider received the build request.

* Provide a dedicated mechanism for conveying the build start time to build scans.

* Consolidate the ways of formatting durations.

  1. … 177 more files in changeset.