Skip to content

Visual Studio Code, rebuilt in Rust

Rust

feat(update): add the port release number to the display version

rokartur6cb162f8ef92
diff --git a/native/crates/app/src/cli.rs b/native/crates/app/src/cli.rs
index b18140765ab..570884ddbcb 100644
--- a/native/crates/app/src/cli.rs
+++ b/native/crates/app/src/cli.rs
@@ -18,6 +18,11 @@ use crate::argv::{self, OPTIONS};
use crate::product;
/// `main(argv)`: the process exit code. As cli.js the arguments start after the binary and code.sh's `$CLI`.
+/// `--version` of the app and its CLI: the display version, commit and arch.
+pub fn version_message() -> String {
+ argv::build_version_message(Some(&product::display_version()), product::get("commit").as_str())
+}
+
pub fn main(process_args: Vec<String>, user_data: &Path, working_dir: &Path, app_root: &Path) -> i32 {
let args = process_args.get(2..).unwrap_or_default();
let (parsed, warnings) = match argv::parse_and_validate(args) {
@@ -38,11 +43,11 @@ pub fn main(process_args: Vec<String>, user_data: &Path, working_dir: &Path, app
return 1;
}
if parsed.flag("help") {
- println!("{}", argv::build_help_message(product::name_long(), executable, product("version").unwrap_or_default(), OPTIONS, false, terminal_columns()));
+ println!("{}", argv::build_help_message(product::name_long(), executable, &product::display_version(), OPTIONS, false, terminal_columns()));
return 0;
}
if parsed.flag("version") {
- println!("{}", argv::build_version_message(product("version"), product("commit")));
+ println!("{}", version_message());
return 0;
}
if crate::cli_process::handles(&parsed) {
@@ -360,6 +365,13 @@ fn terminal_columns() -> usize {
mod tests {
use std::path::Path;
+ #[test]
+ fn version_message_names_the_release() {
+ crate::product::load(Path::new(env!("VSCODE_SRC")), false);
+ let release = crate::product::get("release").as_u64().unwrap();
+ assert!(super::version_message().starts_with(&format!("1.148.0.{release}\n")));
+ }
+
#[test]
fn chcp_output_maps_to_the_windows_terminal_encoding() {
assert_eq!(super::windows_terminal_encoding("Active code page: 852\r\n"), Some("cp852"));
diff --git a/native/crates/app/src/diagnostics.rs b/native/crates/app/src/diagnostics.rs
index 073272fb1f5..51b9064de68 100644
--- a/native/crates/app/src/diagnostics.rs
+++ b/native/crates/app/src/diagnostics.rs
@@ -200,7 +200,7 @@ fn format_environment(info: &MainDiagnostics, machine: &Machine) -> String {
let gb = 1024. * 1024. * 1024.;
let load: Vec<String> = machine.load_average.iter().map(|load| format!("{}", load.round())).collect();
[
- format!("Version: {} {} ({}, {})", product("nameShort").unwrap_or_default(), product("version").unwrap_or_default(), product("commit").unwrap_or("Commit unknown".into()), product("date").unwrap_or("Date unknown".into())),
+ format!("Version: {} {} ({}, {})", product("nameShort").unwrap_or_default(), crate::product::display_version(), product("commit").unwrap_or("Commit unknown".into()), product("date").unwrap_or("Date unknown".into())),
format!("OS Version: {} {} {}", machine.os_type, machine.arch, machine.release),
format!("CPUs: {} ({} x {})", machine.cpu_model, machine.cpu_count, machine.cpu_speed),
format!("Memory (System): {:.2}GB ({:.2}GB free)", machine.total_memory / gb, machine.free_memory / gb),
diff --git a/native/crates/app/src/main.rs b/native/crates/app/src/main.rs
index d2c4e95f68f..2f6c86a20e2 100644
--- a/native/crates/app/src/main.rs
+++ b/native/crates/app/src/main.rs
@@ -213,7 +213,7 @@ fn main() -> anyhow::Result<()> {
std::process::exit(cli::main(args, &user_data, &working_dir, &app_root));
}
if args.iter().any(|arg| arg == "--version" || arg == "-v") {
- println!("{}", argv::build_version_message(product::get("version").as_str(), product::get("commit").as_str()));
+ println!("{}", cli::version_message());
return Ok(());
}
let socket = launch::socket_path(&user_data);
@@ -841,10 +841,14 @@ fn run_extension_host(
}
/// package.json `version`, with `-<quality>` on a build that is not stable (`insider`), as gulpfile.vscode.ts writes it.
-static VERSION: std::sync::LazyLock<String> = std::sync::LazyLock::new(|| match product::quality() {
- Some(quality) if quality != "stable" => format!("1.148.0-{quality}"),
- _ => "1.148.0".to_owned(),
-});
+static VERSION: std::sync::LazyLock<String> = std::sync::LazyLock::new(|| version_for_quality(product::quality()));
+
+fn version_for_quality(quality: Option<&str>) -> String {
+ match quality {
+ Some(quality) if quality != "stable" => format!("1.148.0-{quality}"),
+ _ => "1.148.0".to_owned(),
+ }
+}
const ACTIVATED_PREFIX: &str = "eager extensions activated: ";
const HANDSHAKE_PREFIX: &str = "handshake done, pid ";
diff --git a/native/crates/app/src/product.rs b/native/crates/app/src/product.rs
index 6c574d33d33..4dbc13131f9 100644
--- a/native/crates/app/src/product.rs
+++ b/native/crates/app/src/product.rs
@@ -89,6 +89,23 @@ pub mod test_quality {
}
}
+/// The port's version users see: VS Code's `version` with product.json `release` (port/product.json, the port's build
+/// of that VS Code version) as a fourth number, `1.148.0.1` or `1.148.0.1-insider`. Extensions see `crate::VERSION`.
+pub fn display_version() -> String {
+ with_release(get("version").as_str().unwrap_or_default(), get("release").as_u64().unwrap_or(0))
+}
+
+/// `version` with `release` after its patch number; release 0 (a build or feed entry from before releases) adds none.
+pub fn with_release(version: &str, release: u64) -> String {
+ if release == 0 || version.is_empty() {
+ return version.to_owned();
+ }
+ match version.split_once('-') {
+ Some((numbers, quality)) => format!("{numbers}.{release}-{quality}"),
+ None => format!("{version}.{release}"),
+ }
+}
+
pub fn name_long() -> &'static str {
get("nameLong").as_str().expect("port/product.json has nameLong")
}
@@ -108,4 +125,24 @@ mod tests {
assert_eq!(super::get("darwinBundleIdentifier"), "com.rokartur.vsrustium");
assert!(super::get("version").as_str().is_some_and(|version| version.starts_with("1.148")));
}
+
+ #[test]
+ fn display_version_adds_the_release() {
+ assert_eq!(super::with_release("1.148.0", 1), "1.148.0.1");
+ assert_eq!(super::with_release("1.148.0-insider", 12), "1.148.0.12-insider");
+ assert_eq!(super::with_release("1.148.0", 0), "1.148.0");
+ super::load(std::path::Path::new(env!("VSCODE_SRC")), false);
+ let release = super::get("release").as_u64().expect("port/product.json has release");
+ assert!(release > 0);
+ assert_eq!(super::display_version(), format!("1.148.0.{release}"));
+ }
+
+ /// The release is the port's: extensions (init data, gallery and engines checks) keep VS Code's version.
+ #[test]
+ fn extensions_see_the_vscode_version_without_the_release() {
+ super::load(std::path::Path::new(env!("VSCODE_SRC")), false);
+ assert!(super::get("release").as_u64().is_some_and(|release| release > 0));
+ assert_eq!(crate::version_for_quality(Some("stable")), "1.148.0");
+ assert_eq!(crate::version_for_quality(Some("insider")), "1.148.0-insider");
+ }
}
diff --git a/native/crates/app/src/update.rs b/native/crates/app/src/update.rs
index 05e9f540d3d..88746fe0cc1 100644
--- a/native/crates/app/src/update.rs
+++ b/native/crates/app/src/update.rs
@@ -71,6 +71,7 @@ pub enum DisablementReason {
pub struct Update {
/// The build's commit.
pub version: String,
+ /// The display version, `productVersion` with the feed's `release` (`product::with_release`).
pub product_version: String,
/// When the build was packaged, in ms since the epoch: a later build is newer.
pub timestamp: i64,
@@ -79,11 +80,13 @@ pub struct Update {
pub sha256hash: String,
}
-/// The running build: product.json's `version`, and `commit` and `date`, which package-app writes (the commit only
-/// marks a built app, as upstream's; builds of one commit with other versions are updates).
+/// The running build: product.json's `version` and `release` (0 on a build from before releases), and `commit` and
+/// `date`, which package-app writes (the commit only marks a built app, as upstream's; builds of one commit with other
+/// versions are updates).
#[derive(Clone, Debug, PartialEq)]
pub struct Build {
pub version: semver::Version,
+ pub release: u64,
pub commit: String,
pub timestamp: i64,
}
@@ -91,10 +94,11 @@ pub struct Build {
impl Build {
pub fn current() -> Option<Build> {
let version = semver::Version::parse(crate::product::get("version").as_str()?).ok()?;
+ let release = crate::product::get("release").as_u64().unwrap_or(0);
let commit = crate::product::get("commit").as_str()?.to_owned();
let date = crate::product::get("date").as_str()?;
let timestamp = chrono::DateTime::parse_from_rfc3339(date).ok()?.timestamp_millis();
- Some(Build { version, commit, timestamp })
+ Some(Build { version, release, commit, timestamp })
}
}
@@ -110,8 +114,8 @@ pub fn feed_url(update_url: &str, platform: &str, channel: &str) -> String {
}
}
-/// The feed's answer for `build`: its update when it is a higher version, or the same version built later; a lower
-/// version is never one, so a channel switch does not downgrade. 204 is upstream's "no update"; 401, 403 and 404
+/// The feed's answer for `build`: its update when its (VS Code version, release, timestamp) is higher, in that order; a
+/// lower one is never an update, so a channel switch does not downgrade. An entry without `release` is release 0. 204 is upstream's "no update"; 401, 403 and 404
/// are a missing or private release.
pub fn parse_feed(feed_url: &str, status: u16, body: &[u8], build: &Build) -> anyhow::Result<Option<Update>> {
match status {
@@ -132,11 +136,14 @@ pub fn parse_feed(feed_url: &str, status: u16, body: &[u8], build: &Build) -> an
bail!("The update URL must use https: {url}");
}
let candidate = semver::Version::parse(product_version).with_context(|| format!("The update's version {product_version} is not a semantic version"))?;
- let newer = candidate > build.version || (candidate == build.version && timestamp > build.timestamp);
- if !newer {
+ let release = match feed.get("release") {
+ None => 0,
+ Some(release) => release.as_u64().with_context(|| format!("The update's release {release} is not a non-negative integer"))?,
+ };
+ if (&candidate, release, timestamp) <= (&build.version, build.release, build.timestamp) {
return Ok(None);
}
- Ok(Some(Update { version: version.into(), product_version: product_version.into(), timestamp, url: url.into(), sha256hash: sha256hash.to_ascii_lowercase() }))
+ Ok(Some(Update { version: version.into(), product_version: crate::product::with_release(product_version, release), timestamp, url: url.into(), sha256hash: sha256hash.to_ascii_lowercase() }))
}
/// GETs the feed through curl (redirects followed, as a GitHub `releases/latest/download` URL needs): status and body.
diff --git a/native/crates/app/src/update/tests.rs b/native/crates/app/src/update/tests.rs
index 1235f08ee86..f081ee0eb2b 100644
--- a/native/crates/app/src/update/tests.rs
+++ b/native/crates/app/src/update/tests.rs
@@ -6,7 +6,7 @@ use serde_json::json;
use super::*;
fn build() -> Build {
- Build { version: semver::Version::parse("1.148.0").unwrap(), commit: "aaaa".into(), timestamp: 1_000 }
+ Build { version: semver::Version::parse("1.148.0").unwrap(), release: 0, commit: "aaaa".into(), timestamp: 1_000 }
}
fn entry(version: &str, timestamp: i64) -> Vec<u8> {
@@ -30,7 +30,7 @@ fn each_channel_has_its_feed_under_the_releases_url() {
#[test]
fn a_higher_version_is_an_update_and_a_lower_one_never() {
- let on = |version: &str, timestamp: i64| Build { version: semver::Version::parse(version).unwrap(), commit: "aaaa".into(), timestamp };
+ let on = |version: &str, timestamp: i64| Build { version: semver::Version::parse(version).unwrap(), release: 0, commit: "aaaa".into(), timestamp };
let offered = |feed: &[u8], build: &Build| parse_feed(FEED, 200, feed, build).unwrap().map(|update| update.product_version);
// Only stable releases: the next stable.
assert_eq!(offered(&release("bbbb", "1.148.0", 2_000), &on("1.147.0", 1_000)).as_deref(), Some("1.148.0"));
@@ -46,6 +46,41 @@ fn a_higher_version_is_an_update_and_a_lower_one_never() {
assert!(parse_feed(FEED, 200, &release("cccc", "next", 4_000), &on("1.148.0", 2_000)).is_err());
}
+#[test]
+fn the_vscode_version_then_the_release_then_the_timestamp_decide() {
+ let on = |version: &str, release: u64, timestamp: i64| Build { version: semver::Version::parse(version).unwrap(), release, commit: "aaaa".into(), timestamp };
+ let offered = |release: Option<u64>, product_version: &str, timestamp: i64, build: &Build| {
+ let mut feed = json!({ "version": "bbbb", "productVersion": product_version, "timestamp": timestamp, "url": "VSRustium-darwin-arm64.zip", "sha256hash": "ab".repeat(32) });
+ if let Some(release) = release {
+ feed["release"] = json!(release);
+ }
+ parse_feed(FEED, 200, feed.to_string().as_bytes(), build).unwrap().map(|update| update.product_version)
+ };
+ // The same VS Code version, a higher release: an update even when built earlier.
+ assert_eq!(offered(Some(2), "1.148.0", 500, &on("1.148.0", 1, 1_000)).as_deref(), Some("1.148.0.2"));
+ // A lower release is never one, even built later.
+ assert_eq!(offered(Some(1), "1.148.0", 2_000, &on("1.148.0", 2, 1_000)), None);
+ // The same release: only a later build.
+ assert_eq!(offered(Some(2), "1.148.0-insider", 2_000, &on("1.148.0-insider", 2, 1_000)).as_deref(), Some("1.148.0.2-insider"));
+ assert_eq!(offered(Some(2), "1.148.0", 1_000, &on("1.148.0", 2, 1_000)), None);
+ // A higher VS Code version with release 1 beats a lower one with release 9, and never the other way.
+ assert_eq!(offered(Some(1), "1.149.0", 500, &on("1.148.0", 9, 1_000)).as_deref(), Some("1.149.0.1"));
+ assert_eq!(offered(Some(9), "1.148.0", 2_000, &on("1.149.0", 1, 1_000)), None);
+ // An entry without a release (published before releases) is release 0, as is a build without one.
+ assert_eq!(offered(None, "1.148.0", 2_000, &on("1.148.0", 1, 1_000)), None);
+ assert_eq!(offered(Some(1), "1.148.0", 500, &on("1.148.0", 0, 1_000)).as_deref(), Some("1.148.0.1"));
+ assert_eq!(offered(None, "1.148.0", 2_000, &on("1.148.0", 0, 1_000)).as_deref(), Some("1.148.0"));
+}
+
+#[test]
+fn a_release_that_is_not_a_non_negative_integer_is_refused() {
+ for release in [json!("2"), json!(-1), json!(1.5), json!(null)] {
+ let mut feed: Value = serde_json::from_slice(&entry("bbbb", 2_000)).unwrap();
+ feed["release"] = release.clone();
+ assert!(parse_feed(FEED, 200, feed.to_string().as_bytes(), &build()).is_err(), "{release}");
+ }
+}
+
#[test]
fn a_later_build_is_an_update_with_its_zip_beside_the_feed() {
let update = parse_feed(FEED, 200, &entry("bbbb", 2_000), &build()).unwrap().unwrap();
diff --git a/native/crates/app/src/workbench/dialogs.rs b/native/crates/app/src/workbench/dialogs.rs
index 4b275ad78fb..6e04ccae688 100644
--- a/native/crates/app/src/workbench/dialogs.rs
+++ b/native/crates/app/src/workbench/dialogs.rs
@@ -87,7 +87,7 @@ fn os_properties() -> (String, String, String) {
// @github/copilot lines (AI removed).
fn about_details((os_type, arch, release): &(String, String, String)) -> String {
let product = |key: &str| crate::product::get(key).as_str().filter(|value| !value.is_empty()).map(str::to_owned);
- let version = product("version").unwrap_or_default();
+ let version = crate::product::display_version();
let version = match product("darwinUniversalAssetId") {
Some(_) => format!("{version} (Universal)"),
None => version,
@@ -106,7 +106,8 @@ mod tests {
crate::product::load(std::path::Path::new(env!("VSCODE_SRC")), false);
let details = about_details(&("Test OS".into(), "test-arch".into(), "1.0".into()));
let lines: Vec<&str> = details.lines().collect();
- assert!(lines[0].starts_with("Version: 1.148"));
+ let release = crate::product::get("release").as_u64().unwrap();
+ assert_eq!(lines[0], format!("Version: 1.148.0.{release}"));
assert_eq!(&lines[1..], ["Commit: Unknown", "Date: Unknown", "OS: Test OS test-arch 1.0"]);
}
diff --git a/native/crates/app/src/workbench/keyboard.rs b/native/crates/app/src/workbench/keyboard.rs
index 352622eb292..a8462a9ec11 100644
--- a/native/crates/app/src/workbench/keyboard.rs
+++ b/native/crates/app/src/workbench/keyboard.rs
@@ -413,8 +413,8 @@ impl Workbench {
context.insert("updateState".into(), json!(self.update_state.type_name()));
// update.ts MAJOR_MINOR_UPDATE_AVAILABLE, set while an update is ready.
if let crate::update::State::Ready { update, .. } = &self.update_state {
- let current = crate::product::get("version").as_str().unwrap_or_default();
- context.insert("majorMinorUpdateAvailable".into(), json!(super::update::is_major_minor_update(current, &update.product_version)));
+ let current = crate::product::display_version();
+ context.insert("majorMinorUpdateAvailable".into(), json!(super::update::is_major_minor_update(&current, &update.product_version)));
}
// contextkeys.ts ProductQualityContext.
context.insert("productQualityType".into(), json!(crate::product::quality().unwrap_or_default()));
diff --git a/native/crates/app/src/workbench/perf_view.rs b/native/crates/app/src/workbench/perf_view.rs
index 35837db2317..04b74106f8e 100644
--- a/native/crates/app/src/workbench/perf_view.rs
+++ b/native/crates/app/src/workbench/perf_view.rs
@@ -110,7 +110,7 @@ fn system_info(machine: &Machine, screen_reader: bool, empty_workspace: bool) ->
let commit = Some(product("commit")).filter(|commit| !commit.is_empty()).unwrap_or("0000000".into());
let gb = 1024. * 1024. * 1024.;
vec![
- format!("{}: {} ({commit})", product("nameShort"), product("version")),
+ format!("{}: {} ({commit})", product("nameShort"), crate::product::display_version()),
format!("OS: darwin({})", machine.release),
format!("CPUs: {}({} x {})", machine.cpu_model, machine.cpu_count, machine.cpu_speed),
format!("Memory(System): {:.2} GB({:.2}GB free)", machine.total_memory / gb, machine.free_memory / gb),
diff --git a/native/crates/app/src/workbench/release_notes.rs b/native/crates/app/src/workbench/release_notes.rs
index 2a5fad26e2b..b06aab40747 100644
--- a/native/crates/app/src/workbench/release_notes.rs
+++ b/native/crates/app/src/workbench/release_notes.rs
@@ -28,7 +28,7 @@ const SANITIZER: Sanitizer = Sanitizer { link_protocols: Some(&["http", "https",
impl Workbench {
pub(super) fn register_release_notes_commands(&mut self) {
self.commands.register("update.showCurrentReleaseNotes", |workbench, args, window, cx| {
- let product_version = crate::product::get("version").as_str().unwrap_or_default().to_owned();
+ let product_version = crate::product::display_version();
let version = args.first().and_then(Value::as_str).map_or(product_version, str::to_owned);
let shown = workbench.show_release_notes(release_notes_url(), version, window, cx);
// `ShowReleaseNotesAction.run`: the notes that cannot be shown open in the browser.
@@ -48,7 +48,7 @@ impl Workbench {
return Outcome::error("Cannot open the current file as Release Notes");
};
let text = file.find('#').map_or("", |start| &file[start..]).to_owned();
- let version = crate::product::get("version").as_str().unwrap_or_default().to_owned();
+ let version = crate::product::display_version();
let base = format!("https://file+.vscode-resource.vscode-cdn.net{}/", super::media_preview::encode_path(&folder));
let roots = json!([{ "scheme": "file", "path": folder }]);
workbench.open_release_notes(&version, &text, &base, roots, window, cx);
diff --git a/native/crates/app/src/workbench/update.rs b/native/crates/app/src/workbench/update.rs
index cbf36607e26..49bb9f81f9b 100644
--- a/native/crates/app/src/workbench/update.rs
+++ b/native/crates/app/src/workbench/update.rs
@@ -95,9 +95,9 @@ impl Workbench {
/// `update.showPostInstallInfo` off and no `--skip-release-notes`, the release notes editor; notes that cannot be
/// shown become a prompt that opens product.json `releaseNotesUrl`.
pub(crate) fn show_release_notes_after_update(&mut self, skip: bool, window: &mut Window, cx: &mut Context<Self>) {
- let current = crate::product::get("version").as_str().unwrap_or_default();
+ let current = crate::product::display_version();
let url = crate::product::get("releaseNotesUrl").as_str().filter(|_| !skip);
- self.offer_release_notes(current, url, window, cx);
+ self.offer_release_notes(&current, url, window, cx);
}
fn offer_release_notes(&mut self, current: &str, url: Option<&str>, window: &mut Window, cx: &mut Context<Self>) {
@@ -300,6 +300,8 @@ mod tests {
assert!(is_major_minor_update("1.147.0", "1.148.0"));
assert!(is_major_minor_update("1.147.3", "2.0.0"));
assert!(!is_major_minor_update("1.147.0", "1.147.1"));
+ assert!(!is_major_minor_update("1.148.0.1", "1.148.0.2-insider"));
+ assert!(is_major_minor_update("1.148.0.9", "1.149.0.1"));
assert!(!is_major_minor_update("1.147.0", "1.147.0"));
assert!(!is_major_minor_update("", "1.148.0"));
// isMajorMinorUpdate compares each part on its own, as upstream does.
diff --git a/native/crates/app/src/workbench/update_title_bar.rs b/native/crates/app/src/workbench/update_title_bar.rs
index 915a7e453db..63aa922ac2b 100644
--- a/native/crates/app/src/workbench/update_title_bar.rs
+++ b/native/crates/app/src/workbench/update_title_bar.rs
@@ -217,7 +217,7 @@ impl Workbench {
/// The button bar: Release Notes for the update's version, else the running one's, then the state's action.
fn update_tooltip_buttons(&self) -> Vec<(&'static str, &'static str, Vec<Value>)> {
- let version = update_of(&self.update_state).map_or_else(|| crate::product::get("version").as_str().unwrap_or_default().to_owned(), |update| update.product_version.clone());
+ let version = update_of(&self.update_state).map_or_else(crate::product::display_version, |update| update.product_version.clone());
let mut buttons = Vec::new();
if !version.is_empty() {
buttons.push(("Release Notes", "update.showCurrentReleaseNotes", vec![json!(version)]));
@@ -256,7 +256,7 @@ impl Workbench {
.whitespace_normal()
.child(div().font_weight(gpui::FontWeight::SEMIBOLD).text_size(px(13.)).text_color(foreground).child(content.title));
- let product = crate::product::get("version").as_str().unwrap_or_default().to_owned();
+ let product = crate::product::display_version();
let commit = crate::product::get("commit").as_str().unwrap_or_default().to_owned();
let update = update_of(&self.update_state);
let mut details = div().flex().flex_col().justify_center().child(div().mb(px(4.)).font_weight(gpui::FontWeight::SEMIBOLD).text_color(foreground).child(crate::product::name_long().to_owned()));
diff --git a/port/ledger.md b/port/ledger.md
index e949dc3419d..fd5761d0ffb 100644
--- a/port/ledger.md
+++ b/port/ledger.md
@@ -16,6 +16,7 @@ Status: `open`, `in progress`, `waiting on Artur`, `later` (postponed), `done`,
| Decisions (Artur) | Windows signing | done | Milestone 24 ships unsigned: no Authenticode certificate; SmartScreen warns on first run. | |
| Decisions (Artur) | Windows webview | done | WebView2 through webview2-com directly, not wry, as Linux uses webkit2gtk directly: the host page, resource scheme and message bridge stay in webview.rs, a thin `webview/windows.rs` beside `macos.rs` and `linux.rs`. | |
| Decisions (Artur) | Menu bar and keybinding tables | done | Milestone 24 builds the in-window menu bar and the per-platform keybinding mechanism (default tables, the `win` and `linux` rule keys, labels) with the Windows table; the Linux table is a hook the M23 owner fills; macOS and Linux behave as before until then. | |
+| Decisions (Artur) | port version | decided | Artur: port version `<vscode>.<release>`: VSRustium's own version is VS Code's plus `release` (port/product.json, a positive integer bumped by hand per release, back to 1 on every uplift), `1.148.0.1`, `1.148.0.1-insider`, in every place a user sees it (About, `--version`, `--status`, the update title bar and tooltip, release notes and their `v<display version>` tag, package names); product.json `version` and what extensions see stay VS Code's. Updates order by (VS Code version, release, timestamp). Details in port/notes.md "Update feed". | `cargo test -p app update:: product:: version_message about_details` |
| Decisions (Artur) | Windows updates | done | Windows updates start as a download link, as on Linux; the in-place update (`setup /verysilent /update`) is a later M24 row. | |
| Decisions (Artur) | merge gate additions | decided | A merge that touches window or startup code passes `port/tools/run-app-check` on the Studio lane (exits 1 with no app window). `/skill:retro` only when the same class of mistake comes back, not per merge. | Artur's answer |
| Milestones | M1 extension host seam | done | Rust parent, upstream framing and RPC, Bun host, 30/30 built-ins activate. The session.rs fallback is audited per method (port/notes.md); observable methods are gap entries of their MainThread* rows. | `exthost-probe`, `port/results/benchmark.md` |
diff --git a/port/notes.md b/port/notes.md
index 7ce270c8cea..8f7efa0009e 100644
--- a/port/notes.md
+++ b/port/notes.md
@@ -806,9 +806,9 @@ Scope as in the M19 Work row of port/ledger.md.
- extensionsProposedApi.ts (exthost/src/proposed_api.rs, cargo test -p exthost proposed_api): a packaged app is built (`isBuilt`), a checkout run is not and allows every proposal. port/product.json carries `extensionEnabledApiProposals` of the Microsoft VS Code 1.147.0 darwin-arm64 build (65 extensions; the OSS product.json has none). Two of its names, `agentsWindowActivation` and `timeline`, are not in 1.147.0's extensionsApiProposals.ts, so the port warns at startup as VS Code does. Each window builds its own from its environment, as each renderer does upstream, and a host restart reuses it. No `@<version>` compatibility check: 1.147.0 removed `areApiProposalsCompatible` (commit 28af4cff058, #321391); the scanner only drops the `@<version>` suffix.
- Not ported, nothing to gate: releaseNotesEditor.ts conditional blocks (`STABLE`/`INSIDERS`: the port renders the GitHub release body), extensionsWorkbenchService.ts system extension updates and the 1 hour Insiders check interval, Download VSIX actions, codeCacheCleaner.ts and languagePackCachedDataCleaner.ts (no V8 code cache), preferences.ts recommended extension lookup, issueTroubleshoot.ts, survey.contribution.ts, window.ts translation URL, telemetry and assignment services, notebook kernel marketplace query, every chat, sessions and agent host gate (AI left out), update.ts SwitchProductQualityContribution (web only).
- Update feed (`update.rs`): product.json `updateUrl` is the GitHub releases URL of rokartur/vsrustium. A release channel's feed is one static JSON file in upstream's `IUpdate` shape (the answer of update.code.visualstudio.com's `/api/update/<platform>/<quality>/<commit>`), one per platform the app is built for, VS Code's target platform names `darwin-arm64` and `darwin-x64` (`exthost::gallery::CURRENT_TARGET_PLATFORM`, from `cfg!(target_arch)`):
- `{"version": "<commit>", "productVersion": "1.148.0", "timestamp": <ms since epoch>, "url": "<zip URL>", "sha256hash": "<hex SHA-256 of the zip>", "prerelease": false}`.
- Channels (port addition: setting `update.releaseChannel`, `latest` or `pre-release`, default `latest`; upstream's channel is the build's `quality`): `latest` reads `<updateUrl>/latest/download/<platform>.json`, which GitHub serves from the newest release not marked pre-release; `pre-release` reads `<updateUrl>/download/pre-release/<platform>-prerelease.json` (the arm64 names are the ones the first published build, v1.147.0-insider, reads), from a release tagged `pre-release` whose asset each publish replaces (GitHub has no "latest including pre-releases" URL). The entry is an update when its `productVersion` is a higher semantic version than the running product.json `version`, or the same version with a later `timestamp` than product.json `date` (`version`, the commit, decides nothing: builds of one commit can differ in version); a lower version never is, so switching to `latest` on a pre-release newer than the latest stable keeps it until a newer stable comes. A build without `commit` and `date` (written by package-app) has updates disabled, as upstream's without `commit`. 204, 401, 403 and 404 are no update. `url` resolves against the feed's URL and must be https (http only on 127.0.0.1 or localhost).
- Publishing a release (Artur, by hand): `port/tools/package-app` (VERSION, TAG default `v<version>`, PRERELEASE=1 for a pre-release, which is a VS Code Insiders build: product.json `quality: insider` and version `<VERSION>-insider`, as gulpfile.vscode.ts writes them; builds of one Insiders version are told apart by `date`) writes next to the app, for ARCH (`arm64` or `x64`, default the host's) `VSRustium-<version>-darwin-<arch>.zip` (`ditto -c -k --keepParent` of the signed app; `<version>` as product.json, e.g. `1.147.0-insider`), `darwin-<arch>-prerelease.json` and, unless PRERELEASE=1, `darwin-<arch>.json`; the feed `url` names the versioned zip. Run it once per arch (the x64 one after `cargo build --release -p app --target x86_64-apple-darwin`). Upload both zips and both `darwin-<arch>.json` to the release TAG (marked pre-release for a pre-release), and both `darwin-<arch>-prerelease.json` to the `pre-release` release, replacing its assets (a stable release goes there too, so pre-release users get it). A Linux build names its archive `VSRustium-<version>-linux-<arch>.tar.gz` the same way, and its `VSRustium-<version>-linux-<arch>.AppImage`, uploaded beside the archive (no feed names it). Extensions see the API version (`VERSION` in main.rs, 1.147.0, with `-<quality>` on a non-stable build), not product.json `version`: on an Insiders build `vscode.version` is `1.147.0-insider` and `env.appQuality` `insider`, what extensions test for VS Code Insiders (copilot's completions `vscode.version.endsWith('-insider')`, tunnel-forwarding's `appQuality`, a `resolvers` proposal). `env.appName` stays `VSRustium` (branding (1) below); the one `appName.includes('Insiders')` check upstream is the Copilot extension's, which the port does not ship. `engines.vscode` checks use the same string; as extensionValidator.ts, `-insider` in a range or version decides nothing, only the numbers (`cargo test -p exthost insider_engines`; update-check installs the Open VSX VSIX of `[email protected]`, engines `^1.89.0-insider`, in P and activates it, and installs the pre-release of `rust-lang.rust-analyzer` from the gallery (`installPreReleaseVersion`, publisher trust answered) and activates it as one).
+ `{"version": "<commit>", "productVersion": "1.148.0", "release": 1, "timestamp": <ms since epoch>, "url": "<zip URL>", "sha256hash": "<hex SHA-256 of the zip>", "prerelease": false}`.
+ Channels (port addition: setting `update.releaseChannel`, `latest` or `pre-release`, default `latest`; upstream's channel is the build's `quality`): `latest` reads `<updateUrl>/latest/download/<platform>.json`, which GitHub serves from the newest release not marked pre-release; `pre-release` reads `<updateUrl>/download/pre-release/<platform>-prerelease.json` (the arm64 names are the ones the first published build, v1.147.0-insider, reads), from a release tagged `pre-release` whose asset each publish replaces (GitHub has no "latest including pre-releases" URL). Port version (Artur): product.json `version` stays VS Code's semantic version (`1.148.0`, `1.148.0-insider`, what upstream code and extensions read) and product.json `release` is the port's build of it, a positive integer in port/product.json, bumped by hand for each release and set back to 1 on every uplift; build-exthost leaves it out of the extension host's product, and `VERSION` in main.rs (what extensions see) never includes it. Users see the display version `<major>.<minor>.<patch>.<release>` with `-insider` on an Insiders build (`product::display_version`, app-files.ts `displayVersion`): `1.148.0.1`, `1.148.0.1-insider`, in About, `--version`, `--status`, the startup performance view, the update title bar and tooltip, the release notes (tag `v1.148.0.1`) and the package names. Info.plist `CFBundleShortVersionString` stays VS Code's version (Apple's three-number format; update-check reads it). The feed keeps `productVersion` semantic and adds `release`, so builds from before releases still parse the entry (they compare version and timestamp only); the port shows `productVersion` with the release. The entry is an update when its (`productVersion`, `release`, `timestamp`) is higher than the running (product.json `version`, `release`, `date`), in that order: a higher VS Code version wins whatever the releases, then a higher release whatever the timestamps; an entry or a build without `release` is release 0, a `release` that is not a non-negative integer is an error (`version`, the commit, decides nothing: builds of one commit can differ in version); a lower one never is, so switching to `latest` on a pre-release newer than the latest stable keeps it until a newer stable comes. A build without `commit` and `date` (written by package-app) has updates disabled, as upstream's without `commit`. 204, 401, 403 and 404 are no update. `url` resolves against the feed's URL and must be https (http only on 127.0.0.1 or localhost).
+ Publishing a release (Artur, by hand): bump `release` in port/product.json (then `port/tools/build-exthost`: package-app refuses an extension host bundle older than port/product.json), then `port/tools/package-app` (VERSION, TAG default `v<display version>`, e.g. `v1.148.0.1`, PRERELEASE=1 for a pre-release, which is a VS Code Insiders build: product.json `quality: insider` and version `<VERSION>-insider`, as gulpfile.vscode.ts writes them; builds of one Insiders version are told apart by `date`) writes next to the app, for ARCH (`arm64` or `x64`, default the host's) `VSRustium-<display version>-darwin-<arch>.zip` (`ditto -c -k --keepParent` of the signed app; e.g. `VSRustium-1.148.0.1-insider-darwin-arm64.zip`), `darwin-<arch>-prerelease.json` and, unless PRERELEASE=1, `darwin-<arch>.json`; the feed `url` names the versioned zip. Run it once per arch (the x64 one after `cargo build --release -p app --target x86_64-apple-darwin`). Upload both zips and both `darwin-<arch>.json` to the release TAG (marked pre-release for a pre-release), and both `darwin-<arch>-prerelease.json` to the `pre-release` release, replacing its assets (a stable release goes there too, so pre-release users get it). A Linux build names its archive `VSRustium-<display version>-linux-<arch>.tar.gz` the same way, and its `VSRustium-<display version>-linux-<arch>.AppImage`, uploaded beside the archive (no feed names it). Extensions see the API version (`VERSION` in main.rs, 1.147.0, with `-<quality>` on a non-stable build), not product.json `version`: on an Insiders build `vscode.version` is `1.147.0-insider` and `env.appQuality` `insider`, what extensions test for VS Code Insiders (copilot's completions `vscode.version.endsWith('-insider')`, tunnel-forwarding's `appQuality`, a `resolvers` proposal). `env.appName` stays `VSRustium` (branding (1) below); the one `appName.includes('Insiders')` check upstream is the Copilot extension's, which the port does not ship. `engines.vscode` checks use the same string; as extensionValidator.ts, `-insider` in a range or version decides nothing, only the numbers (`cargo test -p exthost insider_engines`; update-check installs the Open VSX VSIX of `[email protected]`, engines `^1.89.0-insider`, in P and activates it, and installs the pre-release of `rust-lang.rust-analyzer` from the gallery (`installPreReleaseVersion`, publisher trust answered) and activates it as one).
- Update service (`update.rs`, `update/install.rs`, updateService.darwin.ts with Squirrel.Mac's part): one per app, created with the first window; `update.mode` as upstream (`none` disables and drops a pending download, `manual`, `start` 30 s after startup, `default` also hourly). A check first refuses a bundle it cannot replace (App Translocation, a read-only volume, no write access) with Squirrel's message, then reads the feed; a newer build downloads at once with curl into `~/Library/Caches/com.rokartur.vsrustium.ShipIt/update` (progress from the file size and Content-Length), then is verified: the zip's SHA-256 against the feed, `ditto -x -k`, exactly one `.app`, `codesign --verify --deep --strict` against the installed app's designated requirement (Squirrel's check: an Apple-issued certificate, the Team ID and the bundle id) and the same `Identifier` and `TeamIdentifier`; an ad-hoc signed installed app verifies nothing. States: Uninitialized, Disabled, Idle, CheckingForUpdates, AvailableForDownload, Downloading, Downloaded, Ready, Restarting; an error goes back to Idle, with its message only for an explicit check (upstream). On a metered connection (`network.meteredConnection` or the OS's) an automatic check is skipped, and an update an automatic check found waits as AvailableForDownload; both resume once the connection is not metered (abstractUpdateService.ts). Not reached: Updating (Windows), Overwriting, Cancelling.
ShipIt (`vsrustium --apply-update <pid> <staged> <installed> [--relaunch <args>]`, logging to `ShipIt_stderr.log` in the ShipIt folder): Restart to Update quits every window (a veto puts Ready back) and the helper starts on app quit; a plain Quit while Ready installs too, without relaunch (Squirrel installs a downloaded update on quit). The helper waits for the app's pid to exit, verifies the staged bundle again, renames the installed app to `.VSRustium.app.old`, moves the update in (a ditto copy across volumes) or on any failure puts the old one back, relaunches the executable with the app's arguments, then deletes the old copy.
Workbench (`workbench/update.rs`, update.ts): the Manage menu's `7_update` items by `updateState` (Check for Updates..., Checking for Updates..., Download Update (1), Downloading Update..., Install Update... (1), Restart to Update (1)), the palette's Check for Updates... and Restart to Update, the Manage item's badge (1 with "New VSRustium update available.", a progress badge while checking or downloading, the description in its hover title, the profile badge hidden meanwhile), "There are currently no updates available." in the focused window after an explicit check. The title bar's update entry and its sticky tooltip (`workbench/update_title_bar.rs`, updateTitleBarEntry.ts and updateTooltip.ts, `update.titleBar`) sit before the right-side items of the main window's custom title bar; an explicit check's error shows in the tooltip, not as a notification. After an update to a new major or minor version (`releaseNotes/lastVersion` in application storage, `update.showReleaseNotes`), the release notes editor (`workbench/release_notes.rs`) shows the body of the GitHub release `v<version>` under `releaseNotesUrl` (the API's `/tags/v<version>`); when it cannot be fetched, the prompt "Welcome to VSRustium v{0}! Would you like to read the Release Notes?" opens `releaseNotesUrl`. Tests: `cargo test -p app update::`; end to end `port/tools/update-check` (port/tools/update-feed serves the packages laid out like GitHub releases; `?cut` cuts a download midway).
diff --git a/port/product.json b/port/product.json
index f8a29f411d9..8a5e5c6f1bc 100644
--- a/port/product.json
+++ b/port/product.json
@@ -9,6 +9,7 @@
"urlProtocol": "vsrustium",
"updateUrl": "https://github.com/rokartur/vsrustium/releases",
"releaseNotesUrl": "https://github.com/rokartur/vsrustium/releases",
+ "release": 1,
"extensionEnabledApiProposals": {
"mrleemurray.theme-2026": [
"css"
diff --git a/port/tools/app-files.ts b/port/tools/app-files.ts
index 4d725bbc4e6..212291271c7 100644
--- a/port/tools/app-files.ts
+++ b/port/tools/app-files.ts
@@ -12,7 +12,8 @@ const root = join(import.meta.dir, '../..');
// A latest build is a VS Code stable build, quality `stable`; a pre-release is an Insiders build: quality `insider` and
// version `<VERSION>-insider`, as gulpfile.vscode.ts writes them. `commit` and `date` identify the build to the update
-// service (update.rs `Build`). Env: VERSION, PRERELEASE=1, PRODUCT (a JSON object merged in, for tests).
+// service (update.rs `Build`); `release`, the port's build of that version, comes from port/product.json. Env: VERSION,
+// PRERELEASE=1, PRODUCT (a JSON object merged in, for tests).
export async function buildProduct() {
const prerelease = process.env.PRERELEASE === '1';
const version = (process.env.VERSION ?? JSON.parse(readFileSync(join(vscodeSrc, 'package.json'), 'utf8')).version) + (prerelease ? '-insider' : '');
@@ -171,14 +172,21 @@ async function installNodeGyp() {
return nodeGyp;
}
+// The version users see (product.rs `with_release`): `1.148.0.1`, `1.148.0.1-insider`. Extensions keep `version`.
+export function displayVersion(product: { version: string; release: number }) {
+ const [numbers, quality] = product.version.split('-', 2);
+ return `${numbers}.${product.release}${quality ? `-${quality}` : ''}`;
+}
+
// The update archive's feed entries (port/notes.md "Update feed"), written next to `archive`: the archive goes on the
-// release tagged TAG (default v<version>), the entries on the feeds the GitHub release channels read.
-export async function writeFeedEntries(archive: string, product: { version: string; commit: string; date: string; quality: string; updateUrl: string }, platform: string, arch: string) {
+// release tagged TAG (default v<display version>), the entries on the feeds the GitHub release channels read.
+export async function writeFeedEntries(archive: string, product: { version: string; release: number; commit: string; date: string; quality: string; updateUrl: string }, platform: string, arch: string) {
const dir = dirname(archive);
const prerelease = product.quality !== 'stable';
const sha256hash = new Bun.CryptoHasher('sha256').update(await Bun.file(archive).arrayBuffer()).digest('hex');
- const tag = process.env.TAG ?? `v${product.version}`;
- const entry = { version: product.commit, productVersion: product.version, timestamp: Date.parse(product.date), url: `${product.updateUrl}/download/${tag}/${basename(archive)}`, sha256hash, prerelease };
+ const tag = process.env.TAG ?? `v${displayVersion(product)}`;
+ // productVersion stays semver: builds from before `release` parse it as one and ignore the field.
+ const entry = { version: product.commit, productVersion: product.version, release: product.release, timestamp: Date.parse(product.date), url: `${product.updateUrl}/download/${tag}/${basename(archive)}`, sha256hash, prerelease };
const latestFeed = `${platform}-${arch}.json`;
const preReleaseFeed = `${platform}-${arch}-prerelease.json`;
const feeds = prerelease ? [preReleaseFeed] : [latestFeed, preReleaseFeed];
diff --git a/port/tools/build-exthost b/port/tools/build-exthost
index 8c360e7feb4..147b9657399 100755
--- a/port/tools/build-exthost
+++ b/port/tools/build-exthost
@@ -19,7 +19,9 @@ for (const patch of [...new Glob('port/patches/src-*.patch').scanSync()].sort())
}
const readJson = (path: string) => JSON.parse(readFileSync(path, 'utf8'));
-const product = { ...readJson(join(vscodeSrc, 'product.json')), ...readJson('port/product.json') };
+// `release` is the port's build number (port/notes.md "Update feed"): the extension host keeps VS Code's product.
+const { release: _release, ...portProduct } = readJson('port/product.json');
+const product = { ...readJson(join(vscodeSrc, 'product.json')), ...portProduct };
const meta = join(build, 'src/bootstrap-meta.ts');
let source = readFileSync(meta, 'utf8');
for (const [marker, value] of [['BUILD_INSERT_PRODUCT_CONFIGURATION', product], ['BUILD_INSERT_PACKAGE_CONFIGURATION', readJson(join(vscodeSrc, 'package.json'))]]) {
diff --git a/port/tools/package-app b/port/tools/package-app
index 3a6a8d237b9..6227d511851 100755
--- a/port/tools/package-app
+++ b/port/tools/package-app
@@ -5,14 +5,14 @@
// runtime and `spctl -a`. Run on the Studio after a release build and port/tools/build-exthost:
// port/tools/studio 'port/tools/package-app' env IDENTITY="Developer ID Application: ..." (default ad-hoc "-";
// a Developer ID signs in the GUI session), NOTARIZE=1 (notarize and staple), VSCODE_GPUI_EXTENSIONS (default the reference's extensions), OUT (default native/target/VSRustium.app),
-// VERSION (default the VS Code tree's), PRERELEASE=1 (a pre-release: quality insider, version <VERSION>-insider; else quality stable), TAG (the GitHub release tag, default v<version>),
+// VERSION (default the VS Code tree's), PRERELEASE=1 (a pre-release: quality insider, version <VERSION>-insider; else quality stable), TAG (the GitHub release tag, default v<display version>, app-files.ts displayVersion),
// PRODUCT (a JSON object merged into product.json, for tests: '{"updateUrl": "http://127.0.0.1:8080"}'),
// ARCH (arm64 or x64, default the host's; for another arch first `cargo build --release -p app --target <triple>`)
// Next to the app it writes the update zip and the feed entries of port/notes.md "Update feed", per platform and arch:
-// VSRustium-<version>-darwin-<arch>.zip and darwin-<arch>-prerelease.json, and darwin-<arch>.json unless PRERELEASE=1.
+// VSRustium-<display version>-darwin-<arch>.zip and darwin-<arch>-prerelease.json, and darwin-<arch>.json unless PRERELEASE=1.
import { cpSync, existsSync, mkdirSync, readFileSync, realpathSync, rmSync, statSync, writeFileSync } from 'node:fs';
import { dirname, join, relative } from 'node:path';
-import { buildProduct, copyAppFiles, rebuildNativeModule, writeFeedEntries } from './app-files.ts';
+import { buildProduct, copyAppFiles, displayVersion, rebuildNativeModule, writeFeedEntries } from './app-files.ts';
import { vscodeSrc } from './vscode-src.ts';
const root = process.cwd();
@@ -167,7 +167,7 @@ const verify = await Bun.$`codesign --verify --deep --strict --verbose=2 ${out}`
console.log(`${out}: ${binaries.length + 2} signatures as ${identity}, codesign --verify ${verify.exitCode === 0 ? 'ok' : 'failed'}`);
console.log(verify.stderr.toString().trim());
if (verify.exitCode === 0) {
- const zip = join(dirname(out), `VSRustium-${version}-${platform}-${arch}.zip`);
+ const zip = join(dirname(out), `VSRustium-${displayVersion(product)}-${platform}-${arch}.zip`);
rmSync(zip, { force: true });
await Bun.$`ditto -c -k --keepParent ${out} ${zip}`;
await writeFeedEntries(zip, product, platform, arch);
diff --git a/port/tools/package-linux b/port/tools/package-linux
index 484c1f4052b..ae80ead63b5 100755
--- a/port/tools/package-linux
+++ b/port/tools/package-linux
@@ -3,7 +3,7 @@
// (named applicationName, as code.sh starts it) and bun, bin/<applicationName> from upstream's linux code.sh, and the
// app files in resources/app (port/tools/app-files.ts; product.rs BUNDLED_APP). The packages' native modules, built
// for macOS by the reference's pnpm install, are rebuilt for Linux with node-gyp. Then it writes
-// VSRustium-<version>-linux-<arch>.tar.gz and the folder as VSRustium-<version>-linux-<arch>.AppImage
+// VSRustium-<display version>-linux-<arch>.tar.gz and the folder as VSRustium-<display version>-linux-<arch>.AppImage
// (port/tools/linux/appimage) next to the folder, and the feed entries of port/notes.md "Update feed":
// linux-<arch>-prerelease.json and, unless PRERELEASE=1, linux-<arch>.json.
// Run on Linux after `cargo build --release -p app` and port/tools/build-exthost, for the host's arch:
@@ -11,7 +11,7 @@
// extensions), OUT (default <target dir>/VSRustium-linux-<arch>), VERSION, PRERELEASE=1, TAG, PRODUCT as package-app.
import { cpSync, existsSync, mkdirSync, readFileSync, realpathSync, rmSync, writeFileSync } from 'node:fs';
import { basename, dirname, join, relative } from 'node:path';
-import { buildProduct, copyAppFiles, rebuildNativeModule, writeFeedEntries } from './app-files.ts';
+import { buildProduct, copyAppFiles, displayVersion, rebuildNativeModule, writeFeedEntries } from './app-files.ts';
import { vscodeSrc } from './vscode-src.ts';
if (process.platform !== 'linux') {
@@ -74,12 +74,12 @@ if (wrong.length) {
throw new Error(`not a ${platform}-${arch} binary: ${wrong.join(', ')}`);
}
-const archive = join(dirname(out), `VSRustium-${product.version}-${platform}-${arch}.tar.gz`);
+const archive = join(dirname(out), `VSRustium-${displayVersion(product)}-${platform}-${arch}.tar.gz`);
rmSync(archive, { force: true });
await Bun.$`tar -czf ${archive} -C ${dirname(out)} ${basename(out)}`;
await writeFeedEntries(archive, product, platform, arch);
const size = (await Bun.$`du -sh ${out}`.text()).split('\t')[0];
-const appImage = join(dirname(out), `VSRustium-${product.version}-${platform}-${arch}.AppImage`);
+const appImage = join(dirname(out), `VSRustium-${displayVersion(product)}-${platform}-${arch}.AppImage`);
await Bun.$`port/tools/linux/appimage ${out} ${name} ${appImage}`;
const archiveSize = (await Bun.$`du -sh ${archive}`.text()).split('\t')[0];
const appImageSize = (await Bun.$`du -sh ${appImage}`.text()).split('\t')[0];