Skip to content

fix: make sphinxdocs support directory inputs #2375

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
Nov 7, 2024

Conversation

rickeylev
Copy link
Collaborator

The logic to relocate files assumed that all the inputs were plain file artifacts. When
a directory artifact was used, then ctx.actions.symlink() would fail because it requires
the output artifact and input target artifact to be the same type of file (plain file or
directory).

To fix, use File.is_directory to detect if the input is a directory or file, then call
declare_file() or declare_directory() as appropriate. The later symlink() call is
then happy the two args match.

Fixes #2374

@rickeylev rickeylev requested a review from aignas as a code owner November 6, 2024 03:16
@rickeylev rickeylev added this pull request to the merge queue Nov 6, 2024
Merged via the queue into bazel-contrib:main with commit 2038975 Nov 7, 2024
4 checks passed
@rickeylev rickeylev deleted the sphinxdocs.dir.inputs branch December 5, 2024 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support directory sources in sphinx_docs_library
2 participants