Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions masonry_core/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ The screenshots are stored using git LFS, which adds some minor complications bu

We include some of the screenshots in the documentation; because `docs.rs` doesn't have access to LFS files, we use the `include_screenshot!` to instead link to `https://media.githubusercontent.com` when building doc for `docs.rs`.

**Note:** The above may or may not be true at the time you read this document.
We've had problems with the `docsrs` flag and Github's handling of LFS files.
See also https://github.com/linebender/xilem/issues/851.

## VS Code markers

Masonry uses VS Code markers to help users browse code with the minimap:
Expand Down
19 changes: 18 additions & 1 deletion masonry_core/src/testing/screenshots.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

use image::{GenericImageView as _, Pixel as _, Rgb, RgbImage};

#[cfg(docsrs)]
// TODO - Re-enable this once we find a way to load screenshots that doesn't go against our
// storage quotas.
#[cfg(FALSE)]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rust-lang/rust#138632

cfg(false) should be stable in 6 weeks!

#[doc(hidden)]
#[macro_export]
macro_rules! include_screenshot {
Expand All @@ -19,6 +21,21 @@ macro_rules! include_screenshot {
};
}

#[cfg(docsrs)]
Comment thread
xStrom marked this conversation as resolved.
Outdated
#[doc(hidden)]
#[macro_export]
macro_rules! include_screenshot {
($path:literal $(, $caption:literal)? $(,)?) => {
// On docsrs we just remove the screenshot links for now.
" "
};
}

// FIXME - We're essentially completely disabling screenshots, period.
// Hopefully we'll be able to re-enable them soon.
// See https://github.com/linebender/xilem/issues/851

#[cfg(FALSE)]
#[cfg(not(docsrs))]
#[doc(hidden)]
#[macro_export]
Expand Down
Loading