-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Fix building docs on Windows #6945
Conversation
Yes, this sounds good to me. |
// The bsd module can't be build on Windows, so we completely ignore it, even | ||
// when building documentation. | ||
#[cfg(unix)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should abstract this into a macro that better describes what we are doing? Something like cfg_ignore_in_windows_docs!
?
With these changes, the windows docs can be build with |
Let's not try to fix the broken links. Can we silence the warnings? |
We could add |
Works for me. |
This should allow documentation to be buildable on Windows when On a side note, I'm not sure why the changes I made to the docs job of the CI workflow result in a |
To me, current changes looks fine.
Since this PR update the docs workflow, I guess the repository's branch protection settings is relevant here? |
I've updated the branch protection rules. Regarding improving docs support on Windows ... I guess we could. But we would need to repeat all the hacks we use to make windows docs show up on Linux. |
I believe this fixes #6625 by only building the
io::bsd
module on Unix machines, in accordance with #6625 (comment). Putting the#[cfg(unix)]
outside of thecfg_aio!
macro felt less intrusive, as the macro is also used inio::Interest
.1 I haven't yet tested this on Windows (or via cross-compilation).While creating this PR I checked out the build logs from docs.rs and saw that the two Windows builds there are broken as well. I want to replicate how docs.rs builds the docs for Windows and fix them, too, so starting this PR as a draft.
I wonder if building the docs on Windows would be a good idea to add to CI, to guard against future regressions?
Footnotes
We should be able to build
Interest
on Windows with--cfg docsrs
without problems. ↩