Skip to content

Commit 6657750

Browse files
committed
fix warning printing in LinearAlgebra
1 parent 56c8c66 commit 6657750

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

stdlib/LinearAlgebra/src/blas.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ function check()
159159
interface = USE_BLAS64 ? :ilp64 : :lp64
160160
if !any(lib.interface == interface for lib in config.loaded_libs)
161161
interfacestr = uppercase(string(interface))
162-
@error("No loaded BLAS libraries were built with $interfacestr support.")
162+
println(Core.stderr, "No loaded BLAS libraries were built with $interfacestr support.")
163163
exit(1)
164164
end
165165
end

stdlib/LinearAlgebra/src/lbt.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ end
1717
macro get_warn(map, key)
1818
return quote
1919
if !haskey($(esc(map)), $(esc(key)))
20-
#@warn(string("[LBT] Unknown key into ", $(string(map)), ": ", $(esc(key)), ", defaulting to :unknown"))
20+
println(Core.stderr, string("Warning: [LBT] Unknown key into ", $(string(map)), ": ", $(esc(key)), ", defaulting to :unknown"))
2121
# All the unknown values share a common value: `-1`
2222
$(esc(map))[$(esc(LBT_INTERFACE_UNKNOWN))]
2323
else
@@ -132,7 +132,7 @@ struct LBTConfig
132132
if str_ptr != C_NULL
133133
push!(exported_symbols, unsafe_string(str_ptr))
134134
else
135-
error("NULL string in lbt_config.exported_symbols[$(sym_idx)]")
135+
println(Core.stderr, "Error: NULL string in lbt_config.exported_symbols[$(sym_idx)]")
136136
end
137137
end
138138

test/trimming/buildscript.jl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,6 @@ end
211211
# Additional method patches depending on whether user code loads certain stdlibs
212212

213213
let loaded = Symbol.(Base.loaded_modules_array()) # TODO better way to do this
214-
if :LinearAlgebra in loaded
215-
using LinearAlgebra
216-
@eval LinearAlgebra.BLAS begin
217-
check() = nothing #TODO: this might be unsafe but needs logging macro fixes
218-
end
219-
end
220214
if :SparseArrays in loaded
221215
using SparseArrays
222216
@eval SparseArrays.CHOLMOD begin

0 commit comments

Comments
 (0)