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

Avro 1605 - Remove Jackson classes from public API #135

Closed
wants to merge 7 commits into from

Conversation

gszadovszky
Copy link
Contributor

@gszadovszky gszadovszky commented Sep 29, 2016

Tightened the visibility level of all public methods which leaks Jackson classes (private or package private). In case of the related method was accessed from outside the package the corresponding public static method of the class org.apache.avro.util.internal.Accessor is used.
Sorry for the big patch but it was easier to develop the whole at once.

@gszadovszky gszadovszky changed the title Avro 1605 Avro 1605 - Remove Jackson classes from public API Sep 29, 2016
@dkulp
Copy link
Member

dkulp commented Nov 2, 2018

Updated with latest on master, squashed, and now on master. Thanks!

@dkulp dkulp closed this Nov 2, 2018
iemejia referenced this pull request in iemejia/avro May 24, 2021
* Move from failure to thiserror

Closes #115

This is still a WIP branch, with lots of TODOs and some things about
thiserror I still can't wrap my head around. However, the heavy-lifting
is done, the failure crate has been removed from the list of
dependencies and compilation, tests, benchmarks and linting are all
green.

The two biggest things I have yet to figure out are:
1. How to deal with the errors manually defined in ser.rs and de.rs:
   they are publicly available and as soon as I touch anything I hit
   cryptic serde errors
2. How to make errors like TryFromIntError part of more abstract ones
   like ParseSchemaError, which could have a source error or just a
   String description.

* Update tests/io.rs

Co-authored-by: Joel Höner <joel@zyantific.com>

* Renaming errors + apply clippy consistently

 Rename AvroError to Error
 Removed redundant Error suffix from variants
 Introduce AvroResult shorthand alias with crate visibility
 Align clippy invocation in tests with the one in pre-commits

* Stop stressing about generic errors and add a couple more sprecific ones

* Centralize Ser and De errors into Error

The trick was implementing the ser::Error and de::Error trait for
crate::errors::Error and return Error::Ser and Error::De variants
in the implementation of the custom() method.

* SnappyCdcError as struct for consistency

* Update CHANGELOG

* Update CHANGELOG, README and add a Migration Guide page

Co-authored-by: Joel Höner <joel@zyantific.com>
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.

2 participants