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(gno test): pass ExecContext when initializing imported packages #1965

Merged
merged 6 commits into from
May 9, 2024

Conversation

moul
Copy link
Member

@moul moul commented Apr 21, 2024

Cherry-picked from 8fe571f (#880).

Contributors' checklist...
  • Added new tests, or not needed, or not feasible
  • Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • Updated the official documentation or not needed
  • No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • Added references to related issues and PRs
  • Provided any useful hints for running manual tests
  • Added new benchmarks to generated graphs, if any. More info here.

… imports containing an init() func

Signed-off-by: moul <[email protected]>
@moul moul self-assigned this Apr 21, 2024
@github-actions github-actions bot added the 📦 🤖 gnovm Issues or PRs gnovm related label Apr 21, 2024
Signed-off-by: moul <[email protected]>
Copy link

codecov bot commented Apr 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.96%. Comparing base (8057505) to head (1d4403a).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1965   +/-   ##
=======================================
  Coverage   54.96%   54.96%           
=======================================
  Files         481      481           
  Lines       67391    67400    +9     
=======================================
+ Hits        37040    37049    +9     
  Misses      27330    27330           
  Partials     3021     3021           

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

moul added 2 commits April 21, 2024 13:35
Signed-off-by: moul <[email protected]>
Signed-off-by: moul <[email protected]>
@github-actions github-actions bot added the 📦 ⛰️ gno.land Issues or PRs gno.land package related label Apr 21, 2024
@moul moul marked this pull request as ready for review April 21, 2024 12:07
@moul moul requested review from jaekwon, piux2 and thehowl as code owners April 21, 2024 12:07
@moul moul requested review from deelawn, mvertes, zivkovicmilos and a team as code owners May 9, 2024 13:17
@github-actions github-actions bot added the 🧾 package/realm Tag used for new Realms or Packages. label May 9, 2024
Copy link
Member

@thehowl thehowl left a comment

Choose a reason for hiding this comment

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

I took some liberty to modify this PR, for good reason. I tried copying over the files to master, but could see they were succeeding...

However, I saw the practical changes and saw where the bug could occur. I modified your test case so that it tests for a case which does indeed fail on master.

@thehowl thehowl changed the title fix: init ctx of injected package when using gno test to support lazy imports containing an init() func fix(gno test): pass ExecContext when initializing imported packages May 9, 2024
@thehowl thehowl merged commit abaf103 into gnolang:master May 9, 2024
220 of 222 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 ⛰️ gno.land Issues or PRs gno.land package related 📦 🤖 gnovm Issues or PRs gnovm related 🧾 package/realm Tag used for new Realms or Packages.
Projects
Status: Done
Status: ✅ Done
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants