Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

[core] [android] - configurable API endpoint - #6309

Merged
tobrun merged 1 commit into
masterfrom
tobrun-configurable-base-endpoint
Sep 16, 2016
Merged

tobrun merged 1 commit into
masterfrom
tobrun-configurable-base-endpoint

Conversation

@tobrun

@tobrun tobrun commented Sep 12, 2016

Copy link
Copy Markdown
Member

This PR enables configuration of a custom URL base endpoint.
Review c++: @jfirebaugh @tmpsantos
Review java: @zugaldia

Side notes vs GL-JS implementation:

  • I went for using APIBaseURL over APIURL for readability
  • I initially mimicked the Config class concept but removed it after discussion with @tmpsantos

@tobrun tobrun added Android Mapbox Maps SDK for Android Core The cross-platform C++ core, aka mbgl labels Sep 12, 2016
@tobrun tobrun added this to the android-v4.2.0 milestone Sep 12, 2016
Comment thread platform/default/online_file_source.cpp Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set the default value to mbgl::util::API_BASE_URL instead of checking for the empty string.

@tobrun

tobrun commented Sep 12, 2016

Copy link
Copy Markdown
Member Author

Thanks @jfirebaugh for 👀 , the remarks have been fixed in ad5f363.
I will now look into resolving this for the other bindings.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tobrun This is very hard to read, could you split it up?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is generated code from intelij or actually it's copied code from intelij. The correct way should be to regenerate the hashcode/equals method.. Will pick this up with other remarks but I'm not taking readability into account with generated code.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tobrun Sorry, I missed this was generated code. Scratch my comment.

@tmpsantos

Copy link
Copy Markdown
Contributor

This PR is missing unit tests for a new core API. ;-)

@tobrun
tobrun force-pushed the tobrun-configurable-base-endpoint branch from 011ef9e to 4db1f6d Compare September 14, 2016 17:54
@tobrun

tobrun commented Sep 14, 2016

Copy link
Copy Markdown
Member Author

@tmpsantos I fixed up the comments and added a tests in 4db1f6d.

@tobrun
tobrun force-pushed the tobrun-configurable-base-endpoint branch from 4db1f6d to a65b937 Compare September 15, 2016 16:53
@1ec5 1ec5 mentioned this pull request Sep 15, 2016
@1ec5

1ec5 commented Sep 15, 2016

Copy link
Copy Markdown
Contributor

Tracking the necessary iOS/macOS SDK changes in #6346.

@tobrun
tobrun force-pushed the tobrun-configurable-base-endpoint branch from a65b937 to ee14d3b Compare September 15, 2016 18:29
@tobrun

tobrun commented Sep 15, 2016

Copy link
Copy Markdown
Member Author

Need to fix the tests for glfw, the tests are missing runloop

@tobrun

tobrun commented Sep 15, 2016

Copy link
Copy Markdown
Member Author

@tmpsantos thanks for the hint on RunLoop.
This is now implemented in 5825a6c and the tests are passing 😎

@tmpsantos tmpsantos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this and thanks for also adding new tests!

Comment thread test/storage/online_file_source.cpp Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be great if you could split the PR in two or three commits:

  • One adding the API to core
  • One adding the API to android
  • One adding the tests

This makes reviewing a lot easier, since reviewing is usually done "per commit". You can do this next time, but for now I'm fine squashing everything into a single commit. The last two are fixing something on the first one, so they don't really add value to the PR.

@tobrun
tobrun force-pushed the tobrun-configurable-base-endpoint branch from 5825a6c to 02d8e0e Compare September 16, 2016 00:31
Comment thread test/util/mapbox.cpp Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit, extra tab

@tobrun
tobrun force-pushed the tobrun-configurable-base-endpoint branch from 02d8e0e to 57665c7 Compare September 16, 2016 01:08
@tobrun
tobrun merged commit 9ef6544 into master Sep 16, 2016
@jfirebaugh
jfirebaugh deleted the tobrun-configurable-base-endpoint branch September 16, 2016 18:01
@incanus incanus mentioned this pull request Oct 14, 2016
3 tasks done
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Android Mapbox Maps SDK for Android Core The cross-platform C++ core, aka mbgl

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants