From 2ba224e1526681c1a0b1b2b095b1ef2b0874db48 Mon Sep 17 00:00:00 2001 From: bfredl Date: Sun, 26 Feb 2023 12:51:03 +0100 Subject: refactor(log): reduce compile time LOG_LEVEL granularity --- contrib/flake.nix | 2 -- contrib/local.mk.example | 7 ++++--- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'contrib') diff --git a/contrib/flake.nix b/contrib/flake.nix index 0898c943d7..3884ee9a2b 100644 --- a/contrib/flake.nix +++ b/contrib/flake.nix @@ -33,7 +33,6 @@ NIX_CFLAGS_COMPILE = " -ggdb -Og"; cmakeBuildType = "Debug"; - cmakeFlags = oa.cmakeFlags ++ [ "-DMIN_LOG_LEVEL=0" ]; disallowedReferences = [ ]; }); @@ -45,7 +44,6 @@ }).overrideAttrs (oa: { cmakeFlags = oa.cmakeFlags ++ [ "-DLUACHECK_PRG=${luacheck}/bin/luacheck" - "-DMIN_LOG_LEVEL=0" "-DENABLE_LTO=OFF" ] ++ final.lib.optionals final.stdenv.isLinux [ # https://github.com/google/sanitizers/wiki/AddressSanitizerFlags diff --git a/contrib/local.mk.example b/contrib/local.mk.example index 20396e86ae..4bd026cf87 100644 --- a/contrib/local.mk.example +++ b/contrib/local.mk.example @@ -31,9 +31,10 @@ # often. You can disable it explicitly: # CMAKE_EXTRA_FLAGS += -DENABLE_LTO=OFF -# Log levels: 0 (DEBUG), 1 (INFO), 2 (WARNING), 3 (ERROR) -# Default is 1 (INFO) unless CMAKE_BUILD_TYPE is Release or RelWithDebInfo. -# CMAKE_EXTRA_FLAGS += -DMIN_LOG_LEVEL=1 +# Log levels: DEBUG, INFO, WARNING, ERROR +# For Debug builds all log levels are used +# For Release and RelWithDebInfo builds only WARNING and ERROR are used, unless: +# CMAKE_EXTRA_FLAGS += -DLOG_DEBUG # By default, nvim uses bundled versions of its required third-party # dependencies. -- cgit From 17ce634b8f44e218270ee472599edf4cf3ba0fac Mon Sep 17 00:00:00 2001 From: ii14 Date: Thu, 16 Mar 2023 19:24:04 +0100 Subject: build!: rename sanitizer options from CLANG_* to ENABLE_* --- contrib/asan.sh | 2 +- contrib/flake.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'contrib') diff --git a/contrib/asan.sh b/contrib/asan.sh index 7e7dffa1af..baf7abb5a8 100755 --- a/contrib/asan.sh +++ b/contrib/asan.sh @@ -16,7 +16,7 @@ export ASAN_OPTIONS="detect_leaks=0:log_path=$log_path/asan" # Show backtraces in the logs. export UBSAN_OPTIONS="print_stacktrace=1" -make -C "$root_path" CMAKE_EXTRA_FLAGS="-DCLANG_ASAN_UBSAN=ON" +make -C "$root_path" CMAKE_EXTRA_FLAGS="-DENABLE_ASAN_UBSAN=ON" VIMRUNTIME="$root_path"/runtime "$root_path"/build/bin/nvim # Need to manually reset terminal to avoid mangled output, nvim does not diff --git a/contrib/flake.nix b/contrib/flake.nix index 3884ee9a2b..75c94392e1 100644 --- a/contrib/flake.nix +++ b/contrib/flake.nix @@ -48,7 +48,7 @@ ] ++ final.lib.optionals final.stdenv.isLinux [ # https://github.com/google/sanitizers/wiki/AddressSanitizerFlags # https://clang.llvm.org/docs/AddressSanitizer.html#symbolizing-the-reports - "-DCLANG_ASAN_UBSAN=ON" + "-DENABLE_ASAN_UBSAN=ON" ]; }); }; -- cgit From cbeedc52ebed59628a8d1a76162f1a73c564c151 Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Fri, 7 Apr 2023 10:26:52 +0200 Subject: build(nix): fixed build (#22918) added missing dependencies libiconv --- contrib/flake.nix | 3 +++ 1 file changed, 3 insertions(+) (limited to 'contrib') diff --git a/contrib/flake.nix b/contrib/flake.nix index 75c94392e1..d38d1fd2b7 100644 --- a/contrib/flake.nix +++ b/contrib/flake.nix @@ -16,6 +16,9 @@ preConfigure = '' sed -i cmake.config/versiondef.h.in -e 's/@NVIM_VERSION_PRERELEASE@/-dev-${version}/' ''; + nativeBuildInputs = oa.nativeBuildInputs ++ [ + final.libiconv + ]; }); # a development binary to help debug issues -- cgit From eb151a9730f0000ff46e0b3467e29bb9f02ae362 Mon Sep 17 00:00:00 2001 From: Will Ruggiano Date: Sat, 15 Apr 2023 06:54:16 -0600 Subject: build(nix): upgrade nixpkgs to resolve link error (#23101) bump nixpkgs to get the appropriate treesitter version --- contrib/flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'contrib') diff --git a/contrib/flake.lock b/contrib/flake.lock index c6dfb4642b..1144165ed1 100644 --- a/contrib/flake.lock +++ b/contrib/flake.lock @@ -17,11 +17,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1671983799, - "narHash": "sha256-Z2Ro6hFPZHkBqkVXY5/aBUzxi5xizQGvuHQ9+T5B/ks=", + "lastModified": 1681465517, + "narHash": "sha256-EasJh15/jcJNAHtq2SGbiADRXteURAnQbj1NqBoKkzU=", "owner": "nixos", "repo": "nixpkgs", - "rev": "fad51abd42ca17a60fc1d4cb9382e2d79ae31836", + "rev": "abe7316dd51a313ce528972b104f4f04f56eefc4", "type": "github" }, "original": { -- cgit From 4cc69f45b4a56c1c0f0ac8ac15b66dffe00d4615 Mon Sep 17 00:00:00 2001 From: ii14 Date: Sat, 22 Apr 2023 03:27:32 +0200 Subject: build: add ubsan default options Use print_stacktrace=1 for UBSAN by default. --- contrib/asan.sh | 3 --- contrib/flake.nix | 1 - 2 files changed, 4 deletions(-) (limited to 'contrib') diff --git a/contrib/asan.sh b/contrib/asan.sh index baf7abb5a8..6354d65514 100755 --- a/contrib/asan.sh +++ b/contrib/asan.sh @@ -13,9 +13,6 @@ export CC='clang' # Change to detect_leaks=1 to detect memory leaks (slower). export ASAN_OPTIONS="detect_leaks=0:log_path=$log_path/asan" -# Show backtraces in the logs. -export UBSAN_OPTIONS="print_stacktrace=1" - make -C "$root_path" CMAKE_EXTRA_FLAGS="-DENABLE_ASAN_UBSAN=ON" VIMRUNTIME="$root_path"/runtime "$root_path"/build/bin/nvim diff --git a/contrib/flake.nix b/contrib/flake.nix index d38d1fd2b7..59d977b748 100644 --- a/contrib/flake.nix +++ b/contrib/flake.nix @@ -106,7 +106,6 @@ # ASAN_OPTIONS=detect_leaks=1 export ASAN_OPTIONS="log_path=./test.log:abort_on_error=1" - export UBSAN_OPTIONS=print_stacktrace=1 # for treesitter functionaltests mkdir -p runtime/parser -- cgit From 9eef2b111d7ed1546509b75fd22e618e02dd3a73 Mon Sep 17 00:00:00 2001 From: figsoda Date: Fri, 9 Jun 2023 16:29:38 -0400 Subject: build(nix): update flake.lock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'flake-utils': 'github:numtide/flake-utils/5aed5285a952e0b949eb3ba02c12fa4fcfef535f' (2022-11-02) → 'github:numtide/flake-utils/a1720a10a6cfe8234c0e93907ffe81be440f4cef' (2023-05-31) • Added input 'flake-utils/systems': 'github:nix-systems/default/da67096a3b9bf56a91d16901293e51ba5b49a27e' (2023-04-09) • Updated input 'nixpkgs': 'github:nixos/nixpkgs/abe7316dd51a313ce528972b104f4f04f56eefc4' (2023-04-14) → 'github:nixos/nixpkgs/a64b73e07d4aa65cfcbda29ecf78eaf9e72e44bd' (2023-06-08) --- contrib/flake.lock | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) (limited to 'contrib') diff --git a/contrib/flake.lock b/contrib/flake.lock index 1144165ed1..554dc22bdb 100644 --- a/contrib/flake.lock +++ b/contrib/flake.lock @@ -1,12 +1,15 @@ { "nodes": { "flake-utils": { + "inputs": { + "systems": "systems" + }, "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "lastModified": 1685518550, + "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", "owner": "numtide", "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef", "type": "github" }, "original": { @@ -17,11 +20,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1681465517, - "narHash": "sha256-EasJh15/jcJNAHtq2SGbiADRXteURAnQbj1NqBoKkzU=", + "lastModified": 1686226982, + "narHash": "sha256-nLuiPoeiVfqqzeq9rmXxpybh77VS37dsY/k8N2LoxVg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "abe7316dd51a313ce528972b104f4f04f56eefc4", + "rev": "a64b73e07d4aa65cfcbda29ecf78eaf9e72e44bd", "type": "github" }, "original": { @@ -36,6 +39,21 @@ "flake-utils": "flake-utils", "nixpkgs": "nixpkgs" } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } } }, "root": "root", -- cgit From 8df3381202046ee5feeb9e9256d21f20a20531fb Mon Sep 17 00:00:00 2001 From: figsoda Date: Fri, 9 Jun 2023 16:50:23 -0400 Subject: build(nix): use the correct versions of the bundled treesitter parsers --- contrib/flake.nix | 41 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) (limited to 'contrib') diff --git a/contrib/flake.nix b/contrib/flake.nix index 59d977b748..e4d0fae99f 100644 --- a/contrib/flake.nix +++ b/contrib/flake.nix @@ -7,13 +7,50 @@ }; outputs = { self, nixpkgs, flake-utils }: + let + inherit (builtins) + elemAt + foldl' + mapAttrs + match + readFile + ; + inherit (nixpkgs.lib) + const + flip + pipe + remove + splitString + toLower + ; + in { overlay = final: prev: { - neovim = final.neovim-unwrapped.overrideAttrs (oa: rec { + neovim = (final.neovim-unwrapped.override { + treesitter-parsers = pipe ../cmake.deps/deps.txt [ + readFile + (splitString "\n") + (map (match "TREESITTER_([A-Z_]+)_(URL|SHA256)[[:space:]]+([^[:space:]]+)[[:space:]]*")) + (remove null) + (flip foldl' { } + (acc: matches: + let + lang = toLower (elemAt matches 0); + type = toLower (elemAt matches 1); + value = elemAt matches 2; + in + acc // { + ${lang} = acc.${lang} or { } // { + ${type} = value; + }; + })) + (mapAttrs (const final.fetchurl)) + ]; + }).overrideAttrs (oa: rec { version = self.shortRev or "dirty"; src = ../.; - preConfigure = '' + preConfigure = oa.preConfigure or "" + '' sed -i cmake.config/versiondef.h.in -e 's/@NVIM_VERSION_PRERELEASE@/-dev-${version}/' ''; nativeBuildInputs = oa.nativeBuildInputs ++ [ -- cgit From 4dc86477b674d056b137a3afafd8824f7b7717ec Mon Sep 17 00:00:00 2001 From: Raphael Date: Fri, 23 Jun 2023 19:54:47 +0800 Subject: build(luarc.json): disable luadoc-miss-see-name #24108 --- contrib/luarc.json | 3 +++ 1 file changed, 3 insertions(+) (limited to 'contrib') diff --git a/contrib/luarc.json b/contrib/luarc.json index ebad0581b9..31126e4215 100644 --- a/contrib/luarc.json +++ b/contrib/luarc.json @@ -13,6 +13,9 @@ "teardown", "finally", "lfs" + ], + "disable": [ + "luadoc-miss-see-name" ] }, "workspace": { -- cgit From 2031812348e79e3d854d444b53e69340ab42e5dd Mon Sep 17 00:00:00 2001 From: figsoda Date: Sun, 2 Jul 2023 00:09:30 -0400 Subject: build(nix): fix markdown parser #24225 --- contrib/flake.nix | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'contrib') diff --git a/contrib/flake.nix b/contrib/flake.nix index e4d0fae99f..57e56d0fdb 100644 --- a/contrib/flake.nix +++ b/contrib/flake.nix @@ -46,6 +46,15 @@ }; })) (mapAttrs (const final.fetchurl)) + (self: self // { + markdown = final.stdenv.mkDerivation { + inherit (self.markdown) name; + src = self.markdown; + installPhase = '' + mv tree-sitter-markdown $out + ''; + }; + }) ]; }).overrideAttrs (oa: rec { version = self.shortRev or "dirty"; -- cgit From c0beb8173fe2f8a8f71cd5a3a6cdfed145a1d973 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Mon, 7 Aug 2023 16:27:53 +0100 Subject: feat: add .luarc.json (#24592) --- contrib/luarc.json | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 contrib/luarc.json (limited to 'contrib') diff --git a/contrib/luarc.json b/contrib/luarc.json deleted file mode 100644 index 31126e4215..0000000000 --- a/contrib/luarc.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "runtime.version": "LuaJIT", - "diagnostics": { - "enable": true, - "globals": [ - "vim", - "describe", - "pending", - "it", - "before_each", - "after_each", - "setup", - "teardown", - "finally", - "lfs" - ], - "disable": [ - "luadoc-miss-see-name" - ] - }, - "workspace": { - "library": [ - "runtime/lua", - "${3rd}/lfs/library" - ], - "checkThirdParty": false, - "maxPreload": 2000, - "preloadFileSize": 1000 - }, - "telemetry.enable": false -} -- cgit From 9f8f287c6139b8b8ff2809f4d1aebb57021cd043 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sat, 9 Sep 2023 18:14:52 +0200 Subject: build: remove luarocks Luarocks is no longer needed after 25e51d393a420765d5efd44c1b4be823a5cf280a. --- contrib/local.mk.example | 1 - 1 file changed, 1 deletion(-) (limited to 'contrib') diff --git a/contrib/local.mk.example b/contrib/local.mk.example index 4bd026cf87..bda2c1b4dc 100644 --- a/contrib/local.mk.example +++ b/contrib/local.mk.example @@ -46,7 +46,6 @@ # DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_LIBUV=OFF # DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_LIBVTERM=OFF # DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_LUAJIT=OFF -# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_LUAROCKS=OFF # DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_MSGPACK=OFF # DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_UNIBILIUM=OFF # DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_UTF8PROC=OFF -- cgit