From 304c0ddb95bb141e87e6c31e81d219ec2a3d6940 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lex?= Date: Thu, 18 Jun 2026 14:48:16 +0000 Subject: [PATCH] chore(dependencies): Update logos-module-builder (#39) --- CONTRIBUTING.md | 39 +++++++++++++++++++++++++++++++++++++++ flake.lock | 8 ++++---- flake.nix | 4 ++-- justfile | 14 +++++++++++++- 4 files changed, 58 insertions(+), 7 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..c299dd9 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,39 @@ +# Contributing + +## Nix + IDE Integration + +If your IDE reports that a file doesn't belong to the project or that files cannot be found, the CMake cache is likely +missing the Nix-provided paths. + +This may happen when the IDE runs CMake on its own, outside the Nix environment, leaving the required paths empty. + +#### Preferred fix: launch the IDE from inside the Nix dev shell + +This makes the IDE inherit required environment variables directly, so every CMake reload it triggers has the right +environment, not just a one-off cache snapshot. + +Example: +```bash +nix develop -c ... +``` + +Or, if you're using CLion, there's already a shortcut for that: +```bash +just clion +``` + +#### Alternative: regenerate the cache, then reload without resetting it + +If you don't want to launch the IDE from inside the Nix dev shell, you can try to reuse an existing `CMakeCache.txt` on +reload instead of always re-running `cmake` with its own environment. + +To do that, you first need to regenerate the cache. This can be done by running: +```bash +nix develop -c just configure +``` + +Then reload the CMake project without resetting the cache (resetting it would wipe the paths you just wrote): + +> JetBrains: **View → Tool Windows → CMake** → **Reload** ↺ + +This won't help on an IDE that always re-invokes `cmake` with its own (non-Nix) environment on reload. diff --git a/flake.lock b/flake.lock index f40e959..f313094 100644 --- a/flake.lock +++ b/flake.lock @@ -853,16 +853,16 @@ ] }, "locked": { - "lastModified": 1781788313, - "narHash": "sha256-FnlpVshUbq0jm5unPjUi/woRBM9wr3a2beVidszbLwM=", + "lastModified": 1781792889, + "narHash": "sha256-i7zTkYSpQGMBfVvD5mNZ1UBU1Slk0Yi31g2GIHvCSbM=", "owner": "logos-co", "repo": "logos-module-builder", - "rev": "bc868bf47f9d797637ac78af814b0db718dde4b8", + "rev": "38ddf92c1f240f4e420d300a1fbabb1609d5db01", "type": "github" }, "original": { "owner": "logos-co", - "ref": "bc868bf47f9d797637ac78af814b0db718dde4b8", + "ref": "38ddf92c1f240f4e420d300a1fbabb1609d5db01", "repo": "logos-module-builder", "type": "github" } diff --git a/flake.nix b/flake.nix index debd81f..b82c58d 100644 --- a/flake.nix +++ b/flake.nix @@ -2,8 +2,8 @@ description = "Logos Blockchain Module - Qt6 Plugin"; inputs = { - logos-module-builder.url = "github:logos-co/logos-module-builder?ref=bc868bf47f9d797637ac78af814b0db718dde4b8"; - # v0.1.3-rc.10-compatible + rust-rapidsnark nix fixes + cli commands + leader_claim + channel deposit / wallet notes C bindings + logos-module-builder.url = "github:logos-co/logos-module-builder?ref=38ddf92c1f240f4e420d300a1fbabb1609d5db01"; + # v0.1.3-rc.10-compatible + rust-rapidsnark nix fixes + cli commands + leader_claim + channel deposit / wallet notes C bindings + config generation fixes logos-blockchain.url = "github:logos-blockchain/logos-blockchain?ref=0222706b14010fbdfbe9a94d3617ebf46a77fdd1"; }; diff --git a/justfile b/justfile index d35b6da..11187a8 100644 --- a/justfile +++ b/justfile @@ -4,7 +4,7 @@ default: build # provides LOGOS_CPP_SDK_ROOT and LOGOS_MODULE_BUILDER_ROOT — CMake picks them # up automatically via the logos_module() macro, no explicit -D flags needed. configure: - cmake -S . -B build -G Ninja + cmake -S . -B build -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON build: configure cmake --build build --parallel --target liblogos_blockchain_module_module_plugin @@ -17,8 +17,20 @@ rebuild: clean build nix: nix develop +# Launch CLion inside the Nix dev shell so it inherits required variables and fully integrates with Nix. +clion: + nix develop -c "$HOME/.local/share/JetBrains/Toolbox/apps/clion/bin/clion.sh" . >/dev/null 2>&1 & + prettify: nix shell nixpkgs#clang-tools -c clang-format -i src/**.cpp src/**.h +lint: configure + nix shell nixpkgs#clang-tools --command clang-tidy \ + -p build \ + --header-filter='src/.*' \ + --extra-arg-before=--driver-mode=g++ \ + --extra-arg=-I"$LOGOS_EXT_ROOT_LOGOS_BLOCKCHAIN/include" \ + src/logos_blockchain_module.cpp + unicode-logs file: perl -pe 's/\\u([0-9A-Fa-f]{4})/chr(hex($1))/ge' {{file}} | less -R