MCPcopy Create free account
hub / github.com/f0rr0/oliphaunt / replacement_for_upstream_item

Function replacement_for_upstream_item

xtask/src/main.rs:6526–6692  ·  view source on GitHub ↗
(id: &str)

Source from the content-addressed store, hash-verified

6524}
6525
6526fn replacement_for_upstream_item(id: &str) -> Result<Option<&'static str>> {
6527 match id {
6528 "stable-protocol-exports" => {
6529 ensure_file_contains_all(
6530 WASIX_PATCH_PATH,
6531 &[
6532 "src/backend/tcop/postgres.c",
6533 "PGLITE_HOST_EXPORT(\"pgl_startPGlite\")",
6534 "PGLITE_HOST_EXPORT(\"PostgresMainLongJmp\")",
6535 "__attribute__((export_name(\"ProcessStartupPacket\"))) int",
6536 ],
6537 )?;
6538 let patch_text = fs::read_to_string(WASIX_PATCH_PATH)
6539 .with_context(|| format!("read {WASIX_PATCH_PATH}"))?;
6540 if patch_adds_marker(&patch_text, "ProcessStartupPacket: STUB") {
6541 bail!("WASIX patch must not add a stub ProcessStartupPacket");
6542 }
6543 ensure_file_contains_all(
6544 "src/pglite/postgres_mod.rs",
6545 &["PgliteLifecycleExports", "WasixProtocolExports"],
6546 )?;
6547 ensure_file_not_contains_any(
6548 "src/pglite/postgres_mod.rs",
6549 &[
6550 "apply_direct_startup_gucs",
6551 "pgl_apply_default_gucs",
6552 "PostgresRecoverProtocolError",
6553 ],
6554 )?;
6555 ensure_file_contains_all(
6556 "tests/client_compat.rs",
6557 &[
6558 "sqlx_extended_query_errors_recover_after_sync",
6559 "raw_wire_protocol_bind_errors_are_synchronized",
6560 "postgres_control_packets_are_handled_safely",
6561 ],
6562 )?;
6563 Ok(Some("WASIX protocol ABI + client/raw-wire tests"))
6564 }
6565 "stable-checkpointer-disable" => {
6566 ensure_file_contains_all(
6567 WASIX_PATCH_PATH,
6568 &[
6569 "RequestCheckpoint(CHECKPOINT_CAUSE_XLOG)",
6570 "#ifndef __PGLITE__",
6571 "#endif",
6572 ],
6573 )?;
6574 ensure_file_contains_all(
6575 "tests/runtime_smoke.rs",
6576 &["persistent_fresh_initdb_survives_restart_and_stale_state_files"],
6577 )?;
6578 Ok(Some("ported into wasix-dl patch"))
6579 }
6580 "stable-external-checkpointer" => {
6581 ensure_file_contains_all(
6582 WASIX_PATCH_PATH,
6583 &[

Callers 1

audit_upstream_fixesFunction · 0.85

Calls 4

ensure_file_contains_allFunction · 0.85
patch_adds_markerFunction · 0.85
joinMethod · 0.45

Tested by

no test coverage detected