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

Enables explicit API mode #71

Merged
merged 1 commit into from
May 13, 2022

Conversation

popematt
Copy link
Contributor

@popematt popematt commented May 12, 2022

Issue #, if available:

Fixes #47

Description of changes:

Enables Explicit API mode. This requires us to be explicit about what is part of the API, and to be explicit about the return types of any public functions.

In most cases, it was obvious that the class/interface/val/fun should be public, but there are a few cases that I was not completely sure about.

  • typealias Annotations -- appears to only be used internally, but another typealias (MetaContainer) does already have confirmed external usage.
  • IonElementException constructors -- while the exceptions themselves should be public, should the constructors be public?

In both cases, I have chosen to be conservative and label them as internal, but I'm definitely open to be convinced otherwise.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@codecov-commenter
Copy link

Codecov Report

Merging #71 (44f0c5f) into master (a56988f) will decrease coverage by 0.01%.
The diff coverage is 68.57%.

@@             Coverage Diff              @@
##             master      #71      +/-   ##
============================================
- Coverage     88.07%   88.06%   -0.02%     
  Complexity      453      453              
============================================
  Files            30       30              
  Lines           822      821       -1     
  Branches         72       72              
============================================
- Hits            724      723       -1     
  Misses           65       65              
  Partials         33       33              
Impacted Files Coverage Δ
src/com/amazon/ionelement/api/IonUtils.kt 100.00% <ø> (ø)
src/com/amazon/ionelement/api/ElementType.kt 87.23% <28.57%> (ø)
.../com/amazon/ionelement/api/IonElementExtensions.kt 33.33% <33.33%> (ø)
...c/com/amazon/ionelement/api/IonElementException.kt 50.00% <50.00%> (ø)
src/com/amazon/ionelement/api/IonLocation.kt 66.66% <66.66%> (-4.77%) ⬇️
src/com/amazon/ionelement/api/Ion.kt 98.27% <100.00%> (ø)
src/com/amazon/ionelement/api/IonElement.kt 100.00% <100.00%> (ø)
src/com/amazon/ionelement/api/IonElementLoader.kt 100.00% <100.00%> (ø)
src/com/amazon/ionelement/api/IonMeta.kt 62.50% <100.00%> (ø)
...rc/com/amazon/ionelement/impl/ByteArrayViewImpl.kt 40.00% <100.00%> (ø)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a56988f...44f0c5f. Read the comment docs.

@jobarr-amzn jobarr-amzn merged commit 5be4635 into amazon-ion:master May 13, 2022
@popematt popematt deleted the explicit_api_mode branch May 13, 2022 23:06
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.

Enable explicit library mode
3 participants