From 1112d9d22019c1b58a66b86c5fcba57e896a9f22 Mon Sep 17 00:00:00 2001 From: Gonzalo Diaz Date: Wed, 11 Sep 2024 12:38:53 -0300 Subject: [PATCH 1/4] [CONFIG] [CMake] enable debugging capabilities. --- CMakePresets.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakePresets.json b/CMakePresets.json index ccf9964..79a84d0 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -5,7 +5,8 @@ { "name": "debug", "cacheVariables": { - "CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" + "CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake", + "CMAKE_BUILD_TYPE": "Debug" }, "generator": "Unix Makefiles", "binaryDir": "${sourceDir}/build/default" From 28cb9b474bef77ec0e09ee7b8f2d557e7548e50e Mon Sep 17 00:00:00 2001 From: Gonzalo Diaz Date: Wed, 11 Sep 2024 12:37:46 -0300 Subject: [PATCH 2/4] [DOC] New "environment notes" to document the installation of the tool stack used in this project. --- Environment-Notes.md | 76 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 Environment-Notes.md diff --git a/Environment-Notes.md b/Environment-Notes.md new file mode 100644 index 0000000..d202db4 --- /dev/null +++ b/Environment-Notes.md @@ -0,0 +1,76 @@ +# Environment notes + +OS: MacOS Sonoma 14.6.1 (23G93) + +```sh +uname -a +``` + +```text +Darwin epoch.local 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:13:00 PDT 2024; root:xnu-10063.141.2~1/RELEASE_X86_64 x86_64 +``` + +## Enable debugging with VSCode + + + +## Tools + +Required tools: + +- Homebrew +- Xcode command line tools + + + +Then, the C++ local stack I choose: + +```sh +brew install --cask cmake +brew install clang-format cppcheck make vcpkg + +``` + +## Visual Studio Code extensions + +Suggested for a C++ stack + +```sh +code --install-extension ms-vscode.cpptools-extension-pack +code --install-extension ms-vscode.cmake-tools +code --install-extension xaver.clang-format +code --install-extension ryanluker.vscode-coverage-gutters +code --install-extension NathanJ.cpp-tools-plugin +code --install-extension ms-vscode.makefile-tools +``` + +General purpose + +```sh +code --install-extension ms-azuretools.vscode-docker +code --install-extension EditorConfig.EditorConfig +code --install-extension donjayamanne.githistory +code --install-extension shd101wyy.markdown-preview-enhanced +code --install-extension DavidAnson.vscode-markdownlint +code --install-extension bpruitt-goddard.mermaid-markdown-syntax-highlighting +code --install-extension esbenp.prettier-vscode +code --install-extension redhat.vscode-yaml +``` + +Optional (cosmetic purpose) + +```sh +code --install-extension aaron-bond.better-comments +code --install-extension isotechnics.commentlinks +code --install-extension johnpapa.vscode-peacock +code --install-extension vscode-icons-team.vscode-icons +``` + +Extra for complementary external services + +```sh +code --install-extension snyk-security.snyk-vulnerability-scanner +code --install-extension SonarSource.sonarlint-vscode +code --install-extension github.vscode-github-actions + +``` From 80a10d19305241a64b6fd7bd58dad3230161ffdd Mon Sep 17 00:00:00 2001 From: Gonzalo Diaz Date: Wed, 11 Sep 2024 13:23:29 -0300 Subject: [PATCH 3/4] [CONFIG] [VSCode] enable debugging capabilities. --- .vscode/launch.json | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..1cd3666 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,25 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "(lldb) Launch", + "type": "cppdbg", + "request": "launch", + // Resolved by CMake Tools: + "program": "${command:cmake.launchTargetPath}", + "args": [], + "stopAtEntry": false, + "cwd": "${workspaceFolder}/src/tests", + "environment": [ + { + // add the directory where our target was built to the PATHs + // it gets resolved by CMake Tools: + "name": "PATH", + "value": "$PATH:${command:cmake.launchTargetDirectory}" + } + ], + "externalConsole": true, + "MIMode": "lldb", + } + ] +} From 895669152b236aaa9a916c47b3ac4a1718e03093 Mon Sep 17 00:00:00 2001 From: Gonzalo Diaz Date: Wed, 11 Sep 2024 13:45:25 -0300 Subject: [PATCH 4/4] [BUGFIX] [CONFIG] [Github Actions] /usr/local/share/vcpkg/.vcpkg-root: error: Failed to take the filesystem lock Device or resource busy https://github.com/microsoft/vcpkg/issues/22129#issuecomment-998467949 --- .github/workflows/cpp.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cpp.yml b/.github/workflows/cpp.yml index 28e4d02..37259cf 100644 --- a/.github/workflows/cpp.yml +++ b/.github/workflows/cpp.yml @@ -33,8 +33,8 @@ jobs: - name: Install dependencies run: | - vcpkg integrate install - vcpkg install + vcpkg --x-wait-for-lock integrate install + vcpkg --x-wait-for-lock install # yamllint disable rule:line-length - name: Build