Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is docs/instantiate.jl obsolete? #2451

Open
goerz opened this issue Feb 13, 2024 · 1 comment
Open

Is docs/instantiate.jl obsolete? #2451

goerz opened this issue Feb 13, 2024 · 1 comment

Comments

@goerz
Copy link
Member

goerz commented Feb 13, 2024

The docs/instantiate.jl file here feels like it's maybe obsolete or at least outdated

# This script can be used to quickly instantiate the docs/Project.toml environment.
using Pkg
documenter_directory = joinpath(@__DIR__, "..")
project_directory = isempty(ARGS) ? @__DIR__() : joinpath(pwd(), ARGS[1])
cd(project_directory) do
Pkg.activate(project_directory)
# Install a DocumenterTools version that declares compatibility with Documenter 0.28,
# but from an unreleased tag.
# https://github.com/JuliaDocs/DocumenterTools.jl/releases/tag/documenter-v0.1.14%2B0.28.0-DEV
if isdir("dev/DocumenterTools")
@info "DocumenterTools already cloned to dev/DocumenterTools"
run(`git -C dev/DocumenterTools fetch origin`)
else
run(`git clone -n https://github.com/JuliaDocs/DocumenterTools.jl.git dev/DocumenterTools`)
end
run(`git -C dev/DocumenterTools checkout documenter-v0.1.17+1.0.0`)
Pkg.develop([
PackageSpec(path = documenter_directory),
PackageSpec(path = "dev/DocumenterTools"),
])
Pkg.instantiate()
end

I'm quite confused as to what this is trying to do with respect to DocumenterTools. It seems to me like DocumenterTools should just be a dependency of Documenter, and act as a re-exported submodule, since we're documenting the usage of DocumenterTools fully inside the Documenter documentation.

As for the "activate the docs environment", maybe #1413 (comment) would be a better approach, and we can just delete docs/instantiate.jl?

@mortenpi
Copy link
Member

mortenpi commented Feb 13, 2024

DocumenterTools has dependencies we don't want in Documenter, hence why it needs to be a separate package. But it accesses Documenter's internals a bit, so it needs Documenter as a dependency.

That said.. I think, right now, we could probably just have DocumenterTools be a normal dependency of docs/Project.toml. These instantiation hoops were necessary when Documenter was making a breaking release.

Including it within the Documenter manual was just a choice we made at some point, mostly to make it more easily discoverable. But I think a MultiDocumenter-approach would be better (i.e. DocumenterTools would build its own manual).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants