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

fix: Allow unexpected returns #1704

Merged
merged 1 commit into from
Apr 24, 2024
Merged

Conversation

dustinbyrne
Copy link
Contributor

@dustinbyrne dustinbyrne commented Apr 4, 2024

Resolves #1703

I've manually pulled this change into IntelliJ to verify it'll load AppMaps which were previously malformed.

Copy link

github-actions bot commented Apr 5, 2024

AppMap runtime code review

Summary Status
Failed tests ✅ All tests passed
API changes 0️⃣ No API changes
Security flaws ✅ None detected
Performance problems ✅ None detected
Code anti-patterns ✅ None detected
New AppMaps 0️⃣ No new AppMaps

@dustinbyrne dustinbyrne marked this pull request as ready for review April 5, 2024 18:58
Copy link
Collaborator

@dividedmind dividedmind left a comment

Choose a reason for hiding this comment

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

NB, the last commit should probably come first (with modified message) so that all the commits build.

// This can happen in async contexts where the recording began in the middle
// of another async task. It's possible that the parent call was executed
// before the recording began. If this is the case, discard the return event.
return;
Copy link
Collaborator

Choose a reason for hiding this comment

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

It would be good idea to raise a warning, but I'm not sure where it should go...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought the same thing. The issue is that this is called in so many different contexts it felt wrong throwing a console.log in there, and we don't have any other logging abstraction.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, good discussion but the main thing is to just not crash :-)

@dustinbyrne dustinbyrne merged commit bccece5 into main Apr 24, 2024
18 checks passed
@dustinbyrne dustinbyrne deleted the fix/allow-unexpected-returns branch April 24, 2024 00:22
@appland-release
Copy link
Contributor

🎉 This PR is included in version @appland/models-v2.10.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@appland-release
Copy link
Contributor

🎉 This PR is included in version @appland/appmap-v3.137.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Returns without calls are dropped
4 participants