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

Updating the Homebrew Command #2943

Merged
merged 3 commits into from
Aug 19, 2021
Merged

Conversation

amirmasoudabdol
Copy link
Contributor

So, apparently, homebrew/core has a nlohmann-json formula. This means that, even after tapping to nlohmann/json, the user has to specify what formula should be used. and running brew install nlohmann-json will use the homebrew/core instead of the formula located at nlohmann/json. To resolve this, the install command needs to be more explicit and point to your formula.

You can point to your formula in two fashions, brew install nlohmann_json or more explicitly, brew install nlohmann/json/nlohmann_json. This distinguish it from the existing formula homebrew/core/nlohmann-json which I believe is not being maintained by people in this repo.


Pull request checklist

Read the Contribution Guidelines for detailed information.

  • Changes are described in the pull request, or an existing issue is referenced.
  • The test suite compiles and runs without error.
  • Code coverage is 100%. Test cases can be added by editing the test suite.
  • The source code is amalgamated; that is, after making changes to the sources in the include/nlohmann directory, run make amalgamate to create the single-header file single_include/nlohmann/json.hpp. The whole process is described here.

Please don't

  • The C++11 support varies between different compilers and versions. Please note the list of supported compilers. Some compilers like GCC 4.7 (and earlier), Clang 3.3 (and earlier), or Microsoft Visual Studio 13.0 and earlier are known not to work due to missing or incomplete C++11 support. Please refrain from proposing changes that work around these compiler's limitations with #ifdefs or other means.
  • Specifically, I am aware of compilation problems with Microsoft Visual Studio (there even is an issue label for these kind of bugs). I understand that even in 2016, complete C++11 support isn't there yet. But please also understand that I do not want to drop features or uglify the code just to make Microsoft's sub-standard compiler happy. The past has shown that there are ways to express the functionality such that the code compiles with the most recent MSVC - unfortunately, this is not the main objective of the project.
  • Please refrain from proposing changes that would break JSON conformance. If you propose a conformant extension of JSON to be supported by the library, please motivate this extension.
  • Please do not open pull requests that address multiple issues.

This resolves a conflict, and stops Homebrew from using the default formula.
@coveralls
Copy link

coveralls commented Aug 18, 2021

Coverage Status

Coverage remained the same at 100.0% when pulling 14af5d4 on amirmasoudabdol:patch-1 into f42a74b on nlohmann:develop.

@amirmasoudabdol
Copy link
Contributor Author

amirmasoudabdol commented Aug 18, 2021

I think this needs more attention. I just realised from some test that installing nlohmann_json from your nlohmann/json does not setup the CMake correctly. This might be because I had the version from homebrew/core installed and now it's being confused. But, I've tried a clean install and had the same problem.

As we discussed on Twitter, if you are willing to drop the nlohmann/json Formula, then we can make on the homebrew/core Formula and keep that updated. I try to update the homebrew formula for this update and reflect it on the README. However, we need to have this as part of the release checklist to make sure that it's been keeping up to date.

Update: I see. You formula has a --with-cmake flag. I don't recall this being like this either. I think the default was on CMake and I never have to think about. So, for the homebrew/core, I'm going to default on the CMake, as it is already actually.

Update: So, here is the updated Formula on homebrew/core. Let's see how this goes. If it goes well, we can default to the brew install nlohmann-json in the README file.

I've submitted a PR on [homebrew/core](Homebrew/homebrew-core#83479) that updates their Formula. After that one is set, we can merge this and let users use the default formula, and we don't have to maintain two separate Formulas.
@amirmasoudabdol
Copy link
Contributor Author

The PR at homebrew/core has been approved, and will be merged soon. So, I think this one can go after that one.

Copy link
Owner

@nlohmann nlohmann left a comment

Choose a reason for hiding this comment

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

@amirmasoudabdol
Copy link
Contributor Author

I think that should be done!

Copy link
Owner

@nlohmann nlohmann 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.

@nlohmann nlohmann self-assigned this Aug 19, 2021
@nlohmann nlohmann added this to the Release 3.10.1 milestone Aug 19, 2021
@nlohmann nlohmann merged commit 44ffaa0 into nlohmann:develop Aug 19, 2021
@nlohmann
Copy link
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants