Selected changesmerged Sep 22, 2026
[compiler] Allow setState after await in effect functionsRust · 151 + / 0 −
Introduces 3 new declarations in compiler/crates/react_compiler_validation/src/validate_no_set_state_in_effects.rs.
Adds new language design rather than adjusting what was there. Tests changed with it, with code of their own.
compiler/crates/react_compiler_validation/src/validate_no_set_state_in_effects.rs ↗ · 8 files
@@ -577,3 +594,62 @@ fn get_set_state_call( } Ok(None) }++/// Computes the set of blocks which begin after an `await` has executed on+/// *every* control flow path from the function entry. Instructions in such+/// blocks (and instructions following an Await within any block) are+/// guaranteed to run asynchronously, in a microtask after the synchronous+/// portion of the function has returned.+///+/// This is a forward must-dataflow: a block starts after an await iff all of+/// its predecessors end after an await. Suppression based on this analysis is+/// sound in the presence of try/catch because HirBuilder::push terminates the+/// current block after every instruction within a try region: a MaybeThrow+/// block can therefore only throw from its single instruction, and when that+/// instruction is an Await the rejection also resumes in a microtask.+///+/// Port of computeBlocksStartingAfterAwait in ValidateNoSetStateInEffects.ts.+fn compute_blocks_starting_after_await(func: &HirFunction) -> FxHashSet<BlockId> {+ let mut blocks_with_await: FxHashSet<BlockId> = FxHashSet::default();+ for (block_id, block) in &func.body.blocks {+ let has_await = block.instructions.iter().any(|&instr_id| {+ matches!(+ func.instructions[instr_id.0 as usize].value,+ InstructionValue::Await { .. }+ )+ });+ if has_await {+ blocks_with_await.insert(*block_id);+ }+ }+ // Initialize non-entry blocks optimistically so that loop back-edges do+ // not pessimize the meet; the fixpoint then lowers any block reachable
sessions: Restore sandbox sessions promptly on reloadTypeScript · 587 + / 193 −
Introduces 7 new declarations in src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxAgentHostContribution.ts.
Adds new core implementation rather than adjusting what was there. Tests changed with it, with code of their own.
src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxAgentHostContribution.ts ↗ · 14 files
@@ -249,96 +281,214 @@ export class CloudSandboxAgentHostContribution extends Disposable implements IWo })); } - /**- * Discover environment-bound sandbox sessions and seed them into per-environment providers so- * they appear in the sessions list **without** connecting. Reconciles against the result:- * environments that have vanished from discovery (e.g. their task was archived) and are not- * currently connected are torn down, so stale providers/sessions don't linger. Best-effort:- * a failed discovery is logged and leaves existing state untouched.- *- * Runs are serialized, with at most one follow-up queued, so overlapping triggers can't- * interleave their reconciliation passes.- */- private _discoverAndSeed(): Promise<void> {+ protected async _refreshIfStale(): Promise<void> {+ if (this._discoveryInFlight) {+ await (this._discoveryQueued ?? this._discoveryInFlight);+ return;+ }+ if (!this._hostService.hasFocus || (this._lastDiscoveryAttempt !== undefined && Date.now() - this._lastDiscoveryAttempt < this._discoveryRetryInterval)) {+ return;+ }+ await this._discoverAndSeed(true);+ }++ /** Share overlapping scans, queuing at most one full scan when a stronger refresh is needed. */+ private _discoverAndSeed(incremental = false, retry = false): Promise<void> {+ if (!this._isEnabled() || this._store.isDisposed) {+ return Promise.resolve();+ } if (this._discoveryInFlight) {+ if (!retry && this._discoveryToken === this._enabledCts.token && (incremental || !this._discoveryIncremental)) {+ return this._discoveryQueued ?? this._discoveryInFlight;
stream: trim per-pipe and per-tee costs in webstreamsJavaScript · 127 + / 78 −
Introduces 4 new declarations in lib/internal/webstreams/readablestream.js.
Adds new runtime rather than adjusting what was there. Read the linked PR for the surrounding test context.
lib/internal/webstreams/readablestream.js ↗ · 2 files
@@ -1053,53 +1078,15 @@ class ReadableStreamBYOBReader { * done : boolean, * }>} */- async read(view, options = kEmptyObject) {- if (!isReadableStreamBYOBReader(this))- throw new ERR_INVALID_THIS('ReadableStreamBYOBReader');- validateBuffer(view, 'view');- validateObject(options, 'options', kValidateObjectAllowObjectsAndNull);-- const viewByteLength = ArrayBufferViewGetByteLength(view);- const viewBuffer = ArrayBufferViewGetBuffer(view);-- if (isSharedArrayBuffer(viewBuffer)) {- throw new ERR_INVALID_ARG_VALUE(- 'view',- view,- 'must not be backed by a SharedArrayBuffer',- );- }-- const viewBufferByteLength = ArrayBufferPrototypeGetByteLength(viewBuffer);-- if (viewByteLength === 0 || viewBufferByteLength === 0) {- throw new ERR_INVALID_STATE.TypeError(- 'View or Viewed ArrayBuffer is zero-length or detached');- }-- // Supposed to assert here that the view's buffer is not- // detached, but there's no API available to use to check that.-- const min = options?.min ?? 1;- validateNumber(min, 'options.min');- if (!NumberIsInteger(min))
fix(check): pin @types/node and resolve it through the configured registryRust · 132 + / 19 −
Introduces 4 new declarations in cli/tools/installer/npm_compat.rs.
Adds new language design rather than adjusting what was there. Read the linked PR for the surrounding test context.
cli/tools/installer/npm_compat.rs ↗ · 4 files
@@ -1872,6 +1927,63 @@ mod tests { assert!(leftovers.is_empty(), "leftover staging dirs: {leftovers:?}"); } + #[test]+ fn test_extract_tarball_gz_atomic_replaces_other_version() {+ let dir = tempfile::tempdir().unwrap();+ let dest = dir.path().join("node");+ // A complete copy of a version we no longer want: what an older Deno left+ // behind when this followed the registry's `latest` instead of a pin.+ std::fs::create_dir_all(&dest).unwrap();+ std::fs::write(+ dest.join("package.json"),+ r#"{"name":"@types/node","version":"26.6.2"}"#,+ )+ .unwrap();+ std::fs::write(dest.join("index.d.ts"), "stale").unwrap();++ let gz = make_tarball_gz(&[+ (+ "package.json",+ r#"{"name":"@types/node","version":"24.2.0"}"#,+ ),+ ("index.d.ts", "pinned"),+ ]);+ extract_tarball_gz_atomic(&gz, &dest, Some("24.2.0")).unwrap();++ assert_eq!(+ std::fs::read_to_string(dest.join("index.d.ts")).unwrap(),+ "pinned"+ );+ }++ #[test]
Clean up diagnostic hashingRust · 34 + / 50 −
Introduces 1 new declaration in compiler/rustc_errors/src/diagnostic.rs.
Adds new language design rather than adjusting what was there. Read the linked PR for the surrounding test context.
compiler/rustc_errors/src/diagnostic.rs ↗ · 2 files
@@ -305,46 +307,31 @@ impl DiagInner { } } - /// Fields used for Hash, and PartialEq trait.- fn keys(- &self,- ) -> (- &Level,- &[(DiagMessage, Style)],- &Option<ErrCode>,- &MultiSpan,- &[Subdiag],- &Suggestions,- Vec<(&DiagArgName, &DiagArgValue)>,- &Option<IsLint>,- ) {- (- &self.level,- &self.messages,- &self.code,- &self.span,- &self.children,- &self.suggestions,- self.args.iter().collect(),- // omit self.sort_span- &self.is_lint,- // omit self.emitted_at- )- }-}--impl Hash for DiagInner {- fn hash<H>(&self, state: &mut H)