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

Road to v4 #4299

Open
6 tasks
mathisloge opened this issue Mar 14, 2022 · 3 comments
Open
6 tasks

Road to v4 #4299

mathisloge opened this issue Mar 14, 2022 · 3 comments

Comments

@mathisloge
Copy link
Collaborator

mathisloge commented Mar 14, 2022

This is mostly a todo list for me.
@artemp there is a v4 Milestone, which are some must haves of those?

@artemp
Copy link
Member

artemp commented Mar 15, 2022

@mathisloge - My thinking -> v4 is way overdue so let's defer static plugins which will bring breaking changes for later feature release v4.1.x ?

I still didn't have time to properly look into mapnik::setup() but my first reaction - can we make it at least configurable e.g if plugins are dynamic there's no requirement to call setup()? Sorry for lacking ambition on this, just feels like a big change 😄

@mathisloge
Copy link
Collaborator Author

@artemp agree that mapnik::setup() is a big breaking change. If you want to make it optionally, I need to look into calling setup method in the translation unit to call it at dynamic initialization time.

https://github.com/mapnik/mapnik/blob/bb1bc2f07bdd85ed76d2dfa07a46670fa8b53769/src/mapnik.cpp

e.g.

#ifndef MAPNIK_STATIC_DEFINE
bool shared_init_complete = mapnik::setup();
#endif

or without the macro and just always call the setup method. If the compiler then removes the dynamic init call, the user must add it. Should only be necessary if compiled statically.

With those changes we can introduce #4291 without silently breaking users code (bc. they are unaware of the setup method) and loudly fail users with custom plugins because compilation will fail.

@artemp
Copy link
Member

artemp commented Mar 15, 2022

@mathisloge sounds good! Avoiding macro feels more c++ but your call. It might be easier to #ifdef

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

No branches or pull requests

2 participants