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

move LightGBM-vendored json11 into a LightGBM-specific namespace (fixes #5944) #5946

Merged

Conversation

maskedcoder1337
Copy link
Contributor

@maskedcoder1337 maskedcoder1337 commented Jun 26, 2023

The LightGBM library includes code from the json11 library (https://github.com/dropbox/json11), with some minor changes for internal use.

When attempting to integrate the LightGBM library into another project that already relies on the unmodified json11 library, it doesn't compile due to multiple definition of methods.

Using a single version of json11 for everything doesn't work because some method signatures were changed in 346db12.

This problem can be easily resolved by changing the namespace, and since this project is the one using a modified version of json11, I think that the change should be implemented here.

Fixes #5944

@maskedcoder1337
Copy link
Contributor Author

@microsoft-github-policy-service agree

@jameslamb jameslamb self-requested a review June 26, 2023 15:12
Copy link
Collaborator

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

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

Thanks for this. But before we review, can you please answer the question I asked in #5944 (comment)?

please be more specific about what "conflict" means?

@jameslamb jameslamb changed the title refactor: change namespace in modified json11. refactor: change namespace in modified json11 Jun 27, 2023
@jameslamb jameslamb changed the title refactor: change namespace in modified json11 move LightGBM-vendored json11 into a LightGBM-specific namespace (fixes #5944) Jun 29, 2023
@jameslamb jameslamb self-requested a review June 29, 2023 19:22
Copy link
Collaborator

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

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

Looks good to me, based on the description you provided in #5944 (comment). Thanks for that!

@guolinke or @shiyu1994 could you please also provide a review?

@jameslamb jameslamb merged commit 9f78cce into microsoft:master Jun 30, 2023
@github-actions
Copy link

github-actions bot commented Oct 4, 2023

This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Potential conflict with unmodified json11 code in external project
3 participants