Skip to content

Conversation

thehowl
Copy link
Member

@thehowl thehowl commented Jul 28, 2025

Because Compile() happens dynamically run-time, it can cause concurrent map writes: #4568

This PR fixes it by making sure the regexes we use at runtime are already compiled during init.

This improves efficiency by not requiring a map lookup each time.

@Gno2D2
Copy link
Collaborator

Gno2D2 commented Jul 28, 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):

🟢 Maintainers must be able to edit this pull request (more info)

☑️ 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
Automated Checks
Maintainers must be able to edit this pull request (more info)

If

🟢 Condition met
└── 🟢 And
    ├── 🟢 The base branch matches this pattern: ^master$
    └── 🟢 The pull request was created from a fork (head branch repo: thehowl/gno)

Then

🟢 Requirement satisfied
└── 🟢 Maintainer can modify this pull request

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

Copy link

codecov bot commented Jul 28, 2025

Codecov Report

❌ Patch coverage is 60.00000% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
gnovm/pkg/gnolang/nodes_location.go 0.00% 2 Missing ⚠️
gnovm/cmd/gno/common.go 0.00% 1 Missing ⚠️
gnovm/pkg/gnolang/mempackage.go 88.88% 0 Missing and 1 partial ⚠️
gnovm/pkg/gnolang/types.go 0.00% 1 Missing ⚠️
gnovm/pkg/repl/repl.go 50.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Member

@omarsy omarsy left a comment

Choose a reason for hiding this comment

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

yes, it is better ^^

@Kouteki Kouteki moved this from Triage to In Review in 🧙‍♂️gno.land core team Jul 28, 2025
@thehowl thehowl requested review from jaekwon and ltzmaxwell July 29, 2025 08:50
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.

@thehowl thehowl merged commit 6f175e8 into gnolang:master Aug 6, 2025
60 of 61 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in 💪 Bounties & Worx Aug 6, 2025
@github-project-automation github-project-automation bot moved this from In Review to Done in 🧙‍♂️gno.land core team Aug 6, 2025
stefann-01 pushed a commit to stefann-01/gno that referenced this pull request Aug 26, 2025
Because Compile() happens dynamically run-time, it can cause concurrent
map writes: gnolang#4568

This PR fixes it by making sure the regexes we use at runtime are
already compiled during init.

This improves efficiency by not requiring a map lookup each time.

---------

Co-authored-by: ltzmaxwell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 🌐 tendermint v2 Issues or PRs tm2 related 📦 🤖 gnovm Issues or PRs gnovm related
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants