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: global var dependencies #2077

Merged
merged 57 commits into from
Jan 20, 2025
Merged

fix: global var dependencies #2077

merged 57 commits into from
Jan 20, 2025

Conversation

petar-dambovaliev
Copy link
Contributor

@petar-dambovaliev petar-dambovaliev commented May 13, 2024

fixes this by adding missing logic in in findUndefined2

@github-actions github-actions bot added the 📦 🤖 gnovm Issues or PRs gnovm related label May 13, 2024
@petar-dambovaliev petar-dambovaliev marked this pull request as ready for review May 13, 2024 12:16
Copy link

codecov bot commented May 13, 2024

Codecov Report

Attention: Patch coverage is 53.01455% with 226 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
gnovm/pkg/gnolang/preprocess.go 53.01% 209 Missing and 17 partials ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Member

@zivkovicmilos zivkovicmilos left a comment

Choose a reason for hiding this comment

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

Left some nitty comments 🙏

Overall looks good, thank you for the fix 🙏

gnovm/pkg/gnolang/preprocess.go Outdated Show resolved Hide resolved
gnovm/pkg/gnolang/preprocess.go Show resolved Hide resolved
gnovm/pkg/gnolang/preprocess.go Show resolved Hide resolved
gnovm/pkg/gnolang/preprocess.go Show resolved Hide resolved
gnovm/pkg/gnolang/preprocess.go Outdated Show resolved Hide resolved
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.

Please also add more tests to check for different cases, thanks!

@petar-dambovaliev petar-dambovaliev requested review from a team, gfanton and leohhhn as code owners June 12, 2024 13:02
@github-actions github-actions bot added 🧾 package/realm Tag used for new Realms or Packages. 📦 🌐 tendermint v2 Issues or PRs tm2 related 📦 ⛰️ gno.land Issues or PRs gno.land package related labels Jun 12, 2024
@Kouteki
Copy link
Contributor

Kouteki commented Jan 16, 2025

@petar-dambovaliev I've moved this PR to draft until it's ready for review.

@petar-dambovaliev petar-dambovaliev marked this pull request as ready for review January 16, 2025 22:24
@petar-dambovaliev
Copy link
Contributor Author

petar-dambovaliev commented Jan 16, 2025

Only codecov failing. Its ready. @Kouteki

Copy link
Contributor

@ltzmaxwell ltzmaxwell left a comment

Choose a reason for hiding this comment

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

LGTM! A few requests, mostly regarding comments, so we can avoid reviewing this as a brand new PR each time. :)

gnovm/pkg/gnolang/preprocess.go Show resolved Hide resolved
gnovm/pkg/gnolang/preprocess.go Show resolved Hide resolved
gnovm/pkg/gnolang/preprocess.go Show resolved Hide resolved
gnovm/pkg/gnolang/preprocess.go Show resolved Hide resolved
gnovm/pkg/gnolang/preprocess.go Show resolved Hide resolved
gnovm/pkg/gnolang/preprocess.go Show resolved Hide resolved
gnovm/pkg/gnolang/preprocess.go Show resolved Hide resolved
@ltzmaxwell
Copy link
Contributor

and what we do with the codecov? @petar-dambovaliev @zivkovicmilos

gnovm/pkg/gnolang/preprocess.go Show resolved Hide resolved
gnovm/pkg/gnolang/preprocess.go Show resolved Hide resolved
gnovm/pkg/gnolang/preprocess.go Show resolved Hide resolved
@ltzmaxwell
Copy link
Contributor

Perhaps the logic in findUndefined2SkipLocals could be simplified further by modifying it to only find the name without type (which would imply that the predefined name is enough). In that case, GetDeclForSafe would no longer be necessary, correct?

@ltzmaxwell
Copy link
Contributor

Perhaps the logic in findUndefined2SkipLocals could be simplified further by modifying it to only find the name without type (which would imply that the predefined name is enough). In that case, GetDeclForSafe would no longer be necessary, correct?

maybe the difference won't be big, just some food for thoughts.

@petar-dambovaliev
Copy link
Contributor Author

Perhaps the logic in findUndefined2SkipLocals could be simplified further by modifying it to only find the name without type (which would imply that the predefined name is enough). In that case, GetDeclForSafe would no longer be necessary, correct?

maybe the difference won't be big, just some food for thoughts.

At first, i tried having a single function but it became too many changes and too messy

@petar-dambovaliev petar-dambovaliev enabled auto-merge (squash) January 18, 2025 19:30
@Kouteki
Copy link
Contributor

Kouteki commented Jan 20, 2025

and what we do with the codecov? @petar-dambovaliev @zivkovicmilos

It's not ideal, but codecov for this PR is not a blocker. We can merge this.

@petar-dambovaliev petar-dambovaliev merged commit b1352ac into master Jan 20, 2025
63 of 64 checks passed
@petar-dambovaliev petar-dambovaliev deleted the vardeps branch January 20, 2025 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in focus Core team is prioritizing this work 📦 🌐 tendermint v2 Issues or PRs tm2 related 📦 ⛰️ 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
Development

Successfully merging this pull request may close these issues.

in variable initialization, dependencies within functions are not recursively resolved
10 participants