Skip to content

doc: Get stdlib dir from make system rather than executable #58530

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

Merged
merged 1 commit into from
May 27, 2025

Conversation

Keno
Copy link
Member

@Keno Keno commented May 26, 2025

The make.jl docsystem driver was using Sys.STDLIB as the canonical list and location of stdlibs. When make.jl is invoked as part of the make system (e.g. make -C doc), I think it makes more sense to use make's idea of where the stdlibs are. Of course, if you're using a just-built julia to create the docs, these two notions are identical. However, the docsystem build supports (explicitly via the JULIA_EXECUTABLE option), being built with an external julia executable. In this case, we should still use the stdlib source from in tree (as we do with the ordinary base sources). A primary motivation is to let AI agents run the doctests before they submit PRs without having to do a whole julia build.

@Keno Keno added the docsystem The documentation building system label May 26, 2025
Base automatically changed from kf/53039 to master May 27, 2025 03:57
The `make.jl` docsystem driver was using `Sys.STDLIB` as the canonical list
and location of stdlibs. When `make.jl` is invoked as part of the make system
(e.g. `make -C doc`), I think it makes more sense to use make's idea of where
the stdlibs are. Of course, if you're using a just-built julia to create the docs,
these two notions are identical. However, the docsystem build supports (explicitly
via the `JULIA_EXECUTABLE` option), being built with an external julia executable.
In this case, we should still use the stdlib source from in tree (as we do with
the ordinary base sources). A primary motivation is to let AI agents run the
doctests before they submit PRs without having to do a whole julia build.
@Keno Keno force-pushed the kf/intreestdlib branch from aef76bf to a6d8abd Compare May 27, 2025 03:58
@Keno Keno merged commit 8c6e4ad into master May 27, 2025
4 of 7 checks passed
@Keno Keno deleted the kf/intreestdlib branch May 27, 2025 12:52
@fredrikekre
Copy link
Member

On Windows CI:

ERROR: LoadError: IOError: readdir("C:\\workdir\\usr\\share\\julia\\stdlib\\vcut"): no such file or directory (ENOENT)
Stacktrace:
[1] _uv_error(prefix::String, c::Int32)
@ Base .\libuv.jl:107
[2] uv_error
@ .\libuv.jl:106 [inlined]
[3] _readdir(dir::SubString{String}; return_objects::Bool, join::Bool, sort::Bool)
@ Base.Filesystem .\file.jl:1075
[4] _readdir
@ .\file.jl:1068 [inlined]
[5] readdir
@ .\file.jl:997 [inlined]
[6] (::var"#8#9")()
@ Main C:\workdir\doc\make.jl:54
[7] cd(f::var"#8#9", dir::String)
@ Base.Filesystem .\file.jl:101
[8] top-level scope
@ C:\workdir\doc\make.jl:51
[9] include(mod::Module, _path::String)
@ Base .\Base.jl:309
[10] exec_options(opts::Base.JLOptions)
@ Base .\client.jl:331
[11] _start()
@ Base .\client.jl:564
in expression starting at C:\workdir\doc\make.jl:51
make[3]: *** [Makefile:57: html] Error 1
make[3]: Leaving directory '/c/workdir/doc'
make[2]: *** [Makefile:125: docs] Error 2
make[1]: *** [/c/workdir/Makefile:66: /c/workdir/doc/_build/html/en/index.html] Error 2
make: *** [Makefile:584: binary-dist] Error 2

@Keno
Copy link
Member Author

Keno commented May 27, 2025

Sorry. #58536.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docsystem The documentation building system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants