Skip to content

Conversation

@benlorenz
Copy link
Member

@benlorenz benlorenz commented Sep 26, 2025

@fingolfin @lgoettgens

I just had a look at the log for the docbuild after #5381 and it looks like this might cause issues once the compat entries of the latest Oscar release and the dev version diverge:

Run julia --project=. --color=yes -e 'using Oscar; Oscar.doc_init(; path="docs/")'

   Resolving package versions...
   Installed msolve_jll ─────── v0.800.1+0
   Installed AlgebraicSolving ─ v0.9.2
   Installed Oscar ──────────── v1.5.0
    Updating `~/work/Oscar.jl/Oscar.jl/docs/Project.toml`
  [c3fe647b] + AbstractAlgebra v0.47.3 `~/.julia/packages/AbstractAlgebra/T6WZD`
  [e30172f5] + Documenter v1.14.1
⌅ [daee34ce] + DocumenterCitations v1.3.7
  [c863536a] + GAP v0.15.3 `~/.julia/packages/GAP/rBIpJ`
  [3e1990a7] + Hecke v0.38.6 `~/.julia/packages/Hecke/e3v2R`
  [682c06a0] + JSON v0.21.4
  [2edaba10] + Nemo v0.52.1 `~/.julia/packages/Nemo/IYwMw`
  [f1435218] + Oscar v1.5.0
  [d720cf60] + Polymake v0.13.2 `~/.julia/packages/Polymake/3ALS3`
  [bcd08a7b] + Singular v0.26.0 `~/.julia/packages/Singular/mSn49`
...
   Resolving package versions...
    Updating `~/work/Oscar.jl/Oscar.jl/docs/Project.toml`
  [f1435218] ~ Oscar v1.5.0 ⇒ v1.6.0-DEV `~/work/Oscar.jl/Oscar.jl`

https://github.com/oscar-system/Oscar.jl/actions/runs/18030785975/job/51306551662?pr=5381#step:6:20

The code is trying to activate the docs-project, then adds various dependencies in the exact versions that are currently loaded and will then add Oscar from the current path.

But with the new Oscar entries in the Project.toml this will always try to include a released Oscar version (v1.5.0 in the log above) when the code was supposed to just add the dependencies, this will fail when dev needs different dependencies. (docs build happens with julia 1.10)
I adjusted it to dev Oscar in the same call which should hopefully avoid this.

Note that the default operation of build_doc is to copy the Project.toml for the docs to a temporary directory, which makes .. useless, but it doesn't matter since the path is fixed by the develop call anyway. The reason for that is that way too often people were having issues building the docs because of an outdated manifest in the docs folder.

Alternative

While looking at this I think we could get rid of all the develop stuff (and the Oscar entry in the deps) and maybe avoid some issues with outdated manifests if we use stacked environments.
Basically we could make sure the docs project only has Documenter in it and put something like this at the top of docs/make.jl:

using Pkg
path = @__DIR__
Pkg.activate(path) do
	Pkg.instantiate()
end
path in Base.LOAD_PATH || pushfirst!(Base.LOAD_PATH, path)

Then this could be run with the Oscar project as active project and doesn't need any extra resolving:

julia --project=. docs/make.jl

Similarly build_doc would just need to make sure the project is instantiated and push it to the load path (as it currently does) but we could remove all Oscar related packages from that project.

The advantage would be that the Manifest for the docs only contains documenter related packages which are a lot less likely to be outdated and cause resolve errors.

@fingolfin fingolfin added release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes triage labels Sep 30, 2025
@fingolfin
Copy link
Member

I think we should merge this for now to address the immediate issue.

But I am very much interested in investigating the alternative, and possibly combining it with the ideas I hint at in Nemocas/AbstractAlgebra.jl#2175.

Basically one of the ideas there is have also Revise in the mix, so that power users who want to rebuild the manual multiple times in a single session can still do so, just that instead of using Revise, Oscar ; Oscar.build_doc(SOME_ARGS) they'd do something like using Revise, Oscar ; includet("docs/make.jl") ; build_doc(SOME_ARGS) (here build_doc would not be defined in Oscar but in make.jl).

There's more to it, but basically I would hope we could get rid of a bunch of things in the current setup that really abuse the system without loosing much if any accessibility.

(In fact I'd also consider putting the using Revise, Oscar into docs/make.jl ; so that you can do julia docs/make.jl or even julia -i docs/make.jl : with the -i, we end up loading Revise and Oscar, build the docs, but then stay in the REPL so that one can build the docs again as desired. Since using Revise, Oscar does nothing if Revise and Oscar are already loaded, both ways of invoking things would work.

@fingolfin fingolfin merged commit d040fa2 into master Oct 1, 2025
31 of 34 checks passed
@fingolfin fingolfin deleted the bl/fixupdocsproj branch October 1, 2025 10:15
@lgoettgens lgoettgens removed the triage label Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants