Skip to content

Commit 1ba78bf

Browse files
authored
Upgrade fmt from 10.2.1 to 11.2.0 (#7243)
1 parent e83f361 commit 1ba78bf

File tree

188 files changed

+18524
-25377
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

188 files changed

+18524
-25377
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Unreleased
22
- Changes from 6.0.0
33
- Misc:
4+
- CHANGED: Update fmt library to version 11.2.0 [#7238](https://github.com/Project-OSRM/osrm-backend/issues/7238)
45
- CHANGED: Upgrade protozero from v1.7.1 to v1.8.1 [#7239](https://github.com/Project-OSRM/osrm-backend/pull/7239)
5-
- CHANGED: Replace std::is_trivial with std::is_trivially_default_constructible && std::is_trivially_copyable [#7245](https://github.com/Project-OSRM/osrm-backend/issues/7245)
6+
- CHANGED: Replace `std::is_trivial` with `std::is_trivially_default_constructible && std::is_trivially_copyable` [#7245](https://github.com/Project-OSRM/osrm-backend/issues/7245)
67
- ADDED: Add husky pre-commit hook for compiling and linting staged JS files [#7228](https://github.com/Project-OSRM/osrm-backend/issues/7228)
78
- CHANGED: Standardize linting configuration with ESM-specific rules [#7229](https://github.com/Project-OSRM/osrm-backend/issues/7229)
89
- CHANGED: Convert scripts from CommonJS to modern ESM format [#7230](https://github.com/Project-OSRM/osrm-backend/pull/7230)

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
268268
# using Visual Studio C++
269269
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") # avoid compiler error C1128 from scripting_environment_lua.cpp
270270
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DWIN32_LEAN_AND_MEAN") # avoid compiler error C2011 from dual #include of winsock.h and winsock2.h
271+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /utf-8") # support Unicode in fmt library
271272
add_dependency_defines(-DBOOST_LIB_DIAGNOSTIC)
272273
add_dependency_defines(-D_CRT_SECURE_NO_WARNINGS)
273274
add_dependency_defines(-DNOMINMAX) # avoid min and max macros that can break compilation

scripts/update_dependencies.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ VTZERO_PATH="mapbox/vtzero"
2828
VTZERO_TAG=v1.1.0
2929

3030
FMT_PATH="fmtlib/fmt"
31-
FMT_TAG=v10.2.1
31+
FMT_TAG=11.2.0
3232

3333
FLATBUFFERS_PATH="google/flatbuffers"
3434
FLATBUFFERS_TAG=v24.3.25

third_party/fmt/.clang-format

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,10 @@ IndentPPDirectives: AfterHash
66
IndentCaseLabels: false
77
AlwaysBreakTemplateDeclarations: false
88
DerivePointerAlignment: false
9+
AllowShortCaseLabelsOnASingleLine: true
10+
QualifierAlignment: Left
11+
AlignConsecutiveShortCaseStatements:
12+
Enabled: true
13+
AcrossEmptyLines: true
14+
AcrossComments: true
15+
AlignCaseColons: false
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
version: 2
22
updates:
3-
- package-ecosystem: "github-actions" # Necessary to update action hashs
3+
- package-ecosystem: "github-actions" # Necessary to update action hashes.
44
directory: "/"
55
schedule:
66
interval: "monthly"
7-
# Allow up to 3 opened pull requests for github-actions versions
7+
# Allow up to 3 opened pull requests for github-actions versions.
88
open-pull-requests-limit: 3

third_party/fmt/.github/workflows/cifuzz.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,24 @@ jobs:
88
Fuzzing:
99
runs-on: ubuntu-latest
1010
steps:
11-
- name: Build Fuzzers
11+
- name: Build fuzzers
1212
id: build
13-
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@061583ebb5a96653e42feb3a97ee513eedc18078 # master
13+
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@92182553173581f871130c71c71b17f003d47b0a
1414
with:
1515
oss-fuzz-project-name: 'fmt'
1616
dry-run: false
1717
language: c++
18-
- name: Run Fuzzers
19-
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@061583ebb5a96653e42feb3a97ee513eedc18078 # master
18+
19+
- name: Run fuzzers
20+
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@92182553173581f871130c71c71b17f003d47b0a
2021
with:
2122
oss-fuzz-project-name: 'fmt'
2223
fuzz-seconds: 300
2324
dry-run: false
2425
language: c++
25-
- name: Upload Crash
26-
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
26+
27+
- name: Upload crash
28+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
2729
if: failure() && steps.build.outcome == 'success'
2830
with:
2931
name: artifacts

third_party/fmt/.github/workflows/doc.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,36 @@ permissions:
77

88
jobs:
99
build:
10-
# Use Ubuntu 20.04 because doxygen 1.8.13 from Ubuntu 18.04 is broken.
11-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-22.04
1211

1312
steps:
14-
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
13+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
1514

16-
- name: Add ubuntu mirrors
15+
- name: Add Ubuntu mirrors
1716
run: |
1817
# Github Actions caching proxy is at times unreliable
1918
# see https://github.com/actions/runner-images/issues/7048
2019
printf 'http://azure.archive.ubuntu.com/ubuntu\tpriority:1\n' | sudo tee /etc/apt/mirrors.txt
2120
curl http://mirrors.ubuntu.com/mirrors.txt | sudo tee --append /etc/apt/mirrors.txt
2221
sudo sed -i 's~http://azure.archive.ubuntu.com/ubuntu/~mirror+file:/etc/apt/mirrors.txt~' /etc/apt/sources.list
2322
24-
- name: Create Build Environment
23+
- name: Create build environment
2524
run: |
2625
sudo apt update
27-
sudo apt install doxygen python3-virtualenv
28-
sudo npm install -g less clean-css
26+
sudo apt install doxygen
27+
pip install mkdocs-material==9.5.25 mkdocstrings==0.26.1 mike==2.1.1
2928
cmake -E make_directory ${{runner.workspace}}/build
29+
# Workaround https://github.com/actions/checkout/issues/13:
30+
git config --global user.name "$(git --no-pager log --format=format:'%an' -n 1)"
31+
git config --global user.email "$(git --no-pager log --format=format:'%ae' -n 1)"
3032
3133
- name: Build
3234
working-directory: ${{runner.workspace}}/build
35+
run: $GITHUB_WORKSPACE/support/mkdocs deploy dev
36+
37+
- name: Deploy
3338
env:
34-
KEY: ${{secrets.KEY}}
35-
run: $GITHUB_WORKSPACE/support/build-docs.py
39+
KEY: "${{secrets.KEY}}"
40+
if: env.KEY != '' && github.ref == 'refs/heads/master'
41+
working-directory: ${{runner.workspace}}/fmt/build/fmt.dev
42+
run: git push https://$KEY@github.com/fmtlib/fmt.dev.git

third_party/fmt/.github/workflows/lint.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,16 @@ jobs:
1313
format_code:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
1717

1818
- name: Install clang-format
19-
uses: aminya/setup-cpp@v1
20-
with:
21-
clangformat: 17.0.5
19+
run: |
20+
wget https://apt.llvm.org/llvm.sh
21+
sudo bash ./llvm.sh 17
22+
sudo apt install clang-format-17
2223
2324
- name: Run clang-format
2425
run: |
25-
find include src -name '*.h' -o -name '*.cc' | xargs clang-format -i -style=file -fallback-style=none
26+
find include src -name '*.h' -o -name '*.cc' | \
27+
xargs clang-format-17 -i -style=file -fallback-style=none
2628
git diff --exit-code

third_party/fmt/.github/workflows/linux.yml

Lines changed: 110 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -7,80 +7,143 @@ permissions:
77

88
jobs:
99
build:
10-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-22.04
1111
strategy:
1212
matrix:
13-
cxx: [g++-4.8, g++-10, clang++-9]
13+
cxx: [g++-4.9, g++-11, clang++-3.6, clang++-11]
1414
build_type: [Debug, Release]
1515
std: [11]
16+
shared: [""]
1617
include:
17-
- cxx: g++-4.8
18-
install: sudo apt install g++-4.8
19-
- cxx: g++-8
18+
- cxx: g++-4.9
19+
- cxx: clang++-3.6
20+
- cxx: g++-11
2021
build_type: Debug
2122
std: 14
22-
install: sudo apt install g++-8
23-
- cxx: g++-8
24-
build_type: Debug
25-
std: 17
26-
install: sudo apt install g++-8
27-
- cxx: g++-9
28-
build_type: Debug
29-
std: 17
30-
- cxx: g++-10
23+
install: sudo apt install g++-11
24+
- cxx: g++-11
3125
build_type: Debug
3226
std: 17
3327
- cxx: g++-11
3428
build_type: Debug
3529
std: 20
3630
install: sudo apt install g++-11
37-
- cxx: clang++-8
31+
- cxx: g++-13
32+
build_type: Release
33+
std: 23
34+
install: sudo apt install g++-13
35+
shared: -DBUILD_SHARED_LIBS=ON
36+
- cxx: clang++-11
3837
build_type: Debug
3938
std: 17
4039
cxxflags: -stdlib=libc++
41-
install: sudo apt install clang-8 libc++-8-dev libc++abi-8-dev
42-
- cxx: clang++-9
43-
install: sudo apt install clang-9
44-
- cxx: clang++-9
40+
install: sudo apt install clang-11 libc++-11-dev libc++abi-11-dev
41+
- cxx: clang++-11
42+
install: sudo apt install clang-11
43+
- cxx: clang++-11
4544
build_type: Debug
4645
fuzz: -DFMT_FUZZ=ON -DFMT_FUZZ_LINKMAIN=ON
4746
std: 17
48-
install: sudo apt install clang-9
49-
- cxx: clang++-11
47+
install: sudo apt install clang-11
48+
- cxx: clang++-14
5049
build_type: Debug
5150
std: 20
52-
- cxx: clang++-11
51+
- cxx: clang++-14
5352
build_type: Debug
5453
std: 20
5554
cxxflags: -stdlib=libc++
56-
install: sudo apt install libc++-11-dev libc++abi-11-dev
57-
- shared: -DBUILD_SHARED_LIBS=ON
55+
install: sudo apt install libc++-14-dev libc++abi-14-dev
5856

5957
steps:
60-
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
58+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
6159

6260
- name: Set timezone
63-
run: sudo timedatectl set-timezone 'Asia/Yekaterinburg'
61+
run: sudo timedatectl set-timezone 'Europe/Kyiv'
62+
63+
- name: Install GCC 4.9
64+
run: |
65+
sudo apt update
66+
sudo apt install libatomic1 libc6-dev libgomp1 libitm1 libmpc3
67+
# https://launchpad.net/ubuntu/xenial/amd64/g++-4.9/4.9.3-13ubuntu2
68+
wget --no-verbose \
69+
http://launchpadlibrarian.net/230069137/libmpfr4_3.1.3-2_amd64.deb \
70+
http://launchpadlibrarian.net/253728424/libasan1_4.9.3-13ubuntu2_amd64.deb \
71+
http://launchpadlibrarian.net/445346135/libubsan0_5.4.0-6ubuntu1~16.04.12_amd64.deb \
72+
http://launchpadlibrarian.net/445346112/libcilkrts5_5.4.0-6ubuntu1~16.04.12_amd64.deb \
73+
http://launchpadlibrarian.net/253728426/libgcc-4.9-dev_4.9.3-13ubuntu2_amd64.deb \
74+
http://launchpadlibrarian.net/253728432/libstdc++-4.9-dev_4.9.3-13ubuntu2_amd64.deb \
75+
http://launchpadlibrarian.net/253728314/gcc-4.9-base_4.9.3-13ubuntu2_amd64.deb \
76+
http://launchpadlibrarian.net/445345919/gcc-5-base_5.4.0-6ubuntu1~16.04.12_amd64.deb \
77+
http://launchpadlibrarian.net/253728399/cpp-4.9_4.9.3-13ubuntu2_amd64.deb \
78+
http://launchpadlibrarian.net/253728404/gcc-4.9_4.9.3-13ubuntu2_amd64.deb \
79+
http://launchpadlibrarian.net/253728401/g++-4.9_4.9.3-13ubuntu2_amd64.deb
80+
sudo dpkg -i \
81+
libmpfr4_3.1.3-2_amd64.deb \
82+
libasan1_4.9.3-13ubuntu2_amd64.deb \
83+
libubsan0_5.4.0-6ubuntu1~16.04.12_amd64.deb \
84+
libcilkrts5_5.4.0-6ubuntu1~16.04.12_amd64.deb \
85+
libgcc-4.9-dev_4.9.3-13ubuntu2_amd64.deb \
86+
libstdc++-4.9-dev_4.9.3-13ubuntu2_amd64.deb \
87+
gcc-4.9-base_4.9.3-13ubuntu2_amd64.deb \
88+
gcc-5-base_5.4.0-6ubuntu1~16.04.12_amd64.deb \
89+
cpp-4.9_4.9.3-13ubuntu2_amd64.deb \
90+
gcc-4.9_4.9.3-13ubuntu2_amd64.deb \
91+
g++-4.9_4.9.3-13ubuntu2_amd64.deb
92+
if: ${{ matrix.cxx == 'g++-4.9' }}
93+
94+
- name: Install Clang 3.6
95+
run: |
96+
sudo apt update
97+
sudo apt install libtinfo5
98+
# https://code.launchpad.net/ubuntu/xenial/amd64/clang-3.6/1:3.6.2-3ubuntu2
99+
wget --no-verbose \
100+
http://launchpadlibrarian.net/230019046/libffi6_3.2.1-4_amd64.deb \
101+
http://launchpadlibrarian.net/445346109/libasan2_5.4.0-6ubuntu1~16.04.12_amd64.deb \
102+
http://launchpadlibrarian.net/445346135/libubsan0_5.4.0-6ubuntu1~16.04.12_amd64.deb \
103+
http://launchpadlibrarian.net/445346112/libcilkrts5_5.4.0-6ubuntu1~16.04.12_amd64.deb \
104+
http://launchpadlibrarian.net/445346128/libmpx0_5.4.0-6ubuntu1~16.04.12_amd64.deb \
105+
http://launchpadlibrarian.net/445346113/libgcc-5-dev_5.4.0-6ubuntu1~16.04.12_amd64.deb \
106+
http://launchpadlibrarian.net/445346131/libstdc++-5-dev_5.4.0-6ubuntu1~16.04.12_amd64.deb \
107+
http://launchpadlibrarian.net/445346022/libobjc-5-dev_5.4.0-6ubuntu1~16.04.12_amd64.deb \
108+
http://launchpadlibrarian.net/254405108/libllvm3.6v5_3.6.2-3ubuntu2_amd64.deb \
109+
http://launchpadlibrarian.net/254405097/libclang-common-3.6-dev_3.6.2-3ubuntu2_amd64.deb \
110+
http://launchpadlibrarian.net/254405101/libclang1-3.6_3.6.2-3ubuntu2_amd64.deb \
111+
http://launchpadlibrarian.net/445345919/gcc-5-base_5.4.0-6ubuntu1~16.04.12_amd64.deb \
112+
http://launchpadlibrarian.net/254405091/clang-3.6_3.6.2-3ubuntu2_amd64.deb
113+
sudo dpkg -i \
114+
libffi6_3.2.1-4_amd64.deb \
115+
libasan2_5.4.0-6ubuntu1~16.04.12_amd64.deb \
116+
libubsan0_5.4.0-6ubuntu1~16.04.12_amd64.deb \
117+
libcilkrts5_5.4.0-6ubuntu1~16.04.12_amd64.deb \
118+
libmpx0_5.4.0-6ubuntu1~16.04.12_amd64.deb \
119+
libgcc-5-dev_5.4.0-6ubuntu1~16.04.12_amd64.deb \
120+
libstdc++-5-dev_5.4.0-6ubuntu1~16.04.12_amd64.deb \
121+
libobjc-5-dev_5.4.0-6ubuntu1~16.04.12_amd64.deb \
122+
libllvm3.6v5_3.6.2-3ubuntu2_amd64.deb \
123+
libclang-common-3.6-dev_3.6.2-3ubuntu2_amd64.deb \
124+
libclang1-3.6_3.6.2-3ubuntu2_amd64.deb \
125+
gcc-5-base_5.4.0-6ubuntu1~16.04.12_amd64.deb \
126+
clang-3.6_3.6.2-3ubuntu2_amd64.deb
127+
if: ${{ matrix.cxx == 'clang++-3.6' }}
64128

65-
- name: Add repositories for older GCC
129+
- name: Add repositories for newer GCC
66130
run: |
67-
# Below two repos provide GCC 4.8, 5.5 and 6.4
68-
sudo apt-add-repository 'deb http://azure.archive.ubuntu.com/ubuntu/ bionic main'
69-
sudo apt-add-repository 'deb http://azure.archive.ubuntu.com/ubuntu/ bionic universe'
70-
# Below two repos additionally update GCC 6 to 6.5
71-
# sudo apt-add-repository 'deb http://azure.archive.ubuntu.com/ubuntu/ bionic-updates main'
72-
# sudo apt-add-repository 'deb http://azure.archive.ubuntu.com/ubuntu/ bionic-updates universe'
73-
if: ${{ matrix.cxx == 'g++-4.8' }}
131+
sudo apt-add-repository ppa:ubuntu-toolchain-r/test
132+
if: ${{ matrix.cxx == 'g++-13' }}
74133

75-
- name: Add ubuntu mirrors
134+
- name: Add Ubuntu mirrors
76135
run: |
77-
# Github Actions caching proxy is at times unreliable
78-
# see https://github.com/actions/runner-images/issues/7048
79-
printf 'http://azure.archive.ubuntu.com/ubuntu\tpriority:1\n' | sudo tee /etc/apt/mirrors.txt
80-
curl http://mirrors.ubuntu.com/mirrors.txt | sudo tee --append /etc/apt/mirrors.txt
81-
sudo sed -i 's~http://azure.archive.ubuntu.com/ubuntu/~mirror+file:/etc/apt/mirrors.txt~' /etc/apt/sources.list
136+
# GitHub Actions caching proxy is at times unreliable
137+
# see https://github.com/actions/runner-images/issues/7048.
138+
mirrors=/etc/apt/mirrors.txt
139+
printf 'http://azure.archive.ubuntu.com/ubuntu\tpriority:1\n' | \
140+
sudo tee $mirrors
141+
curl http://mirrors.ubuntu.com/mirrors.txt | sudo tee --append $mirrors
142+
sudo sed -i \
143+
"s~http://azure.archive.ubuntu.com/ubuntu/~mirror+file:$mirrors~" \
144+
/etc/apt/sources.list
82145
83-
- name: Create Build Environment
146+
- name: Create build environment
84147
run: |
85148
sudo apt update
86149
${{matrix.install}}
@@ -93,10 +156,12 @@ jobs:
93156
CXX: ${{matrix.cxx}}
94157
CXXFLAGS: ${{matrix.cxxflags}}
95158
run: |
96-
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} ${{matrix.fuzz}} ${{matrix.shared}} \
97-
-DCMAKE_CXX_STANDARD=${{matrix.std}} -DFMT_DOC=OFF \
98-
-DCMAKE_CXX_VISIBILITY_PRESET=hidden -DCMAKE_VISIBILITY_INLINES_HIDDEN=ON \
99-
-DFMT_PEDANTIC=ON -DFMT_WERROR=ON $GITHUB_WORKSPACE
159+
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
160+
-DCMAKE_CXX_STANDARD=${{matrix.std}} \
161+
-DCMAKE_CXX_VISIBILITY_PRESET=hidden \
162+
-DCMAKE_VISIBILITY_INLINES_HIDDEN=ON \
163+
-DFMT_DOC=OFF -DFMT_PEDANTIC=ON -DFMT_WERROR=ON \
164+
${{matrix.fuzz}} ${{matrix.shared}} $GITHUB_WORKSPACE
100165
101166
- name: Build
102167
working-directory: ${{runner.workspace}}/build

third_party/fmt/.github/workflows/macos.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,26 @@ jobs:
99
build:
1010
strategy:
1111
matrix:
12-
os: [macos-11, macos-13]
12+
os: [macos-13, macos-14]
1313
build_type: [Debug, Release]
1414
std: [11, 17, 20]
15+
shared: [""]
1516
exclude:
16-
- { os: macos-11, std: 20 }
1717
- { os: macos-13, std: 11 }
1818
- { os: macos-13, std: 17 }
1919
include:
20-
- shared: -DBUILD_SHARED_LIBS=ON
20+
- os: macos-14
21+
std: 23
22+
build_type: Release
23+
shared: -DBUILD_SHARED_LIBS=ON
2124

2225
runs-on: '${{ matrix.os }}'
2326

2427
steps:
25-
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
28+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
2629

2730
- name: Set timezone
28-
run: sudo systemsetup -settimezone 'Asia/Yekaterinburg'
31+
run: sudo systemsetup -settimezone 'Europe/Minsk'
2932

3033
- name: Select Xcode 14.3 (macOS 13)
3134
run: sudo xcode-select -s "/Applications/Xcode_14.3.app"

0 commit comments

Comments
 (0)