Conversation
|
Hello @vhvb1989! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
|
I am not sure why the CI is failing. For windows, it is failing because of a compilation issue: https://dev.azure.com/azure-sdk/public/_build/results?buildId=636650&view=logs&j=ea3cb55d-7776-5c6b-1bf6-a444b419cb36&t=fa608568-9cc5-5ff2-e699-fab7f8250b1b And on linux, it is failing because of a unit test failure: |
|
@ahsonkhan , not sure. |
Hmm...ok. Requiring the user to install a 3rd party json library before they can start to use the SDK in a meaningful way could be a user pain point. Is this a temporary solution? Is it possible for the user to get the JSON library as part of the SDK installation from vcpkg, automatically? |
…ady just like we do with libcurl
2ae219e to
e7f11f7
Compare
Yes, If an end-user installs, for instance, Azure Storage Blobs SDK, vckpg will first get azure-storage-common, azure-core, libcurl, libxml2, nlohmann-json; compile them and use them tot then build Blobs. The general experience for vcpkg users is good, I think. The downside comes to users without vcpkg, (like, directly cloning the repo) where they need to figure it out how to get the dependencies (including now nlohmann json lib). |
|
Got it. I think it makes sense to prioritize the vcpkg acquisition experience as that will be our primary release vehicle similar to the other language SDKs. It is OK that there will be a couple extra steps for the "clone from GitHub" scenario.
Let's mitigate some of this by updating the docs before the next release and help customers grab the vcpkg easily as part of the upgrade. |
| # Storage requires 3.6.0 version for using `contains` feature | ||
| set(NLOHMANN_JSON_MIN_REQUIRED_VERSION 3.6.0) |
There was a problem hiding this comment.
nit: Consider removing the comment and updating to latest version.
| # Storage requires 3.6.0 version for using `contains` feature | |
| set(NLOHMANN_JSON_MIN_REQUIRED_VERSION 3.6.0) | |
| set(NLOHMANN_JSON_MIN_REQUIRED_VERSION 3.9.1) |
There was a problem hiding this comment.
making it 3.9.1 the MIN will force people to update vcpkg to get latest packages (and not sure if 3.9.1 is already published with vcpkg). I think we have to name the version that comes with the vcpkg version we have tagged right?
There was a problem hiding this comment.
I think we have to name the version that comes with the vcpkg version we have tagged right?
Yes! Good call.
https://github.com/microsoft/vcpkg/releases/tag/2020.11
There was a problem hiding this comment.
guess what! 3.9.1 is the one that comes with tag 2020.11, so yes, let's use that one.
There was a problem hiding this comment.
I agree, no need to request 3.9.1 as minimum vbersion if we're fine with 3.6.0.
There was a problem hiding this comment.
Unlike libcurl and other dependencies that come with the underlying OS like Ubuntu 16.04 (which we want to use the lowest version possible, for adoption), we should try to use the newest possible library we leverage as part of our implementation, so that we don't carry known bugs.
There was a problem hiding this comment.
Requiring a min version of 3.6 doesn't mean it is going to install 3.6. For example, if you run vcpkg install nhollman-json today, it is going to install 3.9.1. You need to have a vcpkg cloned and not updated since Mar 25 2019, in order to get exactly 3.6.0. I don't think it is the job of our repo to request the latest version, when we don't really need it, in order to not get bugs that are not in our code, that we are not affected by, and that we can't enumerate, as overall goodness, especially requesting the latest version - it can be an adoption blocker, if someone is using an earlier version and can't update to the latest for cheap.
There was a problem hiding this comment.
What would prevent someone to upgrade the json library to latest that we'd consider it an adoption blocker? Is the adoption blocker concern you mentioned a general one, or specific to this particular library?
How do you reconcile that with security or other bugs that might show up in the older versions of that library? This JSON library IS part of our SDK, since our protocol layers use it as an implementation detail.
There was a problem hiding this comment.
I am keeping the 3.6.0 as the MIN.
I consider this a more end-user friendly approach. Specially because we now know that any old application using literals like and will need to be fixed to work with 3.9.0.
So, at least we can have an option for old applications to still go and install 3.6.0 and then use our SDK without any issue.
antkmsft
left a comment
There was a problem hiding this comment.
Please also update readmes where we talk about vcpkg install, to also include nlohmann-json.
|
|
||
| # Storage requires 3.6.0 version for using `contains` feature | ||
| set(NLOHMANN_JSON_MIN_REQUIRED_VERSION 3.6.0) | ||
| # Try to find the config cmake file. Tipically for when the integration is made at CMake level |
There was a problem hiding this comment.
| # Try to find the config cmake file. Tipically for when the integration is made at CMake level | |
| # Try to find the config cmake file. Typically for when the integration is made at CMake level |
fixes: #1041
Make nlohmann a 3rd party required lib. Do not fetch it with CMake if it is not found