Skip to content

Commit

Permalink
Stop testing with DispatchDoctor.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobjpeters committed Jul 1, 2024
1 parent 0950625 commit 96c9d81
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 59 deletions.
2 changes: 0 additions & 2 deletions LocalPreferences.toml

This file was deleted.

28 changes: 13 additions & 15 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,29 +1,27 @@
authors = ["Jakob Peters <[email protected]>"]
name = "Typstry"
uuid = "f0ed7684-a786-439e-b1e3-3b82803b501e"
authors = ["Jakob Peters <[email protected]>"]
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"
5 changes: 0 additions & 5 deletions ext/LaTeXStringsExtension.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

"""
Expand All @@ -28,6 +25,4 @@ const examples = [L"a" => LaTeXString]

@compile_workload workload(examples)

end # @stable

end # module
5 changes: 0 additions & 5 deletions ext/MarkdownExtension.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

"""
Expand All @@ -35,6 +32,4 @@ const examples = [md"# A" => MD]

@compile_workload workload(examples)

end # @stable

end # module
1 change: 0 additions & 1 deletion src/Typstry.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 0 additions & 4 deletions src/commands.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@

@stable begin

# Internals

"""
Expand Down Expand Up @@ -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
12 changes: 2 additions & 10 deletions src/strings.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@

@stable begin

# `Typstry`

"""
Expand Down Expand Up @@ -94,8 +92,6 @@ struct TypstText{T}
value::T
end

end # @stable

"""
@typst_str(s)
typst"s"
Expand Down Expand Up @@ -159,8 +155,6 @@ macro typst_str(s)
:(TypstString(TypstText($_s)))
end

@stable begin

# Internals

"""
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -991,5 +985,3 @@ const preamble = typst"""
#set page(margin: 1em, height: auto, width: auto, fill: white)
#set text(16pt, font: "JuliaMono")
"""

end # @stable
2 changes: 0 additions & 2 deletions test/LocalPreferences.toml

This file was deleted.

17 changes: 2 additions & 15 deletions test/TestDocumenter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 96c9d81

Please sign in to comment.