Conversation
|
Dear @BillyONeal, |
| if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) | ||
| vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/fmt/base.h" | ||
| "defined(FMT_SHARED)" | ||
| "1" | ||
| ) | ||
| endif() | ||
|
|
There was a problem hiding this comment.
So this the one controversial change left for the maintainers have to decide. Points raised in previous discussion:
- Removing these lines is not necessary for the update.
- Removing these lines ispotentially/likely breaking msbuild users (convenience).
- These lines are an unofficial hack.
- These line break sourcelink.
The source link issue could probably be resolved.
There was a problem hiding this comment.
I don't view it as an unofficial hack: This setting must match what it was built with so installing it that way removes a potential footgun
There was a problem hiding this comment.
I removed this code based on the following:
- The removed code was actually a patch of the source. It was added for {fmt} version 3.0.1 in this commit. At the time, the issue hadn’t yet been resolved in the upstream library.
- The issue was later resolved in the library itself in version 5.0.0 via CMake.
- When the port was updated, the patch remained and hadn’t been removed until now.
- I’ve now removed the outdated patch.
I followed the guide:
Don't add patches if the port is outdated and updating the port to a newer released version would solve the same issue. vcpkg prefers updating ports over patching outdated versions.
@BillyONeal With all due respect, could you please provide more compelling reasons why I should deviate from the guide? Could you provide an actual description of the problem this patch fixes?
If the problem does exist, it is best to report it directly to the library bug tracker.
| if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) | ||
| vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/fmt/base.h" | ||
| "defined(FMT_SHARED)" | ||
| "1" | ||
| ) | ||
| endif() | ||
|
|
There was a problem hiding this comment.
Please restore the fix for MSBuild users.
There was a problem hiding this comment.
Can you share an example of usage in MSBuild and how this patch will help MSBuild users?
|
Can we please get some traction on this PR ? It seems the hold-up is removal of post-installation header patch for FMT_SHARED
Is there a reason we want 1. to take precedence. Can we please take a final call as to why we'd like (1) to take precedence here and move on with this change ? I'm sure a lot of folks are eagerly awaiting the fmt updates. |
|
It is easy to patch the header on the condition of |
|
Not sure how conditioning the patch on (Sorry for injecting my opinions below but just trying to get a discussion going to reach a conclusion sooner)
The change can probably be considered a regression, but I think it could be argued that users of MSBuild shouldn't rely on header patches coming from dependency/package managers like vcpkg anyway. @BillyONeal mentioned on the other (obsolete) PR the following
Which sounds like a fair policy So it seems the question really is if pdb-load issues and fmt-debugger-step-in issues meets the bar of "something broken" |
|
@yurybara
I tried to prepare a hello world example for you but it turns out I can't actually do that for Windows. The effect of Where it will actually break is non-Windows, non-CMake, dynamic customers, which is admittedly a small set as all the non-Windows triplets default to building static. Embedding settings customers can't change after the fact into the installed contents is common in vcpkg's registry, and we view it as an improvement over any scheme that relies on build system bindings like CMake configs, as embedded settings don't require downstream customers choose a matching build system to work. Here are some examples:
It makes no difference whether the setting is published in these projects' CMake bindings, if any, because non-CMake customers exist.
I think I see the confusion now. Before 5.x, fmt didn't correctly publish this setting in its CMake bindings, so embedding the value of the setting helped everyone. fmt 5.x now publishes this setting in its CMake bindings, so if you're a CMake customer, this looks like a patch that is no longer necessary. When the vcpkg team overall reviewed this before, we did not understand that fmt didn't publish the setting in CMake bindings before 3.x. We viewed this entirely as 'elevating the experience of non-CMake customers to that of CMake customers', and thus saw it as something we should keep. (I'm using past tense here because the vcpkg maintainers together haven't discussed this issue with the understanding 'it still happens to work')
We explicitly disagree. We don't have a maintainer guide entry requiring all settings to be embedded like this because it's a lot closer to 'nice to have' and we don't have great ways to verify it. We do care about non-CMake customers.
In most cases it won't actually do that, because the change is only in an installed header, and downstream customers are doing their builds with that installed header, so things match. It could happen if you debug into fmt.dll, and are looking at the version of the header as it existed in vcpkg's |
|
@BillyONeal Thank you for the detailed analysis. While reviewing the provided examples, I’d like to point out that in the case of Many libraries support installing additional configuration files alongside the sources (e.g. I’m not very familiar with MSBuild, but if VCPKG intends to support MSBuild directly, perhaps it would make sense to generate a From an optimization standpoint, it would be more convenient for users to have a unified To summarize the above, I believe that the presence of such patches does not correctly and completely solve the problem of connecting third-party libraries to MSBuild projects. Such patches do more harm than good. |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Looks like a baseline issue on arm64-osx, I'm investigating.... |
|
@vicroms and I discussed today. We still would prefer leaving the imbuing in but given that MSBuild customers are no longer broken it's no longer an over our dead body issue and we're happy to make the contributor(s) happier by just merging this as is. I'm going to merge through the clear vtk baseline issue. |
As per request in #45295, only
fmtshould be updated, dependent portwpilibshould be disabled untileigenis released../vcpkg x-add-version --alland committing the result.Fixes #42927
Fixes #43548
Fixes #44042
Fixes #45357