Commit Graph

8 Commits

Author SHA1 Message Date
Tautik Agrahari
ce89a98b53 fix(bootstrap): warn before sudo and document install steps (#9501)
- new `script/warp_sudo`: echoes each privileged command, prompts
`[y/N]` from `/dev/tty`, shells to real `sudo` on confirm.
`WARP_BOOTSTRAP_YES=1` or non-tty stdin skips.
- `script/bootstrap`: static `--help` install list dropped. `-y`/`--yes`
exports `WARP_BOOTSTRAP_YES=1` for children.
- ten direct `sudo` call-sites in `script/{macos,linux}/bootstrap` +
`script/linux/install_{build,runtime,test}_deps` switched to
`warp_sudo`. windows unchanged.
- `README.md`: short "what `./script/bootstrap` does" subsection
pointing at the platform scripts as the source of truth.

closes #9421.
2026-05-04 16:36:47 -04:00
Kevin Chevalier
f696f5b830 Revert "Fix schema generator binary recompilation during release bundling." (#9676)
Reverts warpdotdev/warp#9632

Will look at in the future. Currently causing dev build issues like
https://github.com/warpdotdev/warp-internal/actions/runs/25187609052/job/73853657131
2026-04-30 16:42:57 -05:00
David Stern
f61ef1dcd9 Fix schema generator binary recompilation during release bundling. (#9632)
## Description
The release bundling workflow runs `prepare_bundled_resources` after the
main `cargo build`, and that script in turn invokes `cargo run --bin
generate_settings_schema`. Until now we passed neither `--features` nor
`--target` to this run, so cargo's resolver-v2 saw a different
per-package feature unification than the main build and recompiled every
dependency whose enabled features differed (`rust-embed` with
`debug-embed`, `warp_core`'s `release_bundle`, sentry, jemalloc, etc.).
This added significant time to release builds and pulled in extra system
dependencies (e.g. protoc) for jobs that should otherwise just be
packaging the prebuilt binary.

There was a secondary correctness issue: the schema generator iterates
settings registered via `inventory::submit!`, and `#[cfg(feature =
\"...\")]`-gated settings were silently omitted from the schema in any
context whose feature set didn't match the main binary.

The fix threads the build's feature set (and target, where applicable)
through to the schema-generator invocation, and makes package selection
explicit with `-p warp`. With matching features and target, cargo reuses
the existing compilation artifacts; with the same feature set, the
generated schema is also faithful to what the bundled binary actually
exposes.

## Testing
Verified `bash -n` syntax for the modified bash scripts and parsed the
modified PowerShell files via `pwsh`. Bundling, schema generation, and
CI behavior will be exercised by this PR's release builds.

## Agent Mode
- [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode


[Conversation](https://staging.warp.dev/conversation/1bd5574f-df28-4c2e-867d-40d71ed7e827)
2026-04-30 15:57:17 -04:00
Landon
2113a0a3cf Replace deprecated apt-key with gpg --dearmor for gcloud install (#9538)
## Description

Fixes #9534.

`script/linux/install_test_deps:32` registered Google Cloud SDK's apt
signing key via `apt-key`, which was removed from `apt` in 2.9.17
(2024-12) and is no longer present on Ubuntu 25.04+ and
Debian 13+. On those distros `script/linux/bootstrap` failed for any
contributor who didn't already have `gcloud` installed, with a confusing
`sudo: 'apt-key': command not found` / `curl: Failed writing body` pair.

Replaced the `apt-key` invocation with `gpg --dearmor`, which is the
documented replacement and works on every Debian-family release back to
Debian 9 / Ubuntu 16.04 — the same lower bound that the existing
`signed-by=/usr/share/keyrings/cloud.google.gpg` directive on the next
line already imposes. Also switched `curl -f` to `curl -fsSL`, the
standard quiet-but-fail-on-error flag set, and added `--yes` so a stale
keyring left from a partial previous bootstrap is overwritten cleanly.

```diff
-    curl -f https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
+    curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor --yes -o /usr/share/keyrings/cloud.google.gpg
```

This is a strict superset of the previous behavior — it works everywhere
the old command worked and additionally on apt 3.0+ where `apt-key` is
gone.

## Testing

Manually ran the patched line on Ubuntu 25.10 (apt 3.1.6, no `apt-key`
binary): it produces `/usr/share/keyrings/cloud.google.gpg` and the
subsequent `apt-get update` / `apt-get install google-cloud-cli`
succeed. Re-ran a second time to confirm `--yes` overwrites the existing
keyring without prompting. No automated regression test added — this is
a one-line bootstrap script change whose failure mode is environmental
(absence of `apt-key` on the host) and CI runs on a distro where the
bug doesn't reproduce.

## Server API dependencies

No server API dependencies.

## Agent Mode
- [ ] Warp Agent Mode - This PR was created via Warp's AI Agent Mode

CHANGELOG-BUG-FIX: 

Co-Authored-By: Warp <agent@warp.dev>
2026-04-30 13:04:56 -04:00
Landon
e91b5a2192 Add libclang-dev and clang-format to Linux bootstrap deps (#9527)
## Description

Adds `libclang-dev` and `clang-format` to the Debian/Ubuntu package list
installed by `script/linux/install_build_deps` (run via
`script/linux/bootstrap`).

Without these, `script/presubmit` fails on a fresh Linux machine that
only ran `script/linux/bootstrap`:
- `clang-format` is invoked directly by the presubmit's C/C++/Obj-C
format check.
- `libclang-dev` pulls in `libclang-common-*-dev`, which provides
clang's resource-dir builtin headers that bindgen needs when nextest
builds `minimp4-sys` (pulled in via `warpui_core`'s `integration_tests`
feature).

Fixes #9526.

## Testing

Manually verified on a fresh Ubuntu setup that `script/linux/bootstrap`
followed by `script/presubmit` no longer fails on the clang-format check
or the bindgen build for `minimp4-sys`. No automated tests added — this
is a build-deps-only change to a shell script.

## Server API dependencies

N/A — no server API changes.

## Agent Mode
- [ ] Warp Agent Mode - This PR was created via Warp's AI Agent Mode
2026-04-30 13:04:02 -04:00
Aloke Desai
929944198c Shrink binary size for the standalone oz cli (#9301)
## Description
Reduces the `oz` CLI tarball size by adapting two techniques the WASM
build already uses for the standalone CLI artifact.

**Measured results**:

| Platform | Before (gzipped) | After (gzipped) | Reduction |
|---|---|---|---|
| macOS aarch64 | ~120 MiB | ~48 MiB | **~−60%** |
| Linux x86_64 | 121.5 MiB | ~49 MiB | **~−60%** |

There are two primary changes:
1. No longer bundle any of the async assets into the headless binary
(this drops ~57 MiB of incompressible PNG/JPG bytes from the binary)

2. Introduce a `release-ci` profile that uses `opt-level = s` and `lto =
fat`. This mirrors the release profile we use on wasm. For the CLI
specifically, this should be a no-op for user-perceived latency: `oz
agent run` is wall-clock-dominated by network round-trips to the LLM API
and file I/O, not by CPU-bound inner loops. The 5–15% slowdown that
`-Os` typically incurs on tight numeric loops is invisible next to a
multi-second model response, and a smaller binary actually loads faster
on cold start.


## Agent Mode
- [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode

## Changelog Entries for Stable

CHANGELOG-OZ: Reduced the `oz` CLI tarball download size by ~60% on both
macOS and Linux.

---------

Co-authored-by: Oz <oz-agent@warp.dev>
2026-04-28 17:20:51 -05:00
David Stern
4a00689af9 Fix CI to work in the warpdotdev/warp repo. (#9226)
## Description

A couple issues that needed fixing:
* Using `--all-features` and `--all-targets` causes us to try to build
the first-party binaries with embedded configuration, which isn't
available from this repository. To unblock CI, we'll only run clippy on
the default feature set for right now.
* Similarly, testing compilation with release configuration was trying
to build the `dev` channel; this switches that over to the `oss`
channel.
2026-04-28 11:34:34 -04:00
David Stern
0dbd3d567a Initial public release of Warp.
Repo-Sync-Origin: warpdotdev/warp-internal@12af1d983b
2026-04-28 08:43:33 -05:00