-
Notifications
You must be signed in to change notification settings - Fork 5k
Removing deprecation notices from Tooling API #1829
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This removes all of the backwards compatibility infrastructure. We can't just remove this stuff.
The only thing we should remove are the 2 deprecated methods on the public API, and adapt the tests so that the old methods continue to work for older TAPI versions.
|
||
import java.io.File; | ||
|
||
public class DefaultConnection implements ConnectionVersion4, InternalConnection, BuildActionRunner, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class shouldn't change, otherwise you're breaking compatibility with older Gradle versions.
|
||
minimalProject.projectDependencies.size() == 2 | ||
|
||
minimalProject.projectDependencies.any { it.path == 'root' && it.targetProject == minimalModel } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this test still needs to work for older TAPI versions.
lib.scope.scope == 'TEST' | ||
|
||
IdeaModuleDependency mod = libs.find {it instanceof IdeaModuleDependency} | ||
mod.dependencyModule == project.modules.find { it.name == 'api'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test still needs to work for older TAPI versions. Same for all of the tests modified below.
* | ||
* <p>Used for providers >= 1.8 and <= 2.0</p> | ||
*/ | ||
public class ActionAwareConsumerConnection extends AbstractPost12ConsumerConnection { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to stay. It's part of the cross version protocol between the TAPI consumer and the Gradle provider. Same for all of the types under org.gradle.tooling.internal.protocol
.
* | ||
* <p>Used for providers >= 1.2 and <= 1.6.</p> | ||
*/ | ||
public class BuildActionRunnerBackedConsumerConnection extends AbstractPost12ConsumerConnection { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to stay, for compatibility with older Gradle versions.
* @deprecated 1.2-rc-1. Use {@link BuildParameters} instead. | ||
*/ | ||
@Deprecated | ||
public interface BuildOperationParametersVersion1 extends LongRunningOperationParametersVersion1 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should stay
* @deprecated 1.2-rc-1. Use {@link BuildParameters} instead. | ||
*/ | ||
@Deprecated | ||
public interface BuildParametersVersion1 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should stay
* <li>Implementations should implement {@link ConfigurableConnection}. This is used by all consumer versions from 1.2-rc-1. | ||
* <li>Implementations should implement {@link StoppableConnection}. This is used by all consumer versions from 2.2-rc-1. | ||
* <li>Implementations should provide a zero-args constructor. This is used by all consumer versions from 1.0-milestone-3. | ||
* <li>For backwards compatibility, implementations should implement {@link InternalBuildActionExecutor}. This is used by all consumer versions from 1.8-rc-1 to 2.0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file shouldn't change
* @see ConnectionVersion4 | ||
*/ | ||
@Deprecated | ||
public interface InternalBuildActionExecutor extends InternalProtocolInterface { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should stay
* @see ConnectionVersion4 | ||
*/ | ||
@Deprecated | ||
public interface InternalConnection extends ConnectionVersion4, InternalProtocolInterface { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should stay
For this kind of change, make sure you run the cross-version test suite on CI against a branch to catch all the backwards compatibility breakages. |
@adammurdoch if I'm interpreting your comments correctly, the only thing I should remove are the deprecated methods from EclipseProjectDependency and IdeaModuleDependency. I'm not sure I understand what you mean by 'adapt the tests so that the old methods continue to work for older TAPI versions' but I'll give it a shot. I'm going to go ahead and close this pull request, and open a new one with the new changes. |
Context
Fixes #1724
Contributor Checklist
./gradlew quickCheck <impacted-subproject>:check
Gradle Core Team Checklist
@since
and@Incubating
annotations for all public APIs