Skip to content

Improve Pruning performed by the DirectRunnerApiSurfaceTest#3019

Closed
tgroh wants to merge 1 commit intoapache:masterfrom
tgroh:prune_drapi
Closed

Improve Pruning performed by the DirectRunnerApiSurfaceTest#3019
tgroh wants to merge 1 commit intoapache:masterfrom
tgroh:prune_drapi

Conversation

@tgroh
Copy link
Member

@tgroh tgroh commented May 9, 2017

Be sure to do all of the following to help us incorporate your contribution
quickly and easily:

  • Make sure the PR title is formatted like:
    [BEAM-<Jira issue #>] Description of pull request
  • Make sure tests pass via mvn clean verify.
  • Replace <Jira issue #> in the title with the actual Jira issue
    number, if there is one.
  • If this contribution is large, please file an Apache
    Individual Contributor License Agreement.

Prune the parts of the Core SDK that must be exposed as part of the API
surface. The remainder should not be exposed accidentally.

Prune the parts of the Core SDK that must be exposed as part of the API
surface. The remainder should not be exposed accidentally.
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling d73ecf4 on tgroh:prune_drapi into ** on apache:master**.

@tgroh
Copy link
Member Author

tgroh commented May 15, 2017

R: @kennknowles

ApiSurface.ofPackage(thisPackage, thisClassLoader)
// Do not include dependencies that are required based on the known exposures. This
// could alternatively prune everything exposed by the public parts of the Core SDK
.pruningClass(Pipeline.class)
Copy link
Member

Choose a reason for hiding this comment

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

This seems OK, though org.apache.beam.sdk is already allowed so it should be made automatic. Perhaps this is part of BEAM-2231, making is lazy. Whenever you arrive at a class that is allowed, it should be presumed anything reachable from there is also allowed. Of course, this would make us miss when one of our dependencies mistakenly exposes Guava, for example.

Copy link
Member

@kennknowles kennknowles left a comment

Choose a reason for hiding this comment

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

LGTM

@asfgit asfgit closed this in 32fd49a May 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants