-
Notifications
You must be signed in to change notification settings - Fork 319
Add internal package to 1.0 modules #2811
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2811 +/- ##
============================================
+ Coverage 35.04% 35.05% +0.01%
Complexity 2102 2102
============================================
Files 541 541
Lines 19322 19322
Branches 1829 1829
============================================
+ Hits 6771 6774 +3
+ Misses 11740 11738 -2
+ Partials 811 810 -1 |
RingerJK
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check dokka configuration, because packages were changed so need to change them at dokka config 👀
| * information. | ||
| * | ||
| * The latest route progress object can be obtained through the [RouteProgressObserver]. | ||
| * The latest route progress object can be obtained through the [com.mapbox.navigation.base.trip.RouteProgressObserver.RouteProgressObserver]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
| * The latest route progress object can be obtained through the [com.mapbox.navigation.base.trip.RouteProgressObserver.RouteProgressObserver]. | |
| * The latest route progress object can be obtained through the [com.mapbox.navigation.base.trip.RouteProgressObserver]. |
| @file:JvmName("MapboxRouteOptionsUtils") | ||
|
|
||
| package com.mapbox.navigation.base.extensions | ||
| package com.mapbox.navigation.base.internal.extensions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should fun RouteOptions.Builder.applyDefaultParams and fun RouteOptions.Builder.coordinates be internal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought about this too and IMO everything should be private until proven otherwise 😅 In other words, it's better to keep it internal and if customers request this we can always make it public afterwards (but not the other way around as we'd break SemVer 😉).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it cannot be internal, examples uses it. The same as above
| @@ -1,4 +1,4 @@ | |||
| package com.mapbox.navigation.base.extensions | |||
| package com.mapbox.navigation.base.internal.extensions | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need this internal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above. All these extensions are only used internally and I don't think they're that useful for developers as they can create their own. The less public APIs, the better. Otherwise we need to maintain them, we cannot change them without breaking SemVer, etc.
bef249d to
3e11249
Compare
|
Addressed feedback. This is ready for another round of 👀 @mapbox/navigation-android |
9fe521c to
994c0bc
Compare
| @file:JvmName("ContextEx") | ||
|
|
||
| package com.mapbox.navigation.base.extensions | ||
| package com.mapbox.navigation.base.internal.extensions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it cannot be internal, examples uses it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
examples is our test app, we can use it 😉
… libdirections-onboard and libnavigation-base and bump dokka dependency version to 0.10.1
994c0bc to
7c9fa60
Compare
| @@ -1,4 +1,4 @@ | |||
| package com.mapbox.navigation.core.trip.session | |||
| package com.mapbox.navigation.base.trip | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any particular reason this was exposed? The observer is still tied to the MapboxTripSession, which is internal. Is there a scenario where the observer would be used without using core?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved it so it lives near the RouteProgress and the rest of contracts and models (as it is one of the main observers accessed by most of the modules and needed publicly for clients). Although, that's a great point. Currently MapboxTripSession lives in libnavigation-core and I can't think of any use case in which you might want to use the observer alone. Can move it back to libnavigation-core as part of the missing internal package refactoring #2417 of libnavigation-core 👍
Description
This PR adds
internalpackage tolibdirections-hybrid,libdirections-offboard,libdirections-onboardandlibnavigation-base. It also bumpsdokkadependency version to0.10.1Splitting #2417 in different PRs
As this is going to be a big refactor the plan here is to open small PRs and move stuff incrementally making the review easier. Even trying to do so this first PR included changes in 67 files (mostly moving files around)
bug,feature,new API(s),SEMVER, etc.)Goal
The goal here is to add
internalpackage to1.0modules and the APIs designed only for local usageImplementation
internalpackageinternalmodifierRouteProgressObserverintolibnavigation-basedokkadependency version to0.10.1independencies.gradleTesting
SNAPSHOTupstream dependencies if needed) through testapp/demo app and run all activities to avoid regressionsChecklist
CHANGELOGincluding this PR