8000
Skip to content

[fmt] fix format conflict#25137

Merged
vicroms merged 3 commits intomicrosoft:masterfrom
Adela0814:Dev/Mengna/fmt
Jul 5, 2022
Merged

[fmt] fix format conflict#25137
vicroms merged 3 commits intomicrosoft:masterfrom
Adela0814:Dev/Mengna/fmt

Conversation

@Adela0814
Copy link
Copy Markdown
Contributor
@Adela0814 Adela0814 commented Jun 8, 2022

Fix #25109

Added patch fix-format-conflict.patch(fmtlib/fmt#2896), use qualified format_to call to avoid ADL conflict with std::format_to.

No feature needs to test.

@Adela0814 Adela0814 added category:port-bug The issue is with a library, which is something the port should already support info:internal labels Jun 8, 2022
@Adela0814 Adela0814 mentioned this pull request Jun 8, 2022
@Osyotr
Copy link
Copy Markdown
Contributor
Osyotr commented Jun 8, 2022

This looks wrong. The patch only modifies docs (doc/api.rst).

@Adela0814
Copy link
Copy Markdown
Contributor Author

Waiting for user verification.

@Adela0814
Copy link
Copy Markdown
Contributor Author

This looks wrong. The patch only modifies docs (doc/api.rst).

This change comes from upstream, format_to conflict with std::format_to, so add a namespace to avoid this.

@Neumann-A
Copy link
Copy Markdown
Contributor

@Adela0814:

I think you have the wrong patch. vcpkg shouldn't install docs so there is no reason to patch docs.

This change comes from upstream, format_to conflict with std::format_to, so add a namespace to avoid this.

I know about that and encountered that in HPX. *.rst files are not source files so your current change does not lead to a different output library. Basically FMT_DOC should be set to false/off in the portfile which it is

-DFMT_DOC=OFF

which thus deactivates the subfolder doc/ completely
https://github.com/fmtlib/fmt/blob/b135f1c01449f6f41be3933437797e768b54295a/CMakeLists.txt#L353-L355

So your change here doesn't do anything to the output of vcpkg.

@Neumann-A
Copy link
Copy Markdown
Contributor

You want to patch include/fmt/format-inl.h(78)

@Adela0814
Copy link
Copy Markdown
Contributor Author

@Adela0814:

I think you have the wrong patch. vcpkg shouldn't install docs so there is no reason to patch docs.

This change comes from upstream, format_to conflict with std::format_to, so add a namespace to avoid this.

I know about that and encountered that in HPX. *.rst files are not source files so your current change does not lead to a different output library. Basically FMT_DOC should be set to false/off in the portfile which it is

-DFMT_DOC=OFF

which thus deactivates the subfolder doc/ completely
https://github.com/fmtlib/fmt/blob/b135f1c01449f6f41be3933437797e768b54295a/CMakeLists.txt#L353-L355
So your change here doesn't do anything to the output of vcpkg.

Thanks for your comment, I will update this PR.

@Adela0814 Adela0814 marked this pull request as ready for review June 13, 2022 07:54
@JonLiu1993
Copy link
Copy Markdown
Contributor

@frits-greuter, Could you try if this PR solves your problem?

@JonLiu1993 JonLiu1993 added the info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this. label Jun 24, 2022
- format_to(it, FMT_STRING("{}{}"), ERROR_STR, error_code);
+ fmt::format_to(it, FMT_STRING("{}{}"), message, SEP);
+ fmt::format_to(it, FMT_STRING("{}{}"), ERROR_STR, error_code);
FMT_ASSERT(out.size() <= inline_buffer_size, "");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you link to the upstream fix?

@dan-shaw dan-shaw added requires:author-response and removed info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this. labels Jun 27, 2022
FMT_ASSERT(out.size() <= inline_buffer_size, "");
}

diff --git a/src/os.cc b/src/os.cc
Copy link
Copy Markdown
Contributor Author
@Adela0814 Adela0814 Jun 28, 2022

Choose a reason for hiding this comment

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

@JonLiu1993 JonLiu1993 added info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this. and removed requires:author-response labels Jun 28, 2022
@dan-shaw dan-shaw added the depends:different-pr This PR or Issue depends on a PR which has been filed label Jun 28, 2022
@vicroms vicroms merged commit 5dd5017 into microsoft:master Jul 5, 2022
@Adela0814 Adela0814 deleted the Dev/Mengna/fmt branch January 16, 2023 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:port-bug The issue is with a library, which is something the port should already support depends:different-pr This PR or Issue depends on a PR which has been filed info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[fmt] Build error

7 participants

0