Skip to content
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

Build: Declare avro as an api dependency of iceberg-core #10573

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

devinrsmith
Copy link
Contributor

iceberg-core should declare an api dependency on avro. For example, the public class org.apache.iceberg.PartitionData extends avro-specific types. In addition, there are public methods that deal with avro types, see org.apache.iceberg.avro.AvroSchemaUtil

iceberg-core should declare an api dependency on avro. For example, the public class `org.apache.iceberg.PartitionData` extends avro-specific types. In addition, there are public methods that deal with avro types, see `org.apache.iceberg.avro.AvroSchemaUtil`
@github-actions github-actions bot added the build label Jun 26, 2024
@findepi
Copy link
Member

findepi commented Jul 9, 2024

For example, the public class org.apache.iceberg.PartitionData extends avro-specific types. In addition, there are public methods that deal with avro types

Can such things be statically checked so that we don't have to manually analyse API surface?

@devinrsmith
Copy link
Contributor Author

I've often wondered the same thing (deephaven/deephaven-core#4411, deephaven/deephaven-core#4401)... it seems like it would be a very useful tool.

It's possible that something along the lines of https://github.com/revapi/revapi, https://github.com/siom79/japicmp, https://github.com/classgraph/classgraph could be used to automate the process of checking which dependencies are really api dependencies and which are implementation, but I haven't dug in further.

I see that iceberg already makes use out of revapi; I wonder if somebody familiar with that tool could chime in?

@Fokko Fokko requested a review from nastra July 9, 2024 14:59
@nastra
Copy link
Contributor

nastra commented Jul 11, 2024

Adding some additional context around api vs implementation for other reviewers:

Dependencies appearing in the api configurations will be transitively exposed to consumers of the library, and as such will appear on the compile classpath of consumers. Dependencies found in the implementation configuration will, on the other hand, not be exposed to consumers, and therefore not leak into the consumers' compile classpath

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants