generated from EmbarkStudios/opensource-template
-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
minidumper
's API reference does not mention that a socket name uses a different address type depending on whether it is provided as &str
or &Path
, which took us a few hours to figure out why our client (which used str
passed by JSON) could not connect to the server (which used Path
).
Describe the solution you'd like
I propose making minidumper::ipc::SocketName
public and removing the implicit conversion via SocketName: From<&
{str
,Path
}>
, requiring the caller to explicitly specify an address type.
// Named socket
let temp = tempdir();
Server::with_name(SocketName::Path(&temp.path().join("foo.sock")));
// Abstract socket
#[cfg(any(target_os = "linux", target_os = "android"))]
{
Server::with_name(SocketName::Abstract(b"foo"));
}
Describe alternatives you've considered
Alternatively, this issue could be somewhat mitigated by clearer documentation:
- Document in
minidumper::{Server,Client}::with_name
howname
is processed. - Or add a section to the crate-level documentation describing how a socket name is specified.
- Or make
minidumper::ipc::SocketName
visible in the documentation and add a note about the difference betweenFrom<&
{str
,Path
}>
.
Additional context
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request