From ff85110f6bbe009131ce32d225693ab3b5459057 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hans=20W=C3=BCrfel?= Date: Thu, 16 May 2024 09:03:22 +0200 Subject: [PATCH 1/2] only include .jl files --- src/macros.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/macros.jl b/src/macros.jl index 041e49e5eec..50aafbf8740 100644 --- a/src/macros.jl +++ b/src/macros.jl @@ -468,5 +468,7 @@ function _plural_macro_code(model, block, macro_sym) end for file in readdir(joinpath(@__DIR__, "macros")) - include(joinpath(@__DIR__, "macros", file)) + if occursin(r".jl$", file) + include(joinpath(@__DIR__, "macros", file)) + end end From e9d85e934862cf944491face3e743da012aa6ae8 Mon Sep 17 00:00:00 2001 From: Oscar Dowson Date: Fri, 17 May 2024 07:41:33 +1200 Subject: [PATCH 2/2] Update macros.jl --- src/macros.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/macros.jl b/src/macros.jl index 50aafbf8740..209c3ed3f41 100644 --- a/src/macros.jl +++ b/src/macros.jl @@ -468,7 +468,9 @@ function _plural_macro_code(model, block, macro_sym) end for file in readdir(joinpath(@__DIR__, "macros")) - if occursin(r".jl$", file) + # The check for .jl is necessary because some users may have other files + # like .cov from running code coverage. See JuMP.jl#3746. + if endswith(file, ".jl") include(joinpath(@__DIR__, "macros", file)) end end