ITADN
fastly/cli/Issues

[FEATURE REQUEST] `compute deploy` should automatically `compute build`

#1586Opendgohman-fastly 创建于 2025-11-21
feature request
D
dgohman-fastlycommented
It'd be convenient if `fastly compute deploy` could automatically do a `fastly compute build` when run from within a source tree and no explicit `--package` is given. That would have saved me some time trying to figure out why the changes I had just made to a project weren't showing up, because I had done a `fastly compute deploy` without doing a `fastly compute build` first. My expectation here were inspired by how in Rust, `cargo run` automatically builds the project before running it. For completeness, here's a shell session of me making an error in my code, and `fastly compute deploy` deploying an earlier build without noticing it: <details> ```console $ fastly compute build ✓ Verifying fastly.toml ✓ Identifying package name ✓ Identifying toolchain ✗ Running [scripts.build] INFO: Command output: -------------------------------------------------------------------------------- Compiling fastly-compute-project v0.1.0 (/home/me/test) error[E0425]: cannot find function `error` in this scope --> src/main.rs:18:5 | 18 | error(); | ^^^^^ not found in this scope For more information about this error, try `rustc --explain E0425`. error: could not compile `fastly-compute-project` (bin "fastly-compute-project") due to 1 previous error -------------------------------------------------------------------------------- ERROR: error during execution process (see 'command output' above): exit status 101. Here are some steps you can follow to debug the issue: - Re-run the fastly command with the --verbose flag to see more information. - Is the required language toolchain (node/npm, rust/cargo etc) installed correctly? - Is the required version (if any) of the language toolchain installed/activated? - Were the required dependencies (package.json, Cargo.toml etc) installed? - Did the build script (see fastly.toml [scripts.build]) produce a ./bin/main.wasm binary file? - Was there a configured [scripts.post_build] step that needs to be double-checked? For more information on fastly.toml configuration settings, refer to https://www.fastly.com/documentation/reference/compute/fastly-toml $ fastly compute deploy ✓ Verifying fastly.toml ✓ Uploading package ✓ Activating service (version 4) Manage this service at: https://manage.fastly.com/configure/services/ABCDEFGHIJKLMNOPQRSTUV View this service at: https://ambiguous-kitten-bonnet.edgecompute.app SUCCESS: Deployed package (service ABCDEFGHIJKLMNOPQRSTUV, version 4) $ ``` </details>
0 条评论