Skip to content

Commit 2cf23e1

Browse files
committed
Bump fmtlib to 9.1.0
In our downstream project, we have two dependencies: solidity and spdlog. Both of them depend on fmtlib. Unfortunately, the versions of fmtlib they use do not match, which leads to compilation failure. The issue arises because spdlog attempts to use solidity's fmtlib, but the specific version (v8.0.1) has a bug. Ref: gabime/spdlog#2142 While we could keep this change in our own fork, we believe it would be worthwhile to contribute it back to the upstream since spdlog is a very popular logging library. Signed-off-by: Jun Zhang <[email protected]>
1 parent 925bfeb commit 2cf23e1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cmake/fmtlib.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ FetchContent_Declare(
44
fmtlib
55
PREFIX "${PROJECT_BINARY_DIR}/deps"
66
DOWNLOAD_DIR "${PROJECT_SOURCE_DIR}/deps/downloads"
7-
DOWNLOAD_NAME fmt-8.0.1.tar.gz
8-
URL https://github.com/fmtlib/fmt/archive/8.0.1.tar.gz
9-
URL_HASH SHA256=b06ca3130158c625848f3fb7418f235155a4d389b2abc3a6245fb01cb0eb1e01
7+
DOWNLOAD_NAME fmt-9.1.0.tar.gz
8+
URL https://github.com/fmtlib/fmt/archive/9.1.0.tar.gz
9+
URL_HASH SHA256=5dea48d1fcddc3ec571ce2058e13910a0d4a6bab4cc09a809d8b1dd1c88ae6f2
1010
)
1111

1212
if (CMAKE_VERSION VERSION_LESS "3.14.0")

libsolidity/lsp/SemanticTokensBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ void SemanticTokensBuilder::encode(
118118
auto const [line, startChar] = m_charStream->translatePositionToLineColumn(_sourceLocation.start);
119119
auto const length = _sourceLocation.end - _sourceLocation.start;
120120

121-
lspDebug(fmt::format("encode [{}:{}..{}] {}", line, startChar, length, _tokenType));
121+
lspDebug(fmt::format("encode [{}:{}..{}] {}", line, startChar, length, static_cast<int>(_tokenType)));
122122

123123
m_encodedTokens.append(line - m_lastLine);
124124
if (line == m_lastLine)

0 commit comments

Comments
 (0)