From 96c9d81904749d3431b197c3cad48c06bc81a89a Mon Sep 17 00:00:00 2001 From: Jakob Peters Date: Sun, 30 Jun 2024 22:04:48 -0700 Subject: [PATCH] Stop testing with DispatchDoctor.jl --- LocalPreferences.toml | 2 -- Project.toml | 28 +++++++++++++--------------- ext/LaTeXStringsExtension.jl | 5 ----- ext/MarkdownExtension.jl | 5 ----- src/Typstry.jl | 1 - src/commands.jl | 4 ---- src/strings.jl | 12 ++---------- test/LocalPreferences.toml | 2 -- test/TestDocumenter.jl | 17 ++--------------- 9 files changed, 17 insertions(+), 59 deletions(-) delete mode 100644 LocalPreferences.toml delete mode 100644 test/LocalPreferences.toml diff --git a/LocalPreferences.toml b/LocalPreferences.toml deleted file mode 100644 index 231d1f7..0000000 --- a/LocalPreferences.toml +++ /dev/null @@ -1,2 +0,0 @@ -[Typstry] -instability_check = "disable" diff --git a/Project.toml b/Project.toml index 74f64bf..5fd54c5 100644 --- a/Project.toml +++ b/Project.toml @@ -1,29 +1,27 @@ +authors = ["Jakob Peters "] name = "Typstry" uuid = "f0ed7684-a786-439e-b1e3-3b82803b501e" -authors = ["Jakob Peters "] version = "0.2.0" +[compat] +Artifacts = "1.9" +Dates = "1.9" +LaTeXStrings = "1" +Markdown = "1.9" +PrecompileTools = "1" +Typst_jll = "0.2, 0.3, 0.7, 0.8, 0.10, 0.11" +julia = "1.9" + [deps] Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" -DispatchDoctor = "8d63f2c5-f18a-4cf2-ba9d-b3f60fc568c8" PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a" Typst_jll = "eb4b1da6-20f6-5c66-9826-fdb8ad410d0e" -[weakdeps] -LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" -Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a" - [extensions] LaTeXStringsExtension = "LaTeXStrings" MarkdownExtension = "Markdown" -[compat] -Artifacts = "1.9" -Dates = "1.9" -DispatchDoctor = "0.4" -LaTeXStrings = "1" -Markdown = "1.9" -PrecompileTools = "1" -Typst_jll = "0.2, 0.3, 0.7, 0.8, 0.10, 0.11" -julia = "1.9" +[weakdeps] +LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" +Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a" diff --git a/ext/LaTeXStringsExtension.jl b/ext/LaTeXStringsExtension.jl index 97d68ca..864f858 100644 --- a/ext/LaTeXStringsExtension.jl +++ b/ext/LaTeXStringsExtension.jl @@ -2,13 +2,10 @@ module LaTeXStringsExtension import Typstry: show_typst -using DispatchDoctor: @stable using LaTeXStrings: LaTeXString, @L_str using PrecompileTools: @compile_workload using Typstry: show_raw, workload -@stable begin - # Strings """ @@ -28,6 +25,4 @@ const examples = [L"a" => LaTeXString] @compile_workload workload(examples) -end # @stable - end # module diff --git a/ext/MarkdownExtension.jl b/ext/MarkdownExtension.jl index f268855..dd4197d 100644 --- a/ext/MarkdownExtension.jl +++ b/ext/MarkdownExtension.jl @@ -2,13 +2,10 @@ module MarkdownExtension import Typstry: show_typst -using DispatchDoctor: @stable using Markdown: MD, @md_str using PrecompileTools: @compile_workload using Typstry: show_raw, workload -@stable begin - # Strings """ @@ -35,6 +32,4 @@ const examples = [md"# A" => MD] @compile_workload workload(examples) -end # @stable - end # module diff --git a/src/Typstry.jl b/src/Typstry.jl index 6255255..6aa5ae2 100644 --- a/src/Typstry.jl +++ b/src/Typstry.jl @@ -13,7 +13,6 @@ using .Meta: parse using Dates: Date, DateTime, Day, Hour, Minute, Second, Time, Week, day, hour, minute, month, second, year -using DispatchDoctor: @stable, @unstable using PrecompileTools: @compile_workload using Typst_jll: typst diff --git a/src/commands.jl b/src/commands.jl index 78c5c16..85a39b7 100644 --- a/src/commands.jl +++ b/src/commands.jl @@ -1,6 +1,4 @@ -@stable begin - # Internals """ @@ -388,5 +386,3 @@ TypstError: failed to `run` a `TypstCommand([""])` """ showerror(io::IO, te::TypstError) = print(io, "TypstError: failed to `run` a `", TypstCommand, "(", te.command.parameters, ")`") - -end # @stable diff --git a/src/strings.jl b/src/strings.jl index 9289dbb..ee8bce8 100644 --- a/src/strings.jl +++ b/src/strings.jl @@ -1,6 +1,4 @@ -@stable begin - # `Typstry` """ @@ -94,8 +92,6 @@ struct TypstText{T} value::T end -end # @stable - """ @typst_str(s) typst"s" @@ -159,8 +155,6 @@ macro typst_str(s) :(TypstString(TypstText($_s))) end -@stable begin - # Internals """ @@ -459,7 +453,7 @@ end Call `Meta.parse` with the `filename` if it is supported in the current Julia version (at least v1.10). """ -@unstable static_parse(args...; filename, kwargs...) = @static VERSION < v"1.10" ? +static_parse(args...; filename, kwargs...) = @static VERSION < v"1.10" ? parse(args...; kwargs...) : parse(args...; filename, kwargs...) ## Dates.jl @@ -545,7 +539,7 @@ methods must return an `AbstractDict{Symbol}`. | `:parenthesize` | `true` | `Bool` | Whether to enclose some mathematical elements in parentheses to specify their operator precedence and avoid ambiguity. | | `:tab_size` | `2` | `Int` | The number of spaces used by some elements with multi-line Typst formatting, which is repeated for each level of `depth` | """ -@unstable context(x::Typst) = merge!(Dict( +context(x::Typst) = merge!(Dict( :backticks => 3, :block => false, :depth => 0, @@ -991,5 +985,3 @@ const preamble = typst""" #set page(margin: 1em, height: auto, width: auto, fill: white) #set text(16pt, font: "JuliaMono") """ - -end # @stable diff --git a/test/LocalPreferences.toml b/test/LocalPreferences.toml deleted file mode 100644 index 36f185a..0000000 --- a/test/LocalPreferences.toml +++ /dev/null @@ -1,2 +0,0 @@ -[Typstry] -instability_check = "error" diff --git a/test/TestDocumenter.jl b/test/TestDocumenter.jl index b80317e..821f612 100644 --- a/test/TestDocumenter.jl +++ b/test/TestDocumenter.jl @@ -7,31 +7,18 @@ using Documenter: DocMeta.setdocmeta!, doctest using Logging: Debug, Info, disable_logging using Markdown: Markdown using LaTeXStrings: LaTeXStrings -using Preferences: set_preferences! using Typstry: Typstry -const extensions = [:LaTeXStrings, :Markdown] - function _test(_module, x) - setdocmeta!(_module, :DocTestSetup, quote - using Preferences: set_preferences! - using Typstry - $x - - set_preferences!("Typstry", "instability_check" => "error") - end; recursive = true) - - # TODO: errors print twice + setdocmeta!(_module, :DocTestSetup, :(using Typstry; $x); recursive = true) doctest(_module; manual = "source", testset = "`$_module` Doctests") end function test() - set_preferences!("Typstry", "instability_check" => "error") disable_logging(Info) - _test(Typstry, nothing) - for extension in extensions + for extension in [:LaTeXStrings, :Markdown] _extension = Symbol(extension, "Extension") _module = get_extension(Typstry, _extension)