Skip to content

Visual Studio Code, rebuilt in Rust

Rust

fix(extensions): install dependencies and pack members with an extension

rokartur123b9f8c2940
diff --git a/README.md b/README.md
index ac48d7b173f..658a5f6d0a2 100644
--- a/README.md
+++ b/README.md
@@ -11,15 +11,15 @@ Coverage of VS Code 1.147.0, from [port/ledger.md](port/ledger.md) (584 rows). V
```mermaid
pie showData
- "verified" : 414
- "ported" : 16
+ "verified" : 413
+ "ported" : 17
"removed" : 126
"n/a" : 28
```
| area | verified | ported | removed | n/a | verified of in scope |
|---|---:|---:|---:|---:|---|
-| src/vs/platform | 68 | 1 | 30 | 13 | `████████████████████ 99%` |
+| src/vs/platform | 67 | 2 | 30 | 13 | `███████████████████░ 97%` |
| workbench contribution | 64 | 4 | 30 | 3 | `███████████████████░ 94%` |
| built-in extension | 88 | 1 | 6 | 0 | `████████████████████ 99%` |
| MainThread* shape (Rust side) | 58 | 1 | 30 | 0 | `████████████████████ 98%` |
@@ -31,7 +31,7 @@ pie showData
| src/vs/editor | 0 | 2 | 1 | 1 | `░░░░░░░░░░░░░░░░░░░░ 0%` |
| src/vs/base | 0 | 0 | 2 | 3 | `████████████████████ 100%` |
| port feature | 1 | 0 | 0 | 0 | `████████████████████ 100%` |
-| **all** | **414** | **16** | **126** | **28** | `███████████████████░ 96%` |
+| **all** | **413** | **17** | **126** | **28** | `███████████████████░ 96%` |
<!-- coverage:end -->
`removed` are parts left out by decision: AI features, Microsoft services, telemetry, remote and tunnels ([port/notes.md](port/notes.md)). `n/a` are upstream test infrastructure and the Electron process, IPC and DOM layers the native architecture replaces.
diff --git a/native/crates/app/src/cli_process.rs b/native/crates/app/src/cli_process.rs
index 04e998e6c6c..828b29ec260 100644
--- a/native/crates/app/src/cli_process.rs
+++ b/native/crates/app/src/cli_process.rs
@@ -38,7 +38,13 @@ pub fn run(args: &ParsedArgs, user_data: &Path, working_dir: &Path, system: &[Sc
_ => Vec::new(),
};
// cliProcessMain.ts reads the default profile's settings whatever `--profile` is.
- let installer = Installer { user: &user, downloads: user_data.join("CachedExtensionVSIXs"), verify_signature: verify_signature(&profiles.default_profile().settings_resource) };
+ let installer = Installer {
+ user: &user,
+ system,
+ gallery: Gallery::open_vsx(&crate::VERSION),
+ downloads: user_data.join("CachedExtensionVSIXs"),
+ verify_signature: verify_signature(&profiles.default_profile().settings_resource),
+ };
if args.flag("list-extensions") {
return list_extensions(&user, args.flag("show-versions"), args.string("category"), out);
}
@@ -92,6 +98,8 @@ fn list_extensions(user: &UserExtensions, show_versions: bool, category: Option<
struct Installer<'a> {
user: &'a UserExtensions,
+ system: &'a [ScannedExtension],
+ gallery: Gallery,
downloads: PathBuf,
verify_signature: bool,
}
@@ -108,9 +116,8 @@ impl Installer<'_> {
failed.push(working_dir.join(vsix).display().to_string());
}
}
- let gallery = Gallery::open_vsx(&crate::VERSION);
for input in inputs.iter().filter(|input| !is_vsix(input)) {
- if let Err(error) = self.install_gallery(&gallery, input, pre_release, force, &installed, out) {
+ if let Err(error) = self.install_gallery(input, pre_release, force, &installed, out) {
eprintln!("{error:#}");
failed.push(crate::workbench::extension_management::id_and_version(input).0);
}
@@ -133,13 +140,19 @@ impl Installer<'_> {
writeln!(out, "A newer version of extension '{}' v{} is already installed. Use '--force' option to downgrade to older version.", existing.id.to_lowercase(), version(existing))?;
return Ok(());
}
+ let dependencies = string_list(&manifest["extensionDependencies"]);
+ let pack = string_list(&manifest["extensionPack"]);
+ // A VSIX installs without the dependencies and pack members the gallery cannot give.
+ if let Err(error) = self.install_dependencies_and_packs(&id, &dependencies, &pack, false) {
+ eprintln!("Cannot install dependencies and packed extensions of extension: {id} {error:#}");
+ }
self.user.install_vsix(vsix)?;
writeln!(out, "Extension '{}' was successfully installed.", vsix.file_name().unwrap_or_default().to_string_lossy())?;
Ok(())
}
/// `installGalleryExtensions` for one `id[@version]`.
- fn install_gallery(&self, gallery: &Gallery, input: &str, pre_release: bool, force: bool, installed: &[ScannedExtension], out: &mut dyn Write) -> anyhow::Result<()> {
+ fn install_gallery(&self, input: &str, pre_release: bool, force: bool, installed: &[ScannedExtension], out: &mut dyn Write) -> anyhow::Result<()> {
let (id, version_arg) = crate::workbench::extension_management::id_and_version(input);
let pre_release = pre_release || version_arg.as_deref() == Some("prerelease");
let version_arg = version_arg.filter(|version| version != "prerelease");
@@ -154,7 +167,7 @@ impl Installer<'_> {
return Ok(());
}
}
- let extension = gallery.installable_extension(&id, version_arg.as_deref(), pre_release).map_err(|error| anyhow::anyhow!("{error:#}\n{USE_ID}"))?;
+ let extension = self.gallery.installable_extension(&id, version_arg.as_deref(), pre_release).map_err(|error| anyhow::anyhow!("{error:#}\n{USE_ID}"))?;
let named = version_arg.as_deref().map_or_else(|| id.clone(), |version| format!("{id}@{version}"));
if let Some(existing) = existing {
if extension.version == version(existing) {
@@ -167,13 +180,24 @@ impl Installer<'_> {
Some(version) => writeln!(out, "Installing extension '{id}' v{version}...")?,
None => writeln!(out, "Installing extension '{id}'...")?,
}
+ self.install_dependencies_and_packs(&extension.id, &extension.dependencies, &extension.extension_pack, pre_release)?;
let operation = if existing.is_some() { Operation::Update } else { Operation::Install };
- let vsix = gallery.download(&extension, operation, &self.downloads, self.verify_signature)?;
+ let vsix = self.gallery.download(&extension, operation, &self.downloads, self.verify_signature)?;
let local = self.user.install_gallery(&vsix, &extension).map_err(|error| anyhow::anyhow!("Error while installing extension {id}: {error:#}"))?;
writeln!(out, "Extension '{id}' v{} was successfully installed.", version(&local))?;
Ok(())
}
+ /// `installExtensions` with `getAllDepsAndPackExtensions`: what `id` brings along installs before it.
+ fn install_dependencies_and_packs(&self, id: &str, dependencies: &[String], pack: &[String], pre_release: bool) -> anyhow::Result<()> {
+ let installed: Vec<ScannedExtension> = self.system.iter().cloned().chain(self.user.scan()?).collect();
+ for extension in self.gallery.dependencies_and_packs(id, dependencies, pack, &installed, pre_release)? {
+ let vsix = self.gallery.download(&extension, Operation::Install, &self.downloads, self.verify_signature)?;
+ self.user.install_gallery(&vsix, &extension).map_err(|error| anyhow::anyhow!("Error while installing extension {}: {error:#}", extension.id))?;
+ }
+ Ok(())
+ }
+
/// `updateExtensions`: the gallery extensions with a newer compatible version; a failed update is logged.
fn update_extensions(&self, out: &mut dyn Write) -> anyhow::Result<()> {
let installed: Vec<ScannedExtension> = self.user.scan()?.into_iter().filter(|extension| extension.description["uuid"].is_string()).collect();
@@ -181,9 +205,8 @@ impl Installer<'_> {
.iter()
.map(|extension| ExtensionInfo { id: extension.id.clone(), uuid: extension.description["uuid"].as_str().map(Into::into), version: None, pre_release: extension.description["preRelease"] == true })
.collect();
- let gallery = Gallery::open_vsx(&crate::VERSION);
let mut updates = Vec::new();
- for latest in gallery.get_extensions(&infos, true)? {
+ for latest in self.gallery.get_extensions(&infos, true)? {
let old = installed.iter().find(|extension| extension.id.eq_ignore_ascii_case(&latest.id));
if old.is_some_and(|old| semver_version(&latest.version) > semver_version(version(old))) {
updates.push(latest);
@@ -195,7 +218,7 @@ impl Installer<'_> {
}
writeln!(out, "Updating extensions: {}", updates.iter().map(|update| update.id.as_str()).collect::<Vec<_>>().join(", "))?;
for update in updates {
- let updated = gallery.download(&update, Operation::Update, &self.downloads, self.verify_signature).and_then(|vsix| self.user.install_gallery(&vsix, &update));
+ let updated = self.gallery.download(&update, Operation::Update, &self.downloads, self.verify_signature).and_then(|vsix| self.user.install_gallery(&vsix, &update));
match updated {
Ok(local) => writeln!(out, "Extension '{}' v{} was successfully updated.", update.id, version(&local))?,
Err(error) => eprintln!("Error while updating extension {}: {error:#}", update.id),
@@ -248,6 +271,10 @@ fn is_vsix(input: &str) -> bool {
input.to_lowercase().ends_with(".vsix")
}
+fn string_list(value: &serde_json::Value) -> Vec<String> {
+ value.as_array().into_iter().flatten().filter_map(|item| item.as_str().map(Into::into)).collect()
+}
+
fn version(extension: &ScannedExtension) -> &str {
extension.description["version"].as_str().unwrap_or_default()
}
diff --git a/native/crates/app/src/workbench/extension_management.rs b/native/crates/app/src/workbench/extension_management.rs
index 76bbb9ec92b..ddbae93fe66 100644
--- a/native/crates/app/src/workbench/extension_management.rs
+++ b/native/crates/app/src/workbench/extension_management.rs
@@ -155,6 +155,7 @@ impl Workbench {
let trusted = self.user_trusted_publishers();
let gallery = self.gallery();
let download_gallery = self.gallery();
+ let installed_extensions = self.extensions.clone();
let lookup = cx.background_executor().spawn(async move {
if builtin {
anyhow::bail!("The extension '{id}' cannot be installed because it was not found.");
@@ -175,13 +176,24 @@ impl Workbench {
anyhow::bail!(super::trusted_publishers::CANCELED);
}
let gallery = download_gallery;
- cx.background_executor().spawn(async move { gallery.download(&extension, operation, &downloads, verify_signature).map(|vsix| (vsix, extension)) }).await
+ cx.background_executor()
+ .spawn(async move {
+ // `installExtensions`: the dependencies and pack members install before the extension.
+ let mut jobs = Vec::new();
+ for other in gallery.dependencies_and_packs(&extension.id, &extension.dependencies, &extension.extension_pack, &installed_extensions, pre_release)? {
+ jobs.push(Job::InstallGallery(gallery.download(&other, Operation::Install, &downloads, verify_signature)?, Box::new(other)));
+ }
+ let publisher = (extension.publisher.clone(), extension.publisher_display_name.clone());
+ jobs.push(Job::InstallGallery(gallery.download(&extension, operation, &downloads, verify_signature)?, Box::new(extension)));
+ Ok((jobs, publisher))
+ })
+ .await
};
let installed = match download.await {
- Ok((vsix, extension)) => workbench.update(cx, |workbench, cx| {
+ Ok((jobs, publisher)) => workbench.update(cx, |workbench, cx| {
// `onProfileAwareDidInstallExtensions`: a gallery install trusts its publisher.
- workbench.trust_publishers(&[(extension.publisher.clone(), extension.publisher_display_name.clone())]);
- workbench.run_extension_jobs(vec![Job::InstallGallery(vsix, Box::new(extension))], None, cx, |error| error)
+ workbench.trust_publishers(&[publisher]);
+ workbench.run_extension_jobs(jobs, None, cx, |error| error)
}),
Err(error) => workbench.update(cx, |workbench, cx| {
let error = format!("{error:#}");
diff --git a/native/crates/exthost/src/gallery.rs b/native/crates/exthost/src/gallery.rs
index fdb1669581d..208b75b1256 100644
--- a/native/crates/exthost/src/gallery.rs
+++ b/native/crates/exthost/src/gallery.rs
@@ -9,6 +9,7 @@ use serde_json::{Value, json};
use crate::extension_validator::{is_engine_valid, semver_version};
use crate::request::{Request, Response, request};
+use crate::scan::ScannedExtension;
use crate::sign::{VerificationCode, verify};
use crate::zip::Archive;
@@ -338,6 +339,65 @@ impl Gallery {
None => bail!("The extension '{id}' cannot be installed because it was not found."),
}
};
+ self.checked_compatible(extension, version.is_some(), pre_release)
+ }
+
+ /// `getAllDepsAndPackExtensions`: the gallery extensions an install of `id` brings along, its dependencies and
+ /// its pack members that are new, recursively, without the `installed` ones (built-ins included). A dependency that
+ /// cannot be installed fails the install; a pack member that cannot is skipped.
+ pub fn dependencies_and_packs(&self, id: &str, dependencies: &[String], pack: &[String], installed: &[ScannedExtension], pre_release: bool) -> anyhow::Result<Vec<GalleryExtension>> {
+ let mut known = Vec::new();
+ let mut found = Vec::new();
+ self.collect_dependencies_and_packs(id, dependencies, pack, installed, pre_release, &mut known, &mut found)?;
+ let mut distinct: Vec<GalleryExtension> = Vec::new();
+ for extension in found {
+ let is_installed = installed.iter().any(|other| other.id.eq_ignore_ascii_case(&extension.id));
+ if !is_installed && !distinct.iter().any(|other| other.id.eq_ignore_ascii_case(&extension.id)) {
+ distinct.push(extension);
+ }
+ }
+ Ok(distinct)
+ }
+
+ #[allow(clippy::too_many_arguments)]
+ fn collect_dependencies_and_packs(&self, id: &str, dependencies: &[String], pack: &[String], installed: &[ScannedExtension], pre_release: bool, known: &mut Vec<String>, found: &mut Vec<GalleryExtension>) -> anyhow::Result<()> {
+ known.push(id.to_lowercase());
+ let dependencies: Vec<&String> = dependencies.iter().filter(|dependency| !installed.iter().any(|other| other.id.eq_ignore_ascii_case(dependency))).collect();
+ let existing = installed.iter().find(|other| other.id.eq_ignore_ascii_case(id));
+ let existing_pack: Vec<&str> = existing.and_then(|existing| existing.description["extensionPack"].as_array()).into_iter().flatten().filter_map(Value::as_str).collect();
+ let mut ids: Vec<String> = dependencies.iter().map(|dependency| dependency.to_string()).collect();
+ for member in pack {
+ if !existing_pack.iter().any(|old| old.eq_ignore_ascii_case(member)) && !ids.iter().any(|other| other.eq_ignore_ascii_case(member)) {
+ ids.push(member.clone());
+ }
+ }
+ ids.retain(|id| !known.contains(&id.to_lowercase()));
+ if ids.is_empty() {
+ return Ok(());
+ }
+ let infos: Vec<ExtensionInfo> = ids.into_iter().map(|id| ExtensionInfo { id, pre_release, ..ExtensionInfo::default() }).collect();
+ for extension in self.get_extensions(&infos, false)? {
+ if known.contains(&extension.id.to_lowercase()) {
+ continue;
+ }
+ let is_dependency = dependencies.iter().any(|dependency| dependency.eq_ignore_ascii_case(&extension.id));
+ let compatible = match self.checked_compatible(extension, false, pre_release) {
+ Ok(compatible) => compatible,
+ Err(error) if !is_dependency => {
+ eprintln!("[extensions] Skipping the packed extension as it cannot be installed: {error:#}");
+ continue;
+ }
+ Err(error) => return Err(error),
+ };
+ let (id, dependencies, pack) = (compatible.id.clone(), compatible.dependencies.clone(), compatible.extension_pack.clone());
+ found.push(compatible);
+ self.collect_dependencies_and_packs(&id, &dependencies, &pack, installed, pre_release, known, found)?;
+ }
+ Ok(())
+ }
+
+ /// `checkAndGetCompatibleVersion`: `extension` or its latest version this product can install.
+ fn checked_compatible(&self, extension: GalleryExtension, same_version: bool, pre_release: bool) -> anyhow::Result<GalleryExtension> {
if extension.blocked {
bail!("{BLOCKED_MESSAGE}");
}
@@ -345,7 +405,7 @@ impl Gallery {
if !all.iter().any(|platform| is_target_platform_compatible(platform, all, CURRENT_TARGET_PLATFORM)) {
bail!("The '{}' extension is not available in {} for the {} platform.", extension.id, crate::product_name(), target_platform_label(CURRENT_TARGET_PLATFORM));
}
- let compatible = self.compatible_version(&extension, version.is_some(), pre_release)?;
+ let compatible = self.compatible_version(&extension, same_version, pre_release)?;
let Some(compatible) = compatible else {
if !pre_release && extension.has_pre_release_version && extension.is_pre_release_version {
bail!("Can't install release version of '{}' extension because it has no release version.", extension.display_name_or_id());
diff --git a/native/crates/exthost/src/gallery/tests.rs b/native/crates/exthost/src/gallery/tests.rs
index c83fc1b9c43..6f341df1d9a 100644
--- a/native/crates/exthost/src/gallery/tests.rs
+++ b/native/crates/exthost/src/gallery/tests.rs
@@ -181,3 +181,65 @@ fn verification_failures_refuse_the_install() {
assert_eq!(check_verification(Some(VerificationCode::NotSigned), false).unwrap_err().to_string(), "Signature verification failed with 'NotSigned' error.");
assert!(check_verification(Some(VerificationCode::EntryIsTampered), false).is_err());
}
+
+/// vscode-yaml republished as `id` with these `extensionDependencies` and `extensionPack` in every version.
+fn gallery_entry(id: &str, dependencies: &[&str], pack: &[&str]) -> Value {
+ let mut raw: Value = serde_json::from_str(VSCODE_YAML).unwrap();
+ let (publisher, name) = id.split_once('.').unwrap();
+ raw["publisher"]["publisherName"] = publisher.into();
+ raw["extensionName"] = name.into();
+ raw["extensionId"] = format!("uuid-{id}").into();
+ for version in raw["versions"].as_array_mut().unwrap() {
+ let properties = version["properties"].as_array_mut().unwrap();
+ properties.retain(|property| !property["key"].as_str().unwrap().starts_with("Microsoft.VisualStudio.Code.Extension"));
+ properties.push(json!({ "key": "Microsoft.VisualStudio.Code.ExtensionDependencies", "value": dependencies.join(",") }));
+ properties.push(json!({ "key": "Microsoft.VisualStudio.Code.ExtensionPack", "value": pack.join(",") }));
+ }
+ raw
+}
+
+/// A gallery on localhost that answers each query with the `entries` whose id the query names, by name or by uuid.
+fn serve_gallery(entries: Vec<(String, Value)>) -> String {
+ use std::io::{BufRead, BufReader, Read, Write};
+ let listener = std::net::TcpListener::bind("127.0.0.1:0").unwrap();
+ let url = format!("http://{}", listener.local_addr().unwrap());
+ std::thread::spawn(move || {
+ for stream in listener.incoming().flatten() {
+ let mut reader = BufReader::new(stream);
+ let mut length = 0;
+ loop {
+ let mut line = String::new();
+ reader.read_line(&mut line).unwrap();
+ if line.trim().is_empty() {
+ break;
+ }
+ if let Some((name, value)) = line.split_once(':')
+ && name.eq_ignore_ascii_case("content-length")
+ {
+ length = value.trim().parse().unwrap();
+ }
+ }
+ let mut body = vec![0; length];
+ reader.read_exact(&mut body).unwrap();
+ let query = String::from_utf8_lossy(&body).to_lowercase();
+ let named: Vec<&Value> = entries.iter().filter(|(id, _)| query.contains(id.as_str())).map(|(_, entry)| entry).collect();
+ let body = json!({ "results": [{ "extensions": named, "resultMetadata": [{ "metadataType": "ResultCount", "metadataItems": [{ "name": "TotalCount", "count": named.len() }] }] }] }).to_string();
+ let reply = format!("HTTP/1.1 200 OK\r\nContent-Type: application/json\r\nContent-Length: {}\r\nConnection: close\r\n\r\n{body}", body.len());
+ reader.into_inner().write_all(reply.as_bytes()).unwrap();
+ }
+ });
+ url
+}
+
+/// abstractExtensionManagementService.ts `getAllDepsAndPackExtensions`: dependencies and pack members, recursively,
+/// in query order, without the installed ones.
+#[test]
+fn dependencies_and_packs_come_along_recursively() {
+ let entries = [("a.dep", vec!["a.leaf"], vec![]), ("a.member", vec![], vec!["a.dep"]), ("a.installed", vec![], vec![]), ("a.leaf", vec![], vec![])];
+ let entries = entries.into_iter().map(|(id, dependencies, pack)| (id.to_owned(), gallery_entry(id, &dependencies, &pack))).collect();
+ let gallery = Gallery { service_url: serve_gallery(entries), product_version: "1.147.0".into() };
+ let installed = [ScannedExtension { id: "a.installed".into(), location: PathBuf::new(), description: json!({}) }];
+ let found = gallery.dependencies_and_packs("a.root", &["a.dep".into()], &["a.member".into(), "a.installed".into()], &installed, false).unwrap();
+ let ids: Vec<&str> = found.iter().map(|extension| extension.id.as_str()).collect();
+ assert_eq!(ids, ["a.dep", "a.leaf", "a.member"]);
+}
diff --git a/port/ledger.md b/port/ledger.md
index d68e779f85d..5861b1221d0 100644
--- a/port/ledger.md
+++ b/port/ledger.md
@@ -32,7 +32,7 @@ Status: `open`, `in progress`, `waiting on Artur`, `later` (postponed), `done`,
| Milestones | M15 terminal, tasks, output | done | Integrated terminal (PTY from Rust, VT parser and renderer in GPUI), shell integration, extension terminals and pseudoterminals, tasks and problem matchers, npm/grunt/gulp/jake task providers, external terminal, Output panel and log viewer. Open gaps: the gaps column of its unit rows. | api-tests `terminal.test`, `terminal.shellIntegration.test` and `workspace.tasks.test` pass as in the reference (run with `SHELL=/bin/bash` as the baseline was); `npm: build` task from the fixture runs in a terminal. |
| Milestones | M16 debug and testing | in progress | Debug adapter protocol client, launch.json, breakpoints in the gutter, call stack, variables, watch, debug console, JS debugger (`ms-vscode.js-debug`), Test Explorer and test results. Open gaps: the gaps column of its unit rows. | api-tests `debug.test` and testing cases pass as in the reference; a breakpoint in a Node script from the fixture stops and shows variables. |
| Milestones | M17 webviews and notebooks | in progress | A WKWebView embedded in the GPUI window for webview panels, webview views and custom editors, with the upstream message and resource protocol; Markdown preview, image/media preview, simple browser, editor insets; notebooks (ipynb) with renderers and kernels. Open gaps: the gaps column of its unit rows. | api-tests `webview.test`, `customEditor` and `notebook*.test` cases pass as in the reference; Markdown preview of the fixture README draws next to its source. |
-| Milestones | M18 extensions: install, update, gallery | done | Extensions view backed by Open VSX, install/uninstall/update/disable, VSIX install, signature and checksum checks, recommendations, ESM extensions added after startup on Bun, language packs and display language. | Installing an extension from Open VSX activates it without restart (an ESM one included); api-tests `extensions.test` pass as in the reference. PORT_GALLERY=1 port/tools/extensions-check: 5 ok; MOCHA_GREP="vscode server cli" port/tools/api-tests: its one test pending, as in the reference (remote only). |
+| Milestones | M18 extensions: install, update, gallery | in progress | Extensions view backed by Open VSX, install/uninstall/update/disable, VSIX install, signature and checksum checks, recommendations, ESM extensions added after startup on Bun, language packs and display language. | Installing an extension from Open VSX activates it without restart (an ESM one included); api-tests `extensions.test` pass as in the reference. PORT_GALLERY=1 port/tools/extensions-check: 5 ok; MOCHA_GREP="vscode server cli" port/tools/api-tests: its one test pending, as in the reference (remote only). |
| Milestones | M19 product shell, privacy, accessibility, release | done | Welcome page and walkthroughs, update channel for the port's own builds, relaunch, splash, accessibility (VoiceOver through GPUI's accessibility tree, accessibility signals, high-contrast checks), process explorer and performance views, telemetry inert end to end, packaged and signed `.app`. Open gaps: the gaps column of its unit rows. | The telemetry source search (no telemetry endpoint string reachable) and network capture (zero outbound requests in a 10 min session with no user action) pass; VoiceOver reads the editor line and the Explorer rows; the signed `.app` passes `spctl -a`; benchmark rerun against a packaged reference build. |
| Milestones | M20 parity | in progress | Nothing new; close the gaps the earlier milestones left (the gaps column of the unit rows). Completion check in port-m20-check: api-tests met (318/28/0 in the target's suites, 4/0/0, port/results/api-tests.md); pixel-check met, the remaining differences are the causes in port/results/pixels.md; ledger not met: the `ported` rows, each with its open gaps. Closed in workbench/contrib/comments: comment threads in diff and multi diff editors, floating ones included, with the floating style's `FloatingWidgetRoom`. | `port/tools/api-tests` gives 318/28/0 (folder) and 4/0/0 (workspace): the reference baseline 356/46/0 less the suites and tests of removed features (chat, lm, the integrated browser, `env.remoteName`) (port/results/api-tests-reference.md); pixel-check of every window has no difference beyond anti-aliasing and the causes listed in `port/results/pixels.md`; every ledger row is `verified`, `removed` or `n/a`. |
| Milestones | M20 multi-instance code editor | open | Upstream every diff side, multi diff file side, notebook cell and walkthrough snippet is its own CodeEditorWidget; the port draws one editable code editor per group. Bound to that one instance today: `text_area` (workbench/editor_view.rs) and its `text_area_bounds`, the group's `viewport` (`EditorGroup`, editor.rs), `editor_focus` and its listeners (workbench.rs), `editors.active()` as the target of every editor command, the cursor, find and suggest, IME through `EntityInputHandler for Workbench` (text_input.rs), mouse selection in `editor_lines`, and the content widgets (hover, suggest, parameter hints, zone widgets) placed against that one area. Rows that need it: `workbench/contrib/multiDiffEditor` (its modified sides are read-only, upstream edits them in place); the diff editor's original pane, drawn by hand (`original_pane`, diff_editor_view.rs), which upstream can focus, select and search in; the stacked editors of notebook cells and the Editor Playground (port/notes.md, Stacked code editors), which draw every unfocused model as lines only and leave its rows exposed to the active editor's mouse handling. | N code editors with their own viewport, focus, cursor and widgets render in one group, and a multi diff modified side takes typing and undo. |
@@ -206,7 +206,7 @@ One row per upstream unit, generated by `bun port/tools/gen-ledger.ts`; mileston
| platform/encryption | src/vs/platform | M10 | removed | | the port keeps secrets as Keychain items (MainThreadSecretState row, port/notes.md), so there is no safeStorage key to encrypt with |
| platform/endpoint | src/vs/platform | | removed | | no remote or tunnels by decision (port/notes.md); one local extension host |
| platform/environment | src/vs/platform | M10 | verified | | port/tools/settings-check environment: the paths and values init data carries match the reference except appName, uriScheme, machineId format and isTelemetryEnabled (product and no-telemetry decisions); argv.ts and argvHelper.ts are ported in argv.rs (`OPTIONS`, minimist parsing, `parseArgs`, `--goto` validation, help and version text), which cli.rs and `start_open_window` parse with (cargo test -p app argv:: : parses_the_command_line_as_upstream_argv, help_matches_upstream_text, goto_mode_validates_its_arguments); stdin.ts piped input decoded from the terminal encoding (resolveTerminalEncoding: cargo test -p app cli::); userDataPath.ts and the Electron main environment are replaced by main.rs's flags (`--user-data-dir`, `--extensions-dir`, `--profile`, `--profile-temp`, `--extensionDevelopmentPath`, `--extensionTestsPath`); copilotHome removed (no AI by decision) |
-| platform/extensionManagement | src/vs/platform | M18 | verified | | zip64 VSIX read as yauzl does (cargo test -p exthost zip::tests::reads_zip64_records_and_extended_information). VSIX and gallery install, update, uninstall and clean-up on disk (extensionsScannerService.ts, extensionsProfileScannerService.ts layout): cargo test -p exthost extension_management, zip; PORT_GALLERY=1 port/tools/extensions-check 5 ok (an ESM VSIX and redhat.vscode-yaml from Open VSX activate without restart); the extracted package.json is written as `JSON.stringify(manifest, null, '\t')`, strings untouched (cargo test -p exthost keeps_double_spaces_in_manifest_strings; port/tools/update-check pre-release installs the rust-analyzer pre-release, whose setting descriptions have two spaces in a row). The CLI (cliProcessMain.ts, extensionManagementCLI.ts): cli_process.rs runs `--list-extensions` (`--show-versions`, `--category`), `--install-extension` (ids, `id@version`, VSIX paths, `--force`, `--pre-release`), `--uninstall-extension`, `--update-extensions`, `--locate-extension` and `--install-source` with `--profile`, and exits without a window; a built-in is located and refused uninstalling, downloads follow `extensions.verifySignature` (cargo test -p app cli::tests::uninstall_extension_runs_in_the_cli_without_the_app cli_process::; the release binary as bin/code starts it installs, updates, lists, locates and uninstalls Open VSX extensions and a VSIX) |
+| platform/extensionManagement | src/vs/platform | M18 | ported | [3 L] the workbench has no ExtensionsWatcher: a running app does not start or stop the extensions a CLI install or uninstall adds to or removes from `extensions.json` until it restarts <br> [3 S] workbench/extension_management.rs `install_vsixs`: a VSIX installed in the workbench does not bring its `extensionDependencies` and `extensionPack` from the gallery (the CLI and gallery installs do) | zip64 VSIX read as yauzl does (cargo test -p exthost zip::tests::reads_zip64_records_and_extended_information). VSIX and gallery install, update, uninstall and clean-up on disk (extensionsScannerService.ts, extensionsProfileScannerService.ts layout): cargo test -p exthost extension_management, zip; PORT_GALLERY=1 port/tools/extensions-check 5 ok (an ESM VSIX and redhat.vscode-yaml from Open VSX activate without restart); the extracted package.json is written as `JSON.stringify(manifest, null, '\t')`, strings untouched (cargo test -p exthost keeps_double_spaces_in_manifest_strings; port/tools/update-check pre-release installs the rust-analyzer pre-release, whose setting descriptions have two spaces in a row). The CLI (cliProcessMain.ts, extensionManagementCLI.ts): cli_process.rs runs `--list-extensions` (`--show-versions`, `--category`), `--install-extension` (ids, `id@version`, VSIX paths, `--force`, `--pre-release`), `--uninstall-extension`, `--update-extensions`, `--locate-extension` and `--install-source` with `--profile`, and exits without a window; a built-in is located and refused uninstalling, downloads follow `extensions.verifySignature` (cargo test -p app cli::tests::uninstall_extension_runs_in_the_cli_without_the_app cli_process::; `getAllDepsAndPackExtensions` for CLI and workbench gallery installs: cargo test -p exthost dependencies_and_packs_come_along_recursively, and the release CLI installs ms-python.isort with ms-python.python and its pack; the release binary as bin/code starts it installs, updates, lists, locates and uninstalls Open VSX extensions and a VSIX) |
| platform/extensionRecommendations | src/vs/platform | M18 | verified | | recommendation reasons and the workspace prompt text (extensionRecommendations.ts, extensionRecommendationNotificationService.ts): cargo test -p app recommendation; ui-pair port/fixtures/extensions/ui-recommendations.json (prompt, Recommended view) against the reference |
| platform/extensionResourceLoader | src/vs/platform | M18 | verified | | installed extensions' README, changelog and icon read from disk, gallery ones from their asset URIs (Open VSX has no `resourceUrlTemplate`): ui-pair port/fixtures/extensions/ui-view.json `details` shows the yaml README as the reference |
| platform/extensions | src/vs/platform | M18 | verified | | extensionValidator.ts with the cases of extensionValidator.test.ts: cargo test -p exthost extension_validator; installs validated in PORT_GALLERY=1 port/tools/extensions-check; built-in extensions are not validated yet |