Windows x86_64 v1 is cmpxchg16b+sse3 (rust's windows baseline) so it gets its real target instead of custom
Browse files at this commit510fe001b82e7b726835f0d064f07095afd813b4Parent: b2fc28a- fix
- windows x86_64 v1 is cmpxchg16b+sse3 (rust's windows baseline) so it gets its real target instead of custom
- PowerShell progress silenced. Published releases drop the online count, the Clients card is the one place for who runs what
6 changed files +9 -34
- crates/client/build.rs +3 -1
- crates/client/src/gui/builder/releases.rs +2 -15
- crates/client/src/release.rs +1 -0
- crates/common/src/model.rs +0 -1
- crates/server/src/call/release.rs +3 -8
- crates/server/src/hub.rs +0 -9
crates/client/build.rsmodified+3 -1
| @@ -21,6 +21,7 @@ const COLORS: [&str; 10] = [ | ||
| 21 | 21 | ]; |
| 22 | 22 | const SCALES: [&str; 6] = ["space", "radius", "stroke", "text", "size", "leading"]; |
| 23 | 23 | const V1: &[&str] = &["fxsr", "sse", "sse2"]; |
| 24 | +const V1_WINDOWS: &[&str] = &["cmpxchg16b", "fxsr", "sse", "sse2", "sse3"]; | |
| 24 | 25 | const V3: &[&str] = &[ |
| 25 | 26 | "avx", |
| 26 | 27 | "avx2", |
| @@ -379,7 +380,8 @@ fn target() { | ||
| 379 | 380 | .collect(); |
| 380 | 381 | features.sort_unstable(); |
| 381 | 382 | let target = match (arch.as_str(), features.as_slice()) { |
| 382 | - ("x86_64", V1) => format!("x86_64_v1-{os}"), | |
| 383 | + ("x86_64", V1) if os != "windows" => format!("x86_64_v1-{os}"), | |
| 384 | + ("x86_64", V1_WINDOWS) if os == "windows" => format!("x86_64_v1-{os}"), | |
| 383 | 385 | ("x86_64", V3) => format!("x86_64_v3-{os}"), |
| 384 | 386 | ("x86_64", _) => "custom".to_string(), |
| 385 | 387 | _ => format!("{arch}-{os}"), |
crates/client/src/gui/builder/releases.rsmodified+2 -15
| @@ -4,7 +4,7 @@ use common::{ | ||
| 4 | 4 | }; |
| 5 | 5 | use gpui_kit::{ |
| 6 | 6 | AnyElement, Context, Div, Entity, Hsla, IntoElement, ParentElement, PathPromptOptions, Styled, |
| 7 | - Task, Window, assets::IconName, component::Icon, div, px, | |
| 7 | + Task, Window, div, px, | |
| 8 | 8 | }; |
| 9 | 9 | use std::{path::PathBuf, time::Duration}; |
| 10 | 10 | |
| @@ -16,7 +16,7 @@ use crate::gui::{ | ||
| 16 | 16 | entity_action, millis_time, notify_error, |
| 17 | 17 | parts::{self, Fill, Press}, |
| 18 | 18 | storage, |
| 19 | - style::{size, space, text}, | |
| 19 | + style::{space, text}, | |
| 20 | 20 | text, |
| 21 | 21 | }; |
| 22 | 22 | use crate::lang::w; |
| @@ -306,7 +306,6 @@ fn release_row( | ||
| 306 | 306 | .map(|file| file.target.as_str()) |
| 307 | 307 | .collect::<Vec<_>>() |
| 308 | 308 | .join(", "); |
| 309 | - let online: u64 = release.files.iter().map(|file| file.online).sum(); | |
| 310 | 309 | let control = if pending && !required { |
| 311 | 310 | parts::button( |
| 312 | 311 | format!("confirm_release_{seq}"), |
| @@ -355,18 +354,6 @@ fn release_row( | ||
| 355 | 354 | millis_time(release.created_ms, w().common.date), |
| 356 | 355 | palette.muted, |
| 357 | 356 | )) |
| 358 | - .child( | |
| 359 | - div() | |
| 360 | - .flex() | |
| 361 | - .items_center() | |
| 362 | - .gap(px(space::XS)) | |
| 363 | - .child( | |
| 364 | - Icon::new(IconName::Users) | |
| 365 | - .size(px(size::ICON)) | |
| 366 | - .text_color(palette.muted), | |
| 367 | - ) | |
| 368 | - .child(caption_text(online.to_string(), palette.muted)), | |
| 369 | - ) | |
| 370 | 357 | .child(control) |
| 371 | 358 | } |
| 372 | 359 |
crates/client/src/release.rsmodified+1 -0
| @@ -328,6 +328,7 @@ fn scp(key: &Path) -> Command { | ||
| 328 | 328 | } |
| 329 | 329 | |
| 330 | 330 | fn ps(key: &Path, script: &str) -> Command { |
| 331 | + let script = format!("$ProgressPreference = 'SilentlyContinue'\n{script}"); | |
| 331 | 332 | let bytes: Vec<u8> = script.encode_utf16().flat_map(u16::to_le_bytes).collect(); |
| 332 | 333 | let mut cmd = ssh(key); |
| 333 | 334 | cmd.args([ |
crates/common/src/model.rsmodified+0 -1
| @@ -444,7 +444,6 @@ pub struct ReleaseFile { | ||
| 444 | 444 | pub target: String, |
| 445 | 445 | pub size: u64, |
| 446 | 446 | pub packed: u64, |
| 447 | - pub online: u64, | |
| 448 | 447 | } |
| 449 | 448 | |
| 450 | 449 | #[derive(Debug, Clone, PartialEq, Eq, Encode, Decode)] |
crates/server/src/call/release.rsmodified+3 -8
| @@ -12,7 +12,7 @@ use crate::{ | ||
| 12 | 12 | publish::To, |
| 13 | 13 | }; |
| 14 | 14 | |
| 15 | -fn info(entry: db::release::Entry, builds: &[Sha]) -> ReleaseInfo { | |
| 15 | +fn info(entry: db::release::Entry) -> ReleaseInfo { | |
| 16 | 16 | ReleaseInfo { |
| 17 | 17 | seq: entry.seq, |
| 18 | 18 | required: entry.required, |
| @@ -21,7 +21,6 @@ fn info(entry: db::release::Entry, builds: &[Sha]) -> ReleaseInfo { | ||
| 21 | 21 | .files |
| 22 | 22 | .into_iter() |
| 23 | 23 | .map(|file| ReleaseFile { |
| 24 | - online: builds.iter().filter(|build| **build == file.file).count() as u64, | |
| 25 | 24 | target: file.target, |
| 26 | 25 | size: file.size, |
| 27 | 26 | packed: file.packed, |
| @@ -32,13 +31,9 @@ fn info(entry: db::release::Entry, builds: &[Sha]) -> ReleaseInfo { | ||
| 32 | 31 | |
| 33 | 32 | impl Handle for ListReleases { |
| 34 | 33 | async fn handle(self, _: Me, cx: &mut Cx<'_>) -> Result<Vec<ReleaseInfo>, ServerError> { |
| 35 | - let builds = cx.sh.services.hub.builds(); | |
| 36 | 34 | let entries = db::release::entries(cx.db).await?; |
| 37 | 35 | |
| 38 | - Ok(entries | |
| 39 | - .into_iter() | |
| 40 | - .map(|entry| info(entry, &builds)) | |
| 41 | - .collect()) | |
| 36 | + Ok(entries.into_iter().map(info).collect()) | |
| 42 | 37 | } |
| 43 | 38 | } |
| 44 | 39 | |
| @@ -88,7 +83,7 @@ impl Handle for PublishRelease { | ||
| 88 | 83 | cx.sh.releases.discard(&stopped); |
| 89 | 84 | cx.emit(To::Everyone, Event::Release); |
| 90 | 85 | |
| 91 | - Ok(info(entry, &cx.sh.services.hub.builds())) | |
| 86 | + Ok(info(entry)) | |
| 92 | 87 | } |
| 93 | 88 | } |
| 94 | 89 |
crates/server/src/hub.rsmodified+0 -9
| @@ -170,15 +170,6 @@ impl Hub { | ||
| 170 | 170 | total |
| 171 | 171 | } |
| 172 | 172 | |
| 173 | - pub fn builds(&self) -> Vec<Sha> { | |
| 174 | - self.0 | |
| 175 | - .lock() | |
| 176 | - .unwrap() | |
| 177 | - .values() | |
| 178 | - .filter_map(|client| client.build) | |
| 179 | - .collect() | |
| 180 | - } | |
| 181 | - | |
| 182 | 173 | pub fn installs(&self) -> Vec<Install> { |
| 183 | 174 | self.0 |
| 184 | 175 | .lock() |