Skip to content

Conversation

@cossio
Copy link
Contributor

@cossio cossio commented Jun 15, 2025

Attempt to fix #685

@cossio
Copy link
Contributor Author

cossio commented Jun 15, 2025

Tests pass locally. CI failure seems unrelated to this PR, and is due to CI using deprecated actions. To fix that, please consider merging the Dependabot PRs.

@cossio
Copy link
Contributor Author

cossio commented Jun 16, 2025

Integration tests are also failing for #693, which suggests that is unrelated to the fix introduced in this PR.

@codecov
Copy link

codecov bot commented Jun 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.46%. Comparing base (134b9fd) to head (2cf28d0).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #688      +/-   ##
==========================================
+ Coverage   93.44%   93.46%   +0.01%     
==========================================
  Files          14       14              
  Lines         992      994       +2     
==========================================
+ Hits          927      929       +2     
  Misses         65       65              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cossio
Copy link
Contributor Author

cossio commented Jun 20, 2025

Friendly bump.

Copy link
Member

@devmotion devmotion left a comment

Choose a reason for hiding this comment

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

@oxinabox
Copy link
Member

While it doesn't hit the one for AbstractThunk, the code is right.
And it is needed because of ambiguity.
But yes, it could be hit by writing a test that uses an InplaceThunk

@cossio
Copy link
Contributor Author

cossio commented Jun 22, 2025

I added a test:

it = InplaceableThunk(x -> x + [1], @thunk [1.0])
@test ProjectTo(BitArray([0]))(it) == NoTangent()

But that still gave an ambiguity error. So I replaced:

(::ProjectTo{NoTangent})(::AbstractThunk) = NoTangent()

with

(::ProjectTo{NoTangent})(::InplaceableThunk) = NoTangent()

which solves the issue.

And now both method definitions are hit by the tests.

@cossio cossio requested a review from devmotion June 22, 2025 10:48
@cossio
Copy link
Contributor Author

cossio commented Jun 22, 2025

Could we tag release with this? If so, should I bump the version in this PR?

@devmotion
Copy link
Member

Yes, good point, please go ahead and update the version number in this PR.

@cossio
Copy link
Contributor Author

cossio commented Jun 22, 2025

please go ahead and update the version number in this PR.

Done.

@devmotion devmotion merged commit 869f452 into JuliaDiff:main Jun 22, 2025
21 of 27 checks passed
@cossio cossio deleted the thunk branch June 22, 2025 20:47
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.

MethodError: (::ProjectTo{NoTangent, @NamedTuple{}})(::Thunk) is ambiguous

3 participants