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

[FMT] Fix warnings about deprecated use of fmt::format_to() #35377

Merged
merged 1 commit into from
Sep 24, 2021

Conversation

smuzaffar
Copy link
Contributor

This should fix the compiler warnings about the deprecated use of fmt::format_to [a] .

@makortel , although this fixes the warning but according to fmtlib/fmt#2420 it causes 5% performance losses. So better to check if this deprecated fmt api should be used or not. Currently it is only used in one unit test.

[a]

  FWCore/MessageService/test/fmt_test.cppunit.cpp:59:26: warning: 'fmt::v8::appender fmt::v8::format_to(fmt::v8::basic_memory_buffer<char, SIZE, Allocator>&, fmt::v8::format_string<T ...>, T&& ...) [with T = {int}; long unsigned int SIZE = 500; Allocator = std::allocator<char>; fmt::v8::format_string<T ...> = fmt::v8::basic_format_string<char, int>]' is deprecated [-Wdeprecated-declarations]
    59 |   format_to(buf, "{}", 42);  // replaces itoa(42, buffer, 10)

@cmsbuild cmsbuild added this to the CMSSW_12_1_X milestone Sep 23, 2021
@smuzaffar smuzaffar changed the title [FMT] Remove deprecated use of fmt::format_to [FMT] Fix warnings about deprecated use of fmt::format_to() Sep 23, 2021
@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-35377/25466

  • This PR adds an extra 16KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @smuzaffar (Malik Shahzad Muzaffar) for master.

It involves the following packages:

  • FWCore/MessageService (core)

@makortel, @smuzaffar, @cmsbuild, @Dr15Jones can you please review it and eventually sign? Thanks.
@makortel, @wddgit this is something you requested to watch as well.
@perrotta, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@smuzaffar
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-58ed34/18854/summary.html
COMMIT: 72c1e53
CMSSW: CMSSW_12_1_X_2021-09-22-2300/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/35377/18854/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 40
  • DQMHistoTests: Total histograms compared: 3211080
  • DQMHistoTests: Total failures: 0
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3211058
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 39 files compared)
  • Checked 169 log files, 37 edm output root files, 40 DQM output files
  • TriggerResults: no differences found

@makortel
Copy link
Contributor

If the deprecated function is used only in tests, I think this is fine. Even if used in production I'd argue we have other problems if 5 % increase in string formatting would be a problem :)

@smuzaffar
Copy link
Contributor Author

+core

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @perrotta, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2)

@perrotta
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 0bf749a into cms-sw:master Sep 24, 2021
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.

4 participants