Skip to content

Conversation

abstratt
Copy link
Member

@abstratt abstratt commented Oct 11, 2024

Fixes: #30860

  • changed platforms/core-configuration/configuration-cache/src/main/kotlin/org/gradle/internal/cc/impl/DeprecatedFeaturesListener.kt so Task.project deprecations are no longer behind STABLE_CONFIGURATION_CACHE
  • introduced testing/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/CommonDeprecations.groovy trait to be applied to tests that may need to expect the deprecation
  • updated platforms/documentation/docs/src/docs/userguide/optimizing-performance/configuration_cache.adoc so the deprecation is no longer linked to the feature flag
  • changed platforms/native/language-native/src/main/java/org/gradle/swiftpm/tasks/GenerateSwiftPackageManagerManifest.java so it no longer accesses Task.project at execution time (all it needeed was the project name), and updated corresponding tests to remove @ToBeFixedForCC)
  • changed dozens of tests to expect the new deprecation
  • in some cases, fixed the tests themselves (example: platforms/software/dependency-management/src/integTest/groovy/org/gradle/integtests/resolve/UnsafeConfigurationResolutionDeprecationIntegrationTest.groovy)

To be done:

  • address doc snippet tests

Reviewing cheatsheet

Before merging the PR, comments starting with

  • ❌ ❓must be fixed
  • 🤔 💅 should be fixed
  • 💭 may be fixed
  • 🎉 celebrate happy things

@abstratt abstratt self-assigned this Oct 11, 2024
@abstratt abstratt requested review from a team as code owners October 11, 2024 22:22
@abstratt abstratt requested review from a team, 6hundreds and bamboo and removed request for a team October 11, 2024 22:22
@abstratt

This comment has been minimized.

@bot-gradle

This comment has been minimized.

@bot-gradle

This comment has been minimized.

@abstratt abstratt marked this pull request as draft October 14, 2024 15:33
@abstratt abstratt changed the title Deprecation warning for task.getProject() should not be conditional on STABLE_CONFIGURATION_CACHE WIP: Deprecation warning for task.getProject() should not be conditional on STABLE_CONFIGURATION_CACHE Oct 14, 2024
@abstratt abstratt force-pushed the rchaves/master/deprecate-task-getProject branch 2 times, most recently from f97f59a to 68c7d02 Compare October 15, 2024 13:56
@abstratt

This comment has been minimized.

@bot-gradle

This comment has been minimized.

@bot-gradle

This comment has been minimized.

@abstratt

This comment has been minimized.

@bot-gradle

This comment has been minimized.

@abstratt abstratt force-pushed the rchaves/master/deprecate-task-getProject branch from 859c489 to 4f3b8c0 Compare October 16, 2024 05:45
@abstratt

This comment has been minimized.

@bot-gradle

This comment has been minimized.

@bot-gradle

This comment has been minimized.

@bot-gradle

This comment has been minimized.

@abstratt abstratt force-pushed the rchaves/master/deprecate-task-getProject branch from 4f3b8c0 to a1198d5 Compare October 16, 2024 15:51
@abstratt

This comment has been minimized.

@bot-gradle

This comment has been minimized.

@abstratt

This comment has been minimized.

@bot-gradle

This comment has been minimized.

@bot-gradle

This comment has been minimized.

- Expect deprecation for Task.project in Nebula dependency lock and lint plugins
- Expect `Task.project` deprecation in gradle-versions-plugin
- Expect `Task.project` deprecation in Gretty
- Expect `Task.project` deprecation for older version of Asciidoctor plugin
- Expect deprecation for Task.project in KMP
...which use `dependentComponents`, `model`,  `component` tasks
...otherwise, executer needs to be reconfigured every time. This is useful for setup that needs to be done the same way no matter how may times executer is invoked from all test cases in a test class.
This reverts commit 3b0e83f.
@abstratt abstratt force-pushed the rchaves/master/deprecate-task-getProject branch from e5e4171 to ca2762f Compare November 13, 2024 21:40
@abstratt
Copy link
Member Author

@bot-gradle test RFN

@bot-gradle

This comment has been minimized.

@abstratt abstratt added this pull request to the merge queue Nov 13, 2024
@bot-gradle
Copy link
Collaborator

The following builds have failed:

Merged via the queue into master with commit 83385cc Nov 14, 2024
21 of 32 checks passed
@abstratt abstratt deleted the rchaves/master/deprecate-task-getProject branch November 14, 2024 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecate calling Task.getProject at execution time

3 participants