-
-
Notifications
You must be signed in to change notification settings - Fork 401
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
Give better instructions for building the docs #2266
Conversation
Is there any cleaner way to do this? |
Codecov Report
@@ Coverage Diff @@
## master #2266 +/- ##
=======================================
Coverage 91.61% 91.61%
=======================================
Files 42 42
Lines 4451 4451
=======================================
Hits 4078 4078
Misses 373 373 Continue to review full report at Codecov.
|
Not really. Because we need the (base) Oscars-MBP:JuMP oscar$ julia --project=docs docs/make.jl
ERROR: LoadError: ArgumentError: Package JuMP not found in current path:
- Run `import Pkg; Pkg.add("JuMP")` to install the JuMP package.
Stacktrace:
[1] require(::Module, ::Symbol) at ./loading.jl:823
[2] include at ./boot.jl:317 [inlined]
[3] include_relative(::Module, ::String) at ./loading.jl:1044
[4] include(::Module, ::String) at ./sysimg.jl:29
[5] exec_options(::Base.JLOptions) at ./client.jl:266
[6] _start() at ./client.jl:425
in expression starting at /Users/oscar/.julia/dev/JuMP/docs/make.jl:1 |
I'm a bit skeptical, doesn't every package that uses Documenter have the same issue? Is this the workflow they recommend? |
Seems so. The instructions for Travis also have the "dev then build" workflow: Or they suggest modifying We could add |
The docs suggest adding |
Nope. Now that gives (base) Oscars-MBP:JuMP oscar$ julia --project=docs docs/make.jl
ERROR: LoadError: ArgumentError: Package MutableArithmetics not found in current path:
- Run `import Pkg; Pkg.add("MutableArithmetics")` to install the MutableArithmetics package.
Stacktrace:
[1] require(::Module, ::Symbol) at ./loading.jl:823
[2] include at ./boot.jl:317 [inlined]
[3] include_relative(::Module, ::String) at ./loading.jl:1044
[4] include(::Module, ::String) at ./sysimg.jl:29
[5] top-level scope at none:2
[6] eval at ./boot.jl:319 [inlined]
[7] eval(::Expr) at ./client.jl:393
[8] top-level scope at ./none:3
in expression starting at /Users/oscar/.julia/dev/JuMP/src/JuMP.jl:16
ERROR: LoadError: Failed to precompile JuMP [top-level] to /Users/oscar/.julia/compiled/v1.0/JuMP.ji.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1203
[3] _require(::Base.PkgId) at ./loading.jl:960
[4] require(::Base.PkgId) at ./loading.jl:858
[5] require(::Module, ::Symbol) at ./loading.jl:853
[6] include at ./boot.jl:317 [inlined]
[7] include_relative(::Module, ::String) at ./loading.jl:1044
[8] include(::Module, ::String) at ./sysimg.jl:29
[9] exec_options(::Base.JLOptions) at ./client.jl:266
[10] _start() at ./client.jl:425
in expression starting at /Users/oscar/.julia/dev/JuMP/docs/make.jl:2 |
So what's going on in this sequence? I can build the docs fine without following these instructions.
|
In the first one, you have I usually hack on projects by So the options are either
|
Just to chime in, the first time I tried building I think it is a good idea to improve the documentation for the docs building but, if I am not mistaken, the problems I reported in the specific comment cited in the top of this thread seem to have nothing to do with this. Maybe it will be a little confusing to people coming from that comment, or checking the comment before the messages of this PR, what one thing has to do with the other. |
The error you posted, https://pastebin.com/TPg7kH2a, is weird and it looks like you had some trouble loading MathOptInterface. Why is it replacing HTTP? Why couldn't it generate a compiled JSONSchema? I'm not sure what the cause is, but it probably comes from doing something different to these instructions.
To clone a package for development, I go
Then to hack on it
|
I did not know this trick. I will try it today or tomorrow, and check if it solves the problems. |
Should we add a note then about how the distinction between having JuMP "dev'd" in a local or global environment? |
I do not know if it is a bad practice or not. But the solution I adopted for my package was committing the
The most important, of course, is the |
Considering this thread is for giving better doc building instructions I will keep reporting my troubles here, but please tell me if there is a more adequate channel. What I did: > mv ~/.julia{,-1.4.2} # save my old .julia
> julia-1.0.5
julia> dev MathOptInterface
julia> rm MathOptInterface
julia> <CTRL-D>
> cd ~/.julia/dev/MathOptInterface/docs
> julia-1.0.5 --project=. make.jl
ERROR: LoadError: ArgumentError: Package Documenter [e30172f5-a6a5-5a46-863b-614d45cd2de4] is required but does not seem to be installed:
- Run `Pkg.instantiate()` to install all recorded dependencies.
> julia-1.0.5
julia> ]activate .
julia> ]instantiate
julia> <CTRL-D>
> julia-1.0.5 --project=. make.jl
...
[ Info: Populate: populating indices.
ERROR: LoadError: `makedocs` encountered errors. Terminating build
... The new complete log error is here. Some of the strange errors of the past try have disappeared this way (like the HTTP one). But the build keeps failing. Did I follow some step wrong? Nobody has the same problem behavior repeating my steps? |
Oscars-MBP:MathOptInterface oscar$ julia --project=docs
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.0.5 (2019-09-09)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
(docs) pkg> dev .
Resolving package versions...
Updating `~/.julia/dev/MathOptInterface/docs/Project.toml`
[b8f27783] + MathOptInterface v0.9.14 [`..`]
Updating `~/.julia/dev/MathOptInterface/docs/Manifest.toml`
[6e4b80f9] + BenchmarkTools v0.5.0
[b99e7846] + BinaryProvider v0.5.10
[523fee87] + CodecBzip2 v0.6.0
[944b1d66] + CodecZlib v0.6.0
[cd3eb016] + HTTP v0.8.16
[83e8ac13] + IniFile v0.5.0
[7d188eb4] + JSONSchema v0.3.0
[b8f27783] + MathOptInterface v0.9.14 [`..`]
[739be429] + MbedTLS v0.6.8
[d8a4904e] + MutableArithmetics v0.2.10
[bac558e1] + OrderedCollections v1.3.0
[3bb67fe8] + TranscodingStreams v0.9.5
[a5390f91] + ZipFile v0.8.4
[2f01184e] + SparseArrays
[10745b16] + Statistics
(docs) pkg> instantiate
Updating registry at `~/.julia/registries/General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
julia> exit()
Oscars-MBP:MathOptInterface oscar$ julia --project=docs docs/make.jl
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: Doctest: running doctests.
[ Info: ExpandTemplates: expanding markdown templates.
[ Info: CrossReferences: building cross-references.
[ Info: CheckDocument: running document checks.
[ Info: Populate: populating indices.
[ Info: RenderDocument: rendering document.
[ Info: HTMLWriter: rendering HTML pages.
┌ Warning: Documenter could not auto-detect the building environment Skipping deployment.
└ @ Documenter ~/.julia/packages/Documenter/PLD7m/src/deployconfig.jl:41
Oscars-MBP:MathOptInterface oscar$ julia --project=docs
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.0.5 (2019-09-09)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
(docs) pkg> st
Status `~/.julia/dev/MathOptInterface/docs/Project.toml`
[e30172f5] Documenter v0.24.11
[b8f27783] MathOptInterface v0.9.14 [`..`]
(docs) pkg> up
Updating registry at `~/.julia/registries/General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
Resolving package versions...
Updating `~/.julia/dev/MathOptInterface/docs/Project.toml`
[no changes]
Updating `~/.julia/dev/MathOptInterface/docs/Manifest.toml`
[no changes]
(docs) pkg> st
Status `~/.julia/dev/MathOptInterface/docs/Project.toml`
[e30172f5] Documenter v0.24.11
[b8f27783] MathOptInterface v0.9.14 [`..`] |
Thanks for the review. I just pushed greatly simplified instructions. |
Because the current instructions weren't very clear. See, e.g., #2237 (comment).