From a39c5c430f6c6e99bc4e4ce72724dc58e65153a5 Mon Sep 17 00:00:00 2001 From: lkdvos Date: Fri, 31 Jul 2026 13:03:34 -0400 Subject: [PATCH] fix `--modules=` parsing in the benchmark entry point The pattern captured `(\w+)`, which stops at the first comma, so `--modules=linalg,tensornetworks` silently loaded only `linalg`. On top of that, `only(...)` was applied to the capture rather than to the match, which threw for any module name longer than one character. [skip ci] --- benchmark/benchmarks.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/benchmark/benchmarks.jl b/benchmark/benchmarks.jl index f119084d5..f524da2bf 100644 --- a/benchmark/benchmarks.jl +++ b/benchmark/benchmarks.jl @@ -5,12 +5,12 @@ const SUITE = TensorKitBenchmarks.SUITE # Populate benchmarks # Detect if user supplied extra arguments to load only specific modules # e.g. julia benchmarks.jl --modules=linalg,tensornetworks -modules_pattern = r"(?:--modules=)(\w+)" +modules_pattern = r"(?:--modules=)([\w,]+)" arg_id = findfirst(contains(modules_pattern), ARGS) if isnothing(arg_id) TensorKitBenchmarks.loadall!() else - modules = split(only(match(modules_pattern, ARGS[arg_id]).captures[1]), ",") + modules = split(match(modules_pattern, ARGS[arg_id]).captures[1], ",") for m in modules TensorKitBenchmarks.load!(m) end