Skip to content

Commit 7919f42

Browse files
committed
chore: test with libquic disabled
1 parent d40f89f commit 7919f42

File tree

5 files changed

+26
-10
lines changed

5 files changed

+26
-10
lines changed

.github/workflows/test.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
os: [windows-2022, macos-13, ubuntu-20.04]
22+
os: [windows-2022, macos-13, ubuntu-22.04]
2323
env:
2424
SIGNAL_ENV: production
2525
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -44,12 +44,12 @@ jobs:
4444
uses: microsoft/[email protected]
4545
if: runner.os == 'Windows'
4646

47-
# - name: sed it
48-
# if: runner.os == 'Windows'
49-
# shell: bash
50-
# run: |
51-
# sed -i "s/target_compile_options(oxen-logging-warnings INTERFACE/#target_compile_options(oxen-logging-warnings INTERFACE/" libsession-util/external/oxen-libquic/external/oxen-logging/CMakeLists.txt
52-
# cat libsession-util/external/oxen-libquic/external/oxen-logging/CMakeLists.txt
47+
- name: sed it
48+
if: runner.os == 'Windows'
49+
shell: bash
50+
run: |
51+
sed -i "s/target_compile_options(oxen-logging-warnings INTERFACE/#target_compile_options(oxen-logging-warnings INTERFACE/" libsession-util/external/oxen-libquic/external/oxen-logging/CMakeLists.txt
52+
cat libsession-util/external/oxen-libquic/external/oxen-logging/CMakeLists.txt
5353
5454
- name: build libsession-util-nodejs
5555
shell: bash

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "libsession-util"]
22
path = libsession-util
3-
url = https://github.com/session-foundation/libsession-util.git
3+
url = https://github.com/mpretty-cyro/libsession-util.git

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ else()
1818
endif()
1919
message(STATUS "Number of processors detected: ${N}")
2020

21-
2221
add_definitions(-DNAPI_VERSION=8)
2322
set(CMAKE_CONFIGURATION_TYPES Release)
2423

@@ -31,6 +30,10 @@ SET(WITH_TESTS OFF)
3130
set(CMAKE_CXX_STANDARD 20)
3231
set(CMAKE_CXX_STANDARD_REQUIRED ON)
3332
set(CMAKE_CXX_EXTENSIONS OFF)
33+
set(ENABLE_ONIONREQ OFF)
34+
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
35+
set(OXENC_EXTRA_WARNINGS OFF)
36+
endif()
3437

3538
# when building from a release of libsession on desktop, it complains that ios-cmake is not up to date
3639
# as it is not part of the archive. We actually don't care about it on session-desktop

libsession-util

Submodule libsession-util updated 90 files

src/base_config.hpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <unordered_set>
1010

1111
#include "session/config/base.hpp"
12+
#include "session/logging.hpp"
1213
#include "session/types.hpp"
1314
#include "utilities.hpp"
1415

@@ -106,6 +107,18 @@ class ConfigBaseImpl {
106107

107108
Napi::Env env = info.Env();
108109

110+
session::add_logger([env, class_name](auto msg) {
111+
std::string toLog = "libsession-util:" + std::string(class_name) + ": " +
112+
std::string(msg) + "\n";
113+
114+
Napi::Function consoleLog = env.Global()
115+
.Get("console")
116+
.As<Napi::Object>()
117+
.Get("log")
118+
.As<Napi::Function>();
119+
consoleLog.Call({Napi::String::New(env, toLog)});
120+
});
121+
109122
return config;
110123
});
111124
}

0 commit comments

Comments
 (0)