diff --git a/docs/make.jl b/docs/make.jl index eec305031454..9f608aa9ed1e 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -2,7 +2,7 @@ using Documenter, Oscar include(normpath(joinpath(Oscar.oscardir, "docs", "make_work.jl"))) -BuildDoc.doit(Oscar; strict=true, local_build=false, doctest=false) +BuildDoc.doit(Oscar; warnonly=false, local_build=false, doctest=false) deploydocs( repo = "github.com/oscar-system/Oscar.jl.git", diff --git a/docs/make_work.jl b/docs/make_work.jl index ee76b33dd7b2..c2c5c347d5eb 100644 --- a/docs/make_work.jl +++ b/docs/make_work.jl @@ -111,7 +111,7 @@ end function doit( Oscar::Module; - strict::Bool=true, + warnonly=false, local_build::Bool=false, doctest::Union{Bool,Symbol}=true, ) @@ -189,7 +189,7 @@ function doit( modules=[Oscar, Oscar.Hecke, Oscar.Nemo, Oscar.AbstractAlgebra, Oscar.Singular], clean=true, doctest=false, - strict=strict, + warnonly=warnonly, checkdocs=:none, pages=doc, ) diff --git a/src/utils/docs.jl b/src/utils/docs.jl index e8e3541a9e79..ff13b488b733 100644 --- a/src/utils/docs.jl +++ b/src/utils/docs.jl @@ -133,7 +133,7 @@ function start_doc_preview_server(;open_browser::Bool = true, port::Int = 8000) end @doc raw""" - build_doc(; doctest=false, strict=false, open_browser=true, start_server=false) + build_doc(; doctest=false, warnonly=true, open_browser=true, start_server=false) Build the manual of `Oscar.jl` locally and open the front page in a browser. @@ -149,9 +149,11 @@ doctests are run with >= 1.7. Using a different Julia version may produce errors in some parts of Oscar, so please be careful, especially when setting `doctest=:fix`. -The optional parameter `strict` is passed on to `makedocs` of `Documenter.jl` -and if set to `true` then according to the manual of `Documenter.jl` "a +The optional parameter `warnonly` is passed on to `makedocs` of `Documenter.jl` +and if set to `false` then according to the manual of `Documenter.jl` "a doctesting error will always make makedocs throw an error in this mode". +Alternatively, one can pass a list of symbols to `warnonly` to suppress +errors for the given error types. To prevent the opening of the browser at the end, set the optional parameter `open_browser` to `false`. @@ -177,11 +179,10 @@ using Revise, Oscar; The first run of `build_doc` will take the usual few minutes, subsequent runs will be significantly faster. """ -function build_doc(; doctest::Union{Symbol, Bool} = false, strict::Bool = false, open_browser::Bool = true, start_server::Bool = false) +function build_doc(; doctest::Union{Symbol, Bool} = false, warnonly = true, open_browser::Bool = true, start_server::Bool = false) versioncheck = (VERSION.major == 1) && (VERSION.minor >= 7) - versionwarn = -"The Julia reference version for the doctests is 1.7 or later, but you are using -$(VERSION). Running the doctests will produce errors that you do not expect." + versionwarn = """The Julia reference version for the doctests is 1.7 or later, but you are using + $(VERSION). Running the doctests will produce errors that you do not expect.""" if doctest != false && !versioncheck @warn versionwarn end @@ -189,7 +190,7 @@ $(VERSION). Running the doctests will produce errors that you do not expect." doc_init() end Pkg.activate(docsproject) do - Base.invokelatest(Main.BuildDoc.doit, Oscar; strict=strict, local_build=true, doctest=doctest) + Base.invokelatest(Main.BuildDoc.doit, Oscar; warnonly=warnonly, local_build=true, doctest=doctest) end if start_server start_doc_preview_server(open_browser = open_browser)