From 7b9e2c2d68120e12b1e6d37dfd3c50fd6105c682 Mon Sep 17 00:00:00 2001 From: centdix <40307056+centdix@users.noreply.github.com> Date: Tue, 7 Oct 2025 10:07:47 +0200 Subject: [PATCH] internal: fix flake and cli dev usage (#6761) * fix flake * fix cli build * fix deno_ffi --- backend/all_features_oss.sh | 4 ++-- backend/windmill-worker/src/ai_executor.rs | 3 --- cli/build.sh | 3 --- cli/windmill-utils-internal/src/config/index.ts | 2 +- cli/windmill-utils-internal/src/index.ts | 10 +++++----- .../src/inline-scripts/extractor.ts | 4 ++-- .../src/inline-scripts/index.ts | 4 ++-- .../src/inline-scripts/replacer.ts | 2 +- cli/windmill-utils-internal/src/parse/index.ts | 2 +- .../src/path-utils/index.ts | 2 +- .../src/path-utils/path-assigner.ts | 2 +- flake.nix | 14 ++++++++------ 12 files changed, 24 insertions(+), 28 deletions(-) diff --git a/backend/all_features_oss.sh b/backend/all_features_oss.sh index 5871bc656f..a6a9a33616 100755 --- a/backend/all_features_oss.sh +++ b/backend/all_features_oss.sh @@ -1,8 +1,8 @@ +#!/bin/bash + # This script outputs all features except private. Usage : # > cargo build --features $(./all_features_oss.sh) -#!/bin/bash - # Path to the Cargo.toml file CARGO_TOML_PATH="./Cargo.toml" diff --git a/backend/windmill-worker/src/ai_executor.rs b/backend/windmill-worker/src/ai_executor.rs index 7903e459c7..06d265e435 100644 --- a/backend/windmill-worker/src/ai_executor.rs +++ b/backend/windmill-worker/src/ai_executor.rs @@ -877,9 +877,6 @@ pub async fn run_agent( "inner_job_completed_tx should be set as agent jobs are not supported on agent workers", ); - #[cfg(feature = "benchmark")] - let mut bench = windmill_common::bench::BenchmarkIter::new(); - // Spawn handle_queued_job on separate task to prevent tokio stack overflow // Clone everything needed for the spawned task let tool_job_spawn = tool_job.clone(); diff --git a/cli/build.sh b/cli/build.sh index 79f352409c..9a86ccbb54 100755 --- a/cli/build.sh +++ b/cli/build.sh @@ -16,8 +16,5 @@ set -e echo "Running dnt..." deno run -A dnt.ts -# Remove .ts extensions after building to go back to the original state -./windmill-utils-internal/remove-ts-ext.sh - echo "Build complete!" diff --git a/cli/windmill-utils-internal/src/config/index.ts b/cli/windmill-utils-internal/src/config/index.ts index e23ba6ca86..f3ae42b3c8 100644 --- a/cli/windmill-utils-internal/src/config/index.ts +++ b/cli/windmill-utils-internal/src/config/index.ts @@ -1 +1 @@ -export * from "./config"; \ No newline at end of file +export * from "./config.ts"; \ No newline at end of file diff --git a/cli/windmill-utils-internal/src/index.ts b/cli/windmill-utils-internal/src/index.ts index da314a7c5a..635893e2d1 100644 --- a/cli/windmill-utils-internal/src/index.ts +++ b/cli/windmill-utils-internal/src/index.ts @@ -8,8 +8,8 @@ * - Cross-platform path constants */ -export * from "./inline-scripts"; -export * from "./path-utils"; -export * from "./parse"; -export * from "./config"; -export { SEP, DELIMITER } from "./constants"; \ No newline at end of file +export * from "./inline-scripts.ts"; +export * from "./path-utils.ts"; +export * from "./parse.ts"; +export * from "./config.ts"; +export { SEP, DELIMITER } from "./constants.ts"; \ No newline at end of file diff --git a/cli/windmill-utils-internal/src/inline-scripts/extractor.ts b/cli/windmill-utils-internal/src/inline-scripts/extractor.ts index b3b10bcad4..b61cf60fb5 100644 --- a/cli/windmill-utils-internal/src/inline-scripts/extractor.ts +++ b/cli/windmill-utils-internal/src/inline-scripts/extractor.ts @@ -1,5 +1,5 @@ -import { newPathAssigner, PathAssigner } from "../path-utils/path-assigner"; -import { FlowModule } from "../gen/types.gen"; +import { newPathAssigner, PathAssigner } from "../path-utils/path-assigner.ts"; +import { FlowModule } from "../gen/types.gen.ts"; /** * Represents an inline script extracted from a flow module diff --git a/cli/windmill-utils-internal/src/inline-scripts/index.ts b/cli/windmill-utils-internal/src/inline-scripts/index.ts index eace8d3e4f..bb3c917dbb 100644 --- a/cli/windmill-utils-internal/src/inline-scripts/index.ts +++ b/cli/windmill-utils-internal/src/inline-scripts/index.ts @@ -1,2 +1,2 @@ -export * from "./replacer"; -export * from "./extractor"; \ No newline at end of file +export * from "./replacer.ts"; +export * from "./extractor.ts"; \ No newline at end of file diff --git a/cli/windmill-utils-internal/src/inline-scripts/replacer.ts b/cli/windmill-utils-internal/src/inline-scripts/replacer.ts index be349785c7..9ec25e9f65 100644 --- a/cli/windmill-utils-internal/src/inline-scripts/replacer.ts +++ b/cli/windmill-utils-internal/src/inline-scripts/replacer.ts @@ -1,4 +1,4 @@ -import { FlowModule } from "../gen/types.gen"; +import { FlowModule } from "../gen/types.gen.ts"; /** * Replaces inline script references with actual file content from the filesystem. diff --git a/cli/windmill-utils-internal/src/parse/index.ts b/cli/windmill-utils-internal/src/parse/index.ts index fc26ce611a..41d09ed00d 100644 --- a/cli/windmill-utils-internal/src/parse/index.ts +++ b/cli/windmill-utils-internal/src/parse/index.ts @@ -1 +1 @@ -export * from "./parse-schema"; \ No newline at end of file +export * from "./parse-schema.ts"; \ No newline at end of file diff --git a/cli/windmill-utils-internal/src/path-utils/index.ts b/cli/windmill-utils-internal/src/path-utils/index.ts index ef23185664..6f5c8d68be 100644 --- a/cli/windmill-utils-internal/src/path-utils/index.ts +++ b/cli/windmill-utils-internal/src/path-utils/index.ts @@ -1 +1 @@ -export * from "./path-assigner"; \ No newline at end of file +export * from "./path-assigner.ts"; \ No newline at end of file diff --git a/cli/windmill-utils-internal/src/path-utils/path-assigner.ts b/cli/windmill-utils-internal/src/path-utils/path-assigner.ts index 9020974214..d1a79a3a32 100644 --- a/cli/windmill-utils-internal/src/path-utils/path-assigner.ts +++ b/cli/windmill-utils-internal/src/path-utils/path-assigner.ts @@ -1,4 +1,4 @@ -import { RawScript } from "../gen/types.gen"; +import { RawScript } from "../gen/types.gen.ts"; const INLINE_SCRIPT_PREFIX = "inline_script"; diff --git a/flake.nix b/flake.nix index 3bd150a614..c6f09a193d 100644 --- a/flake.nix +++ b/flake.nix @@ -50,11 +50,11 @@ xmlsec.dev libxslt.dev libclang.dev + libffi # For deno_ffi libtool nodejs postgresql pkg-config - glibc.dev clang cmake ]; @@ -298,9 +298,10 @@ # included we need to look in a few places. # See https://web.archive.org/web/20220523141208/https://hoverbear.org/blog/rust-bindgen-in-nix/ BINDGEN_EXTRA_CLANG_ARGS = - "${builtins.readFile "${stdenv.cc}/nix-support/libc-crt1-cflags"} ${ + # Prevent clang from using system headers - only use Nix headers + "-nostdinc ${builtins.readFile "${stdenv.cc}/nix-support/libc-crt1-cflags"} ${ builtins.readFile "${stdenv.cc}/nix-support/libc-cflags" - }${builtins.readFile "${stdenv.cc}/nix-support/cc-cflags"}${ + } ${builtins.readFile "${stdenv.cc}/nix-support/cc-cflags"} ${ builtins.readFile "${stdenv.cc}/nix-support/libcxx-cxxflags" } -idirafter ${pkgs.libiconv}/include ${ lib.optionalString stdenv.cc.isClang @@ -313,9 +314,10 @@ lib.getVersion stdenv.cc.cc } -isystem ${stdenv.cc.cc}/include/c++/${ lib.getVersion stdenv.cc.cc - }/${stdenv.hostPlatform.config} -idirafter ${stdenv.cc.cc}/lib/gcc/${stdenv.hostPlatform.config}/14.2.1/include" - }"; # NOTE: It is hardcoded to 14.2.1 -------------------------------------------------------------^^^^^^ - # Please update the version here as well if you want to update flake. + }/${stdenv.hostPlatform.config} -idirafter ${stdenv.cc.cc}/lib/gcc/${stdenv.hostPlatform.config}/${ + lib.getVersion stdenv.cc.cc + }/include" + }"; }; packages.default = self.packages.${system}.windmill; packages.windmill-client = pkgs.buildNpmPackage {