Skip to content

Commit 12b91d4

Browse files
committed
fix 'unresolved import' issue
it does not work to have these feature guards currently until rustc issue #8811 ([1]) is fixed since we just get errors running `cargo test` or `cargo doc` otherwise. the problem stems from the fact that `--cfg doc` will be used for compiling the main crate being processed but not its dependencies, thus here the re-exports are enabled in the binding crate, but not the actual items in the sys crate, and thus 'unresolved import' errors occur, complaining about not being able to find the items in the sys crate. note, it obviously would not hurt to just have these string constants unguarded, but i felt that it would be perhaps nicer to use the guards and associated feature documentation to highlight the version requirement for the use of these two significant properties. [1]: rust-lang/cargo#8811
1 parent 612d5cb commit 12b91d4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pulse-sys/src/proplist.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -294,12 +294,14 @@ pub const PA_PROP_FORMAT_CHANNEL_MAP: &str = "format.channel_map";
294294
/// For context: whether to forcefully disable data transfer via POSIX or memfd shared memory.
295295
/// This property overrides any other client configuration which would otherwise enable SHM
296296
/// communication channels.
297-
#[cfg(any(doc, feature = "pa_v15"))]
297+
//TODO: enable this feature gate once the passing of `--cfg doc` to dependencies is fixed (https://github.com/rust-lang/cargo/issues/8811)
298+
//#[cfg(any(doc, feature = "pa_v15"))]
298299
#[cfg_attr(docsrs, doc(cfg(feature = "pa_v15")))]
299300
pub const PA_PROP_CONTEXT_FORCE_DISABLE_SHM: &str = "context.force.disable.shm";
300301

301302
/// For a bluez device: the currently selected codec name.
302-
#[cfg(any(doc, feature = "pa_v15"))]
303+
//TODO: enable this feature gate once the passing of `--cfg doc` to dependencies is fixed (https://github.com/rust-lang/cargo/issues/8811)
304+
//#[cfg(any(doc, feature = "pa_v15"))]
303305
#[cfg_attr(docsrs, doc(cfg(feature = "pa_v15")))]
304306
pub const PA_PROP_BLUETOOTH_CODEC: &str = "bluetooth.codec";
305307

0 commit comments

Comments
 (0)