Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Try and fix convertible#5503

Open
IyeOnline wants to merge 2 commits intomainfrom
topic/convertible
Open

Try and fix convertible#5503
IyeOnline wants to merge 2 commits intomainfrom
topic/convertible

Conversation

@IyeOnline
Copy link
Contributor

@IyeOnline IyeOnline commented Oct 7, 2025

This attempts to fix an issue that recently became apparent with
tenzir.cache.capacity, where the default value is an "invalid"
type (unsigned long long) and hence the conversion would fail,
even though it could be narrowed.

Investigating this revealed numerous issues in how convertible,
to, the try_get functions were implemented/inter-dependent.
Appearently in the release v5.14 -> v5.15 something changed in
the include order and the previously working setup broke.

Ideally we would entirely refactor convertible&friends, but
that seems out of scope.

@github-actions
Copy link

github-actions bot commented Oct 7, 2025

Tip

Please add a changelog entry for this PR by clicking one of the links below.

The changelog entry will be pre-filled with information from this PR. You can edit the title and description as needed before committing.

You can also add a changelog entry manually by running ./changelog/add.py change|bugfix|feature on the command-line.

📝 Changelog Entries

Type Description Link
🔄 Change Modifications to existing functionality Add Change
🐛 Bugfix Fixes for bugs or issues Add Bugfix
Feature New functionality or enhancements Add Feature

📚 Documentation Preview

Docs preview is ready!

🔗 Preview Docs: https://tenzir-tenzir-preview-5503.surge.sh

The preview will be updated automatically when you push new commits to this PR.

@IyeOnline IyeOnline added the bug label Oct 7, 2025
@IyeOnline IyeOnline force-pushed the topic/convertible branch 6 times, most recently from c6a8f21 to cfe4c41 Compare October 8, 2025 09:49
@IyeOnline IyeOnline force-pushed the topic/convertible branch 3 times, most recently from a68e147 to 1658c75 Compare October 13, 2025 09:58
@IyeOnline
Copy link
Contributor Author

Need to remember to revert #5504

raxyte and others added 2 commits October 28, 2025 14:02
There now is a new `convertible` overload for `concrete_type`s that infers
the third "attribute" type argument.

Additionally, these functions are now guarded against usage with types
that are not `concrete_type`s.
@tobim tobim force-pushed the topic/convertible branch from 1658c75 to f32c716 Compare October 28, 2025 13:06
@mavam mavam removed the bug label Dec 19, 2025
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

Comments