Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upper bound Adapt to avoid test failure. #314

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

andreasnoack
Copy link
Member

@jishnub would you be able to review?

@jishnub
Copy link
Member

jishnub commented Nov 3, 2024

Perhaps it'll be better to update the failing test here, instead of restricting the version? I think we can change

Adapt.adapt_storage(::ArrayConverter, xs::AbstractArray) = convert(Array, xs)

to use Adapt.adapt_structure instead of Adapt.adapt_storage? The following method appears to be narrower than the current one, and works on both versions:

Adapt.adapt_structure(::ArrayConverter, xs::UnitRange) = convert(Array, xs)

It is also closer in intent to what is being tested.

@jishnub
Copy link
Member

jishnub commented Nov 11, 2024

Rebasing on master should fix the invalidation test failure

@andreasnoack
Copy link
Member Author

I forgot to answer here. It wasn't immediately obvious to me what the tests were intended to cover so I didn't feel comfortable adjusting them but if you believe your change above aligns with the original intent of the tests then I think we should go with that instead of this PR.

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.

2 participants