beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kenneth Knowles (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (BEAM-882) Make ApiSurfaceTest detect the java package/module under test
Date Wed, 02 Nov 2016 16:02:58 GMT

     [ https://issues.apache.org/jira/browse/BEAM-882?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Kenneth Knowles updated BEAM-882:
---------------------------------
    Description: 
{{ApiSurfaceTest}} in the {{sdks/java/core}} is the class responsible for protecting our public
API surface.

This test walks the public signatures of all modules and explicitly verifies that everything
is on a whitelist. This is how we control what dependencies we expose to our users, so that
Beam can keep a tight, stable API surface.

Today you must indicate what Java package to scan, such as `org.apache.beam.sdk`. It would
be nice for this to be automatically determined.

  was:
{{ApiSurfaceTest}} in the {{sdks/java/core}} is the class responsible for protecting our public
API surface.

This test walks the public signatures of all modules and explicitly verifies that everything
is on a whitelist. This is how we control what dependencies we expose to our users, so that
Beam can keep a tight, stable API surface.

We should improve this functionality to be reusable across modules.

Some desiderata for reuse:

* test automatically infers the module on which it should seed the API search.
* only 2 things in the file -- a whitelist and a ~1-line test that passes the whitelist as
a parameter to some helper.
* test fails if there are things in the whitelist that are not exposed.

Any other cool things that are similar to what Maven enforcer does?

As an example of what you have to do without this functionality, see https://github.com/apache/incubator-beam/pull/1183


> Make ApiSurfaceTest detect the java package/module under test
> -------------------------------------------------------------
>
>                 Key: BEAM-882
>                 URL: https://issues.apache.org/jira/browse/BEAM-882
>             Project: Beam
>          Issue Type: Improvement
>          Components: testing
>    Affects Versions: Not applicable
>            Reporter: Kenneth Knowles
>             Fix For: Not applicable
>
>
> {{ApiSurfaceTest}} in the {{sdks/java/core}} is the class responsible for protecting
our public API surface.
> This test walks the public signatures of all modules and explicitly verifies that everything
is on a whitelist. This is how we control what dependencies we expose to our users, so that
Beam can keep a tight, stable API surface.
> Today you must indicate what Java package to scan, such as `org.apache.beam.sdk`. It
would be nice for this to be automatically determined.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message