Settings refactor (#38367)
Co-Authored-By: Ben K <ben@zed.dev> Co-Authored-By: Anthony <anthony@zed.dev> Co-Authored-By: Mikayla <mikayla@zed.dev> Release Notes: - settings: Major internal changes to settings. The primary user-facing effect is that some settings which did not make sense in project settings files are no-longer read from there. (For example the inline blame settings) --------- Co-authored-by: Ben Kunkle <ben@zed.dev> Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com> Co-authored-by: Anthony <anthony@zed.dev>
This commit is contained in:
co-authored by
Ben Kunkle
Mikayla Maki
Anthony
parent
0a9023bce0
commit
fcdab160f9
@@ -15,8 +15,7 @@ use itertools::Itertools;
|
||||
use parking_lot::Mutex;
|
||||
use release_channel::{AppCommitSha, AppVersion, ReleaseChannel};
|
||||
use rpc::proto::Envelope;
|
||||
use schemars::JsonSchema;
|
||||
use serde::{Deserialize, Serialize};
|
||||
pub use settings::SshPortForwardOption;
|
||||
use smol::{
|
||||
fs,
|
||||
process::{self, Child, Stdio},
|
||||
@@ -54,14 +53,19 @@ pub struct SshConnectionOptions {
|
||||
pub upload_binary_over_ssh: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize, Serialize, JsonSchema)]
|
||||
pub struct SshPortForwardOption {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub local_host: Option<String>,
|
||||
pub local_port: u16,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub remote_host: Option<String>,
|
||||
pub remote_port: u16,
|
||||
impl From<settings::SshConnection> for SshConnectionOptions {
|
||||
fn from(val: settings::SshConnection) -> Self {
|
||||
SshConnectionOptions {
|
||||
host: val.host.into(),
|
||||
username: val.username,
|
||||
port: val.port,
|
||||
password: None,
|
||||
args: Some(val.args),
|
||||
nickname: val.nickname,
|
||||
upload_binary_over_ssh: val.upload_binary_over_ssh.unwrap_or_default(),
|
||||
port_forwards: val.port_forwards,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
|
||||
@@ -25,6 +25,15 @@ pub struct WslConnectionOptions {
|
||||
pub user: Option<String>,
|
||||
}
|
||||
|
||||
impl From<settings::WslConnection> for WslConnectionOptions {
|
||||
fn from(val: settings::WslConnection) -> Self {
|
||||
WslConnectionOptions {
|
||||
distro_name: val.distro_name.into(),
|
||||
user: val.user,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) struct WslRemoteConnection {
|
||||
remote_binary_path: Option<RemotePathBuf>,
|
||||
platform: RemotePlatform,
|
||||
|
||||
Reference in New Issue
Block a user