Skip to content

fix(examples): restored expected behavior for Ownable#4207

Merged
gfanton merged 3 commits intognolang:fix/crossrealm/examples-integrationsfrom
n2p5:fix-ownable
Apr 24, 2025
Merged

fix(examples): restored expected behavior for Ownable#4207
gfanton merged 3 commits intognolang:fix/crossrealm/examples-integrationsfrom
n2p5:fix-ownable

Conversation

@n2p5
Copy link
Contributor

@n2p5 n2p5 commented Apr 23, 2025

Ownable had a regression in expected behavior when some calls were changed from std.PreviousRealm() -> std.CurrentRealm()

This PR fixes the expected behavior of Ownable so that it uses std.PreviousRealm() as it did before by fixing the tests so that they run within a CodeRealm context.

This also fixes the failing tests for gno.land/r/n2p5/mgroup that were introduced after the recent change to Ownable.

@Gno2D2
Copy link
Collaborator

Gno2D2 commented Apr 23, 2025

🛠 PR Checks Summary

All Automated Checks passed. ✅

Manual Checks (for Reviewers):
  • IGNORE the bot requirements for this PR (force green CI check)
Read More

🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers.

✅ Automated Checks (for Contributors):

No automated checks match this pull request.

☑️ Contributor Actions:
  1. Fix any issues flagged by automated checks.
  2. Follow the Contributor Checklist to ensure your PR is ready for review.
    • Add new tests, or document why they are unnecessary.
    • Provide clear examples/screenshots, if necessary.
    • Update documentation, if required.
    • Ensure no breaking changes, or include BREAKING CHANGE notes.
    • Link related issues/PRs, where applicable.
☑️ Reviewer Actions:
  1. Complete manual checks for the PR, including the guidelines and additional checks if applicable.
📚 Resources:
Debug
Manual Checks
**IGNORE** the bot requirements for this PR (force green CI check)

If

🟢 Condition met
└── 🟢 On every pull request

Can be checked by

  • Any user with comment edit permission

@codecov
Copy link

codecov bot commented Apr 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@n2p5 n2p5 changed the title feat: fix ownable so that PreviousRealm meets expected behavior fix: restored expected behavior for Ownable Apr 23, 2025
@n2p5 n2p5 changed the title fix: restored expected behavior for Ownable fix(examples): restored expected behavior for Ownable Apr 23, 2025
Copy link
Contributor

@leohhhn leohhhn left a comment

Choose a reason for hiding this comment

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

Can you please completely revert the changes? Ie the names of the functions as well? 🙏

@gfanton
Copy link
Member

gfanton commented Apr 23, 2025

After discussing with @jaekwon, it seems that we want to keep OwnedByPrevious if using PreviousRealm.

Updated in #4211.

@gfanton gfanton changed the base branch from master to fix/crossrealm/examples-integrations April 24, 2025 08:45
@gfanton
Copy link
Member

gfanton commented Apr 24, 2025

Merging in #4211

@gfanton gfanton merged commit bb88a73 into gnolang:fix/crossrealm/examples-integrations Apr 24, 2025
14 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🧾 package/realm Tag used for new Realms or Packages.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants