diff --git a/Project.toml b/Project.toml index 3a697f4..53e2ed7 100644 --- a/Project.toml +++ b/Project.toml @@ -1,11 +1,13 @@ name = "Formatting" uuid = "59287772-0a20-5a39-b81b-1366585eb4c0" -version = "0.4.2" +version = "0.4.3" [deps] +Logging = "56ddb016-857b-54e1-b83d-db4d58db5568" Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" [compat] +Logging = "1" julia = "1" [extras] diff --git a/src/Formatting.jl b/src/Formatting.jl index e073b29..b57545b 100644 --- a/src/Formatting.jl +++ b/src/Formatting.jl @@ -1,13 +1,29 @@ module Formatting import Base.show - using Printf + using Printf, Logging export FormatSpec, FormatExpr, printfmt, printfmtln, fmt, format, sprintf1, generate_formatter + if ccall(:jl_generating_output, Cint, ()) == 1 + @warn """ + DEPRECATION NOTICE + + Formatting.jl has been unmaintained for a while, with some serious + correctness bugs compromising the original purpose of the package. As a result, + it has been deprecated - consider using an alternative, such as + `Format.jl` (https://github.com/JuliaString/Format.jl) or the `Printf` stdlib directly. + + If you are not using Formatting.jl as a direct dependency, please consider + opening an issue on any packages you are using that do use it as a dependency. + From Julia 1.9 onwards, you can query `]why Formatting` to figure out which + package originally brings it in as a dependency. + """ + end + include("cformat.jl" ) include("fmtspec.jl") include("fmtcore.jl")