Skip to content

Commit 4c3e942

Browse files
committed
Serialization for error info objects to Boost JSON and nlohmann/json
1 parent ff24294 commit 4c3e942

17 files changed

Lines changed: 1448 additions & 87 deletions

.github/workflows/ci.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,10 @@ jobs:
238238
cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
239239
git submodule update --init tools/boostdep
240240
python3 tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY
241+
cd libs/throw_exception
242+
git fetch origin feature/serialization
243+
git checkout feature/serialization
244+
cd ../..
241245
./bootstrap.sh
242246
./b2 -d0 headers
243247
@@ -246,6 +250,11 @@ jobs:
246250
run: |
247251
echo "using ${{matrix.toolset}} : : ${{matrix.compiler}} ;" > ~/user-config.jam
248252
253+
- name: Download nlohmann/json
254+
run: |
255+
cd ../boost-root/libs/$LIBRARY
256+
python3 scripts/download_nlohmann_json.py
257+
249258
- name: Run tests
250259
run: |
251260
cd ../boost-root
@@ -293,9 +302,19 @@ jobs:
293302
xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\
294303
git submodule update --init tools/boostdep
295304
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY%
305+
cd libs\throw_exception
306+
git fetch origin feature/serialization
307+
git checkout feature/serialization
308+
cd ..\..
296309
cmd /c bootstrap
297310
b2 -d0 headers
298311
312+
- name: Download nlohmann/json
313+
shell: cmd
314+
run: |
315+
cd ../boost-root/libs/%LIBRARY%
316+
python3 scripts/download_nlohmann_json.py
317+
299318
- name: Run tests
300319
shell: cmd
301320
run: |

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
/.vscode/settings.json
33
.DS_Store
44
doc/html/index.html
5+
/test/nlohmann/

.vscode/tasks.json

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "Download nlohmann/json.hpp",
6+
"type": "shell",
7+
"command": "python scripts/download_nlohmann_json.py",
8+
"options": {
9+
"cwd": "${workspaceFolder}"
10+
},
11+
"problemMatcher": []
12+
},
13+
{
14+
"label": "b2: Run all tests (default)",
15+
"type": "shell",
16+
"dependsOn": ["Download nlohmann/json.hpp"],
17+
"command": "../../b2 test",
18+
"options": {
19+
"cwd": "${workspaceFolder}"
20+
},
21+
"group": "test",
22+
"problemMatcher": {
23+
"base": "$gcc",
24+
"fileLocation": ["relative", "${workspaceFolder}"]
25+
},
26+
"windows": {
27+
"command": "..\\..\\b2 test",
28+
"problemMatcher": {
29+
"base": "$msCompile",
30+
"fileLocation": ["relative", "${workspaceFolder}"]
31+
}
32+
}
33+
},
34+
{
35+
"label": "b2: Run all tests (release)",
36+
"type": "shell",
37+
"dependsOn": ["Download nlohmann/json.hpp"],
38+
"command": "../../b2 test variant=release",
39+
"options": {
40+
"cwd": "${workspaceFolder}"
41+
},
42+
"group": "test",
43+
"problemMatcher": {
44+
"base": "$gcc",
45+
"fileLocation": ["relative", "${workspaceFolder}"]
46+
},
47+
"windows": {
48+
"command": "..\\..\\b2 test variant=release",
49+
"problemMatcher": {
50+
"base": "$msCompile",
51+
"fileLocation": ["relative", "${workspaceFolder}"]
52+
}
53+
}
54+
},
55+
{
56+
"label": "b2: Run all tests (all configs)",
57+
"type": "shell",
58+
"dependsOn": ["Download nlohmann/json.hpp"],
59+
"command": "../../b2 test exception-handling=on,off rtti=on,off variant=debug,release link=static,shared",
60+
"options": {
61+
"cwd": "${workspaceFolder}"
62+
},
63+
"group": "test",
64+
"problemMatcher": {
65+
"base": "$gcc",
66+
"fileLocation": ["relative", "${workspaceFolder}"]
67+
},
68+
"windows": {
69+
"command": "..\\..\\b2 test exception-handling=on,off rtti=on,off variant=debug,release link=static,shared",
70+
"problemMatcher": {
71+
"base": "$msCompile",
72+
"fileLocation": ["relative", "${workspaceFolder}"]
73+
}
74+
}
75+
},
76+
{
77+
"label": "b2: Run test for current editor file",
78+
"type": "shell",
79+
"dependsOn": ["Download nlohmann/json.hpp"],
80+
"command": "../../b2 test ${fileBasenameNoExtension}.test",
81+
"options": {
82+
"cwd": "${workspaceFolder}"
83+
},
84+
"group": {
85+
"kind": "test",
86+
"isDefault": true
87+
},
88+
"problemMatcher": {
89+
"base": "$gcc",
90+
"fileLocation": ["relative", "${workspaceFolder}"]
91+
},
92+
"windows": {
93+
"command": "..\\..\\b2 test ${fileBasenameNoExtension}.test",
94+
"problemMatcher": {
95+
"base": "$msCompile",
96+
"fileLocation": ["relative", "${workspaceFolder}"]
97+
}
98+
}
99+
}
100+
]
101+
}

0 commit comments

Comments
 (0)