Skip to content

Conversation

w25r
Copy link

@w25r w25r commented Apr 13, 2017

Context

Fixes #1724

Contributor Checklist

  • Update User Guide, DSL Reference, and Javadoc for public-facing changes
  • Ensure that tests pass locally: ./gradlew quickCheck <impacted-subproject>:check

Gradle Core Team Checklist

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation including proper use of @since and @Incubating annotations for all public APIs

@w25r w25r requested a review from bmuschko April 13, 2017 23:04
@w25r w25r self-assigned this Apr 13, 2017
@w25r w25r added the a:chore Minor issue without significant impact label Apr 13, 2017
@w25r w25r added this to the 4.0 RC1 milestone Apr 13, 2017
Copy link
Contributor

@adammurdoch adammurdoch left a 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,
Copy link
Contributor

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 }
Copy link
Contributor

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'}
Copy link
Contributor

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 {
Copy link
Contributor

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 {
Copy link
Contributor

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 {
Copy link
Contributor

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 {
Copy link
Contributor

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.
Copy link
Contributor

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 {
Copy link
Contributor

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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should stay

@adammurdoch
Copy link
Contributor

adammurdoch commented Apr 13, 2017

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.

@w25r
Copy link
Author

w25r commented Apr 14, 2017

@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.

@w25r w25r closed this Apr 14, 2017
@bmuschko bmuschko removed their request for review April 14, 2017 15:42
@big-guy big-guy deleted the wl-tooling-api-dep-removal branch March 1, 2018 03:39
@ov7a ov7a removed this from the 4.0 RC1 milestone Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a:chore Minor issue without significant impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Removal of deprecated classes/methods in tooling-api module

3 participants