Skip to content

Commit 8ca1b5c

Browse files
committed
wip
1 parent 2edfed6 commit 8ca1b5c

File tree

3 files changed

+9
-33
lines changed

3 files changed

+9
-33
lines changed

src/MultiDocumenter.jl

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,7 @@ function walk_outputs(f, root, docs::Vector{MultiDocRef}, dirs::Vector{String})
7474
p = joinpath(root, ref.path)
7575
for dir in dirs
7676
dirpath = joinpath(p, dir)
77-
if !_windows_symlink_wrapper(isdir, dirpath)
78-
continue
79-
end
77+
isdir(dirpath) || continue
8078
DocumenterTools.walkdocs(dirpath, DocumenterTools.isdochtml) do fileinfo
8179
f(relpath(dirname(fileinfo.fullpath), root), fileinfo.fullpath)
8280
end
@@ -483,30 +481,4 @@ function inject_styles_and_global_navigation(
483481
end
484482
end
485483

486-
function _windows_symlink_wrapper(f::Base.Callable, path::AbstractString)
487-
if Sys.iswindows() && islink(path)
488-
if isinteractive()
489-
@warn """
490-
A symlink was ignored for $(f) at $(path)
491-
This only happens when running interactive on Windows."""
492-
return false
493-
else
494-
throw(SymlinkOnWindowsError())
495-
end
496-
end
497-
return f(path)
498-
end
499-
500-
struct SymlinkOnWindowsError <: Exception end
501-
function Base.showerror(io::IO, err::SymlinkOnWindowsError)
502-
print(
503-
io,
504-
"""
505-
SymlinkOnWindowsError: this builds requires symlinks, but these are not properly supported in Windows
506-
You can still run the build interactively for debugging/testing (i.e. in the REPL), but the
507-
build will not exactly match the full build.""",
508-
)
509-
print(io, err.msg)
510-
end
511-
512484
end

src/documentertools/canonical_urls.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ function update_canonical_links(docs_directory::AbstractString; canonical::Abstr
102102
# directory will likely be the redirect. Also, links should be pointing to other
103103
# versions, so we'll skip them too.
104104
# Note: we need to check islink() first, because on windows, calling isdir() on a
105-
# symlink can make it throw a permissions IOError...
105+
# symlink can make it throw a permissions IOError.
106106
if islink(path) || !isdir(path)
107107
continue
108108
end

test/runtests.jl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,16 @@ MultiDocumenter.make(
170170
@test occursin("Infiltrator.jl", store_content)
171171
@test occursin("@infiltrate", store_content)
172172
# We can't traverse symlinks on Windows, so stable/ things do not get
173-
# written into the search index.
174-
if !Sys.iswindows()
173+
# written into the search index. Instead, it looks like we write dev/
174+
if Sys.iswindows()
175+
@test !occursin("$(rootpath)inf/stable/", store_content)
176+
@test !occursin("$(rootpath)inf/stable/", store_content)
177+
@test occursin("/inf/dev/", store_content)
178+
else
175179
@test occursin("$(rootpath)inf/stable/", store_content)
176180
@test occursin("$(rootpath)inf/stable/", store_content)
181+
@test !occursin("/inf/dev/", store_content)
177182
end
178-
@test !occursin("/inf/dev/", store_content)
179183
end
180184

181185
@testset "sitemap" begin

0 commit comments

Comments
 (0)