Skip to content

fix gate-ing of atomic64 in tests#607

Merged
jlizen merged 3 commits intotower-rs:mainfrom
alexanderkjall:fix-atomic-test
May 6, 2026
Merged

fix gate-ing of atomic64 in tests#607
jlizen merged 3 commits intotower-rs:mainfrom
alexanderkjall:fix-atomic-test

Conversation

@alexanderkjall
Copy link
Copy Markdown
Contributor

Motivation

Fixes tests on some architectures.

based on: https://salsa.debian.org/rust-team/debcargo-conf/-/blob/master/src/tower-http/debian/patches/gate-tests-atomic-u64

Solution

use #[cfg(target_has_atomic = "64")]

Copy link
Copy Markdown
Member

@jplatte jplatte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about switching to AtomicU16? Would that allow the tests to run on the architectures in question?

@jlizen
Copy link
Copy Markdown
Member

jlizen commented May 5, 2026

@alexanderkjall I think AtomicUsizeeverywhere would be our best bet. Since, we should also update our doc tests (and we don't want to show an AtomicU16 in them).

That will get rid of the cfg flags, which will be nicer to maintain.

Are you interested in cutting another commit?

@alexanderkjall
Copy link
Copy Markdown
Contributor Author

Sure, replaced AtomicU64 with AtomicUsize, also switched it out in a doctest.

Copy link
Copy Markdown
Member

@jlizen jlizen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appreciate it!

@jlizen jlizen merged commit 890f66a into tower-rs:main May 6, 2026
12 checks passed
@alexanderkjall alexanderkjall deleted the fix-atomic-test branch May 6, 2026 19:40
eleboucher pushed a commit to eleboucher/towonel that referenced this pull request May 9, 2026
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [tower-http](https://github.com/tower-rs/tower-http) | workspace.dependencies | patch | `0.6.9` → `0.6.10` |

---

### Release Notes

<details>
<summary>tower-rs/tower-http (tower-http)</summary>

### [`v0.6.10`](https://github.com/tower-rs/tower-http/releases/tag/tower-http-0.6.10)

[Compare Source](tower-rs/tower-http@tower-http-0.6.9...tower-http-0.6.10)

#### Added

- `follow-redirect`: expose `Attempt::method()` and `Attempt::previous_method()`
  so redirect policies can react to method changes across redirects (e.g.
  POST to GET on 301/303) ([#&#8203;559])

#### Fixed

- Restore `tokio` and `async-compression` as no-op features. These will be
  removed next breaking release ([#&#8203;667])

[#&#8203;559]: tower-rs/tower-http#559

[#&#8203;667]: tower-rs/tower-http#667

#### What's Changed

- fix: restore tokio and async-compression as no-op features by [@&#8203;jlizen](https://github.com/jlizen) in [#&#8203;667](tower-rs/tower-http#667)
- fix gate-ing of atomic64 in tests by [@&#8203;alexanderkjall](https://github.com/alexanderkjall) in [#&#8203;607](tower-rs/tower-http#607)
- follow\_redirect: expose previous and next request methods by [@&#8203;lucab](https://github.com/lucab) in [#&#8203;559](tower-rs/tower-http#559)
- chore: release tower-http 0.6.10 by [@&#8203;jlizen](https://github.com/jlizen) in [#&#8203;669](tower-rs/tower-http#669)

#### New Contributors

- [@&#8203;lucab](https://github.com/lucab) made their first contribution in [#&#8203;559](tower-rs/tower-http#559)

**Full Changelog**: <tower-rs/tower-http@tower-http-0.6.9...tower-http-0.6.10>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMDEuMSIsInVwZGF0ZWRJblZlciI6IjQzLjEwMS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJ0eXBlL3BhdGNoIl19-->

Reviewed-on: https://git.erwanleboucher.dev/eleboucher/towonel/pulls/34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants