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

Using versioned namespaces #1539

Closed
naszta opened this issue Mar 22, 2019 · 5 comments · Fixed by #3590
Closed

Using versioned namespaces #1539

naszta opened this issue Mar 22, 2019 · 5 comments · Fixed by #3590
Assignees
Labels
kind: enhancement/improvement release item: 🔨 further change solution: proposed fix a fix for the issue has been proposed and waits for confirmation

Comments

@naszta
Copy link
Contributor

naszta commented Mar 22, 2019

  • Describe the feature in as much detail as possible.
    In huge environments libraries and binaries might be compiled in different times. As this library is header only it has no dynamic linked library so from an ldd command the user is not able to detect which json library version is used in its dependencies. Using several version of json library accidentally might cause linking issues when the same function in the same namespace have different implementations. My idea is: the implementation namespace would contain the library version and we create an alias to it (so all currently implemented code could be the same while several versions of jsons could be used in the same binary silently).

  • Include sample usage where appropriate.
    We build a so, a file with json version 3.4.0, but the binary is built by 3.6.0.

  • possible implementation:
    namespace nlohmann should be changed to
    namespace nlohmann_json_3_6_0 and the last line of the header should be:
    namespace nlohmann = nlohmann_json_3_6_0;

@nlohmann
Copy link
Owner

Related #1394

@nlohmann
Copy link
Owner

I had a brief look and this seems to be a lot of work... Any volunteers?

@naszta
Copy link
Contributor Author

naszta commented Mar 23, 2019

I’m happy to do.

@naszta
Copy link
Contributor Author

naszta commented Apr 2, 2019

Hopefully on weekend I'll have time to do it.

@stale
Copy link

stale bot commented May 2, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the state: stale the issue has not been updated in a while and will be closed automatically soon unless it is updated label May 2, 2019
@stale stale bot closed this as completed May 9, 2019
@nlohmann nlohmann reopened this Jul 20, 2022
@nlohmann nlohmann linked a pull request Jul 20, 2022 that will close this issue
6 tasks
@nlohmann nlohmann added solution: proposed fix a fix for the issue has been proposed and waits for confirmation release item: 🔨 further change labels Jul 23, 2022
@stale stale bot removed the state: stale the issue has not been updated in a while and will be closed automatically soon unless it is updated label Jul 23, 2022
@nlohmann nlohmann added state: stale the issue has not been updated in a while and will be closed automatically soon unless it is updated and removed state: waiting for PR labels Jul 23, 2022
@stale stale bot removed the state: stale the issue has not been updated in a while and will be closed automatically soon unless it is updated label Jul 23, 2022
@nlohmann nlohmann added this to the Release 3.11.0 milestone Jul 23, 2022
@nlohmann nlohmann self-assigned this Jul 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: enhancement/improvement release item: 🔨 further change solution: proposed fix a fix for the issue has been proposed and waits for confirmation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants