Skip to content

deploy: deny map_err_ignore and unused_result_ok in deploy crates (closes #13801) - #14487

Merged
TrapsterDK merged 1 commit into
mainfrom
cloud/13801-deploy
Nov 21, 2026
Merged

TrapsterDK merged 1 commit into
mainfrom
cloud/13801-deploy

Conversation

@TrapsterDK

Copy link
Copy Markdown
Collaborator

Closes #13801

Last code slice of #13801 (deploy/private/**), following #13892, #13987 and #14222.

  • write!/writeln!(..).ok() into a String now use push_str(&format!(..)), with \n added for every former writeln!. Unused fmt::Write imports are gone.
  • map_err(|_| ..) sites keep the error: cloudflare, maven (pom UTF-8, secret key parse, passphrase unlock), nuget, stage, the install test fake, and SymbolsError::DwarfOutsideBundle, which now carries a StripPrefixError source.
  • bin_release_driver tests use dx_testing::scratch_dir and no longer remove their dirs by hand.
  • The maven bad-key test checks the prefix and the ; refusing suffix. The no-leak asserts are unchanged.
  • All 19 deploy crate roots deny indexing_slicing, map_err_ignore, string_slice and unused_result_ok.

The .bazelrc / strict-tier flip is tracked in #14484, which waits on #13800.

Tested:

  • tools/dx lint //deploy/... with both -D flags temporarily added to .bazelrc (since reverted): no map_err_ignore or unused_result_ok findings. The lint exit was 1 only because of existing warnings in cli/* and in deploy files this PR does not touch.
  • bazel test //deploy/private:dx_deploy_tools_test //deploy/private/release:all //deploy/private/install:dx_install_tools_test //deploy/private/symbols:all //deploy/private/offline:all //tools/ci:lint_attributes_test: 28 passed and 2 skipped (dsym/pdb). //tools/ci:lint_attributes_test fails on main too, at cli/exec_quality/src/testing.rs (expect allowlist), cli/codegen_shard/src/writer.rs and deploy/private/src/crates.rs:499 (drop(fs::..), from deploy: attach the published .crate to the GitHub release (closes #7434) #14337). This PR does not touch any of those files.
  • Nested-Bazel and consumer tests were not run locally.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xut2hzWDHEg9zNhhTJrJ7t

@TrapsterDK TrapsterDK added the needs-review Touches review paths; needs a second-session Review: comment label Nov 21, 2026
…oses #13801)

String writes use push_str(&format!(..)), map_err closures keep the
error they used to drop, release driver tests use dx_testing::scratch_dir,
and every deploy crate root denies both lints.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xut2hzWDHEg9zNhhTJrJ7t
@TrapsterDK
TrapsterDK merged commit 030ea02 into main Nov 21, 2026
3 of 4 checks passed
@TrapsterDK
TrapsterDK deleted the cloud/13801-deploy branch November 21, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-review Touches review paths; needs a second-session Review: comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rust: deny unused_result_ok and map_err_ignore in Rust outside cli/, then in .bazelrc

1 participant