-
Notifications
You must be signed in to change notification settings - Fork 14
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
Building fails with vendored dependencies #20
Comments
What is the exact error? Perhaps when no documentation is found, we could chose to either ignore it, or try to emit a warning. Or generate a text explaining the documentation were not found. The mitigation is to make the crate optional as explained https://docs.rs/document-features/latest/document_features/#compatibility and to not enable this when building the docs as vendored |
Yeah, I think this is my fault for not correctly setting the dependency as optional in Specta as specified in the docs. Must have just missed it. 🤦 |
The proposed mitigation to gate
I think, for now, the best thing to do is to remove the error case entirely, and accept an empty set of features. |
One might reasonably suggest using a warning instead of an error in this case. Unfortunately, warning-level diagnostics in procedural macros are gated behind |
Just filed a Cargo issue to see if we might be able to resolve this upstream: rust-lang/cargo#13191 |
Ed Page from the Cargo team recommends that fallback to Ed also points to rust-lang/cargo#4956 as a place for interesting discussion, where there is a proposal to add TOML fields for feature descriptions. |
the crate already fallback to the .toml.orig file. In your case, that file probably does not exist. I've made it an error because I thought someone using the crate without any feature would mean something is wrong and the programmer should be notified (eg, parse error on our misuse of the crate). |
Re-implements gfx-rs#4886 (CC @Wumpf) without the `document-features` crate, which has issues integrating into Firefox builds after being `cargo vendor`ed into its repository. This issue is being tracked against slint-ui/document-features#20. Once resolved, I expect that we will want to revert this PR in its entirety, since `document-features` is still a good addition to `wgpu`'s documentation story. Internally, consensus has already been achieved for this change. Firefox's ability to build unfortunately take priority over this particular convenience. Hopefully, we won't have to compromise shortly! I tested this by ensuring that the HTML output of our existing `document_features::document_features!(…)` usage was exactly the same. There should be exactly zero regressions in the current state of documentation for users. For maintainers, I have added a disclaimer that one needs to keep changes in sync. with the relevant `Cargo.toml` manifests.
Re-implements #4886 (CC @Wumpf) without the `document-features` crate, which has issues integrating into Firefox builds after being `cargo vendor`ed into its repository. This issue is being tracked against slint-ui/document-features#20. Once resolved, I expect that we will want to revert this PR in its entirety, since `document-features` is still a good addition to `wgpu`'s documentation story. Internally, consensus has already been achieved for this change. Firefox's ability to build unfortunately take priority over this particular convenience. Hopefully, we won't have to compromise shortly! I tested this by ensuring that the HTML output of our existing `document_features::document_features!(…)` usage was exactly the same. There should be exactly zero regressions in the current state of documentation for users. For maintainers, I have added a disclaimer that one needs to keep changes in sync. with the relevant `Cargo.toml` manifests.
Re-implements gfx-rs#4886 (CC @Wumpf) without the `document-features` crate, which has issues integrating into Firefox builds after being `cargo vendor`ed into its repository. This issue is being tracked against slint-ui/document-features#20. Once resolved, I expect that we will want to revert this PR in its entirety, since `document-features` is still a good addition to `wgpu`'s documentation story. Internally, consensus has already been achieved for this change. Firefox's ability to build unfortunately take priority over this particular convenience. Hopefully, we won't have to compromise shortly! I tested this by ensuring that the HTML output of our existing `document_features::document_features!(…)` usage was exactly the same. There should be exactly zero regressions in the current state of documentation for users. For maintainers, I have added a disclaimer that one needs to keep changes in sync. with the relevant `Cargo.toml` manifests.
Re-implements #4886 (CC @Wumpf) without the `document-features` crate, which has issues integrating into Firefox builds after being `cargo vendor`ed into its repository. This issue is being tracked against slint-ui/document-features#20. Once resolved, I expect that we will want to revert this PR in its entirety, since `document-features` is still a good addition to `wgpu`'s documentation story. Internally, consensus has already been achieved for this change. Firefox's ability to build unfortunately take priority over this particular convenience. Hopefully, we won't have to compromise shortly! I tested this by ensuring that the HTML output of our existing `document_features::document_features!(…)` usage was exactly the same. There should be exactly zero regressions in the current state of documentation for users. For maintainers, I have added a disclaimer that one needs to keep changes in sync. with the relevant `Cargo.toml` manifests.
Because this could happen if the Cargo.toml is "normalized". Instead, show a note in the documentation Fixes #20
Because this could happen if the Cargo.toml is "normalized". Instead, show a note in the documentation Fixes #20
Fixed in 0.2.8 |
Revert "docs: inline `document-features` usage, remove dep." This reverts commit 3d5bec6, with an update to `document-features`, and preferring to keep new `feature` content. To be clear, the only difference I have observed is the addition of the `serde` feature. In case it shortens anyone's search, the specific issue resolved is [`slint-ui/document-features`#20](slint-ui/document-features#20).
This reverts commit 3d5bec6, with an update to `document-features`, and preferring to keep new `feature` content. To be clear, the only difference I have observed is the addition of the `serde` feature. In case it shortens anyone's search, the specific issue resolved is [`slint-ui/document-features`#20](slint-ui/document-features#20).
* docs: sync. `wgpu/Cargo.toml` feature comments with `lib.rs` * Revert "docs: inline `document-features` usage, remove dep." This reverts commit 3d5bec6, with an update to `document-features`, and preferring to keep new `feature` content. To be clear, the only difference I have observed is the addition of the `serde` feature. In case it shortens anyone's search, the specific issue resolved is [`slint-ui/document-features`#20](slint-ui/document-features#20).
Hi, when building a crate which depends on this crate to generate its docs, building fails when using "vendored" dependencies, as cargo will normalize the Cargo.toml and won't create Cargo.toml.orig. Is there anything i can do about that?
The text was updated successfully, but these errors were encountered: