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

feat(demo/ufmt): add some usefull missing methods: (Fprintx, AppendX, SprintX, PrintX) #4015

Merged
merged 6 commits into from
Mar 27, 2025

Conversation

gfanton
Copy link
Member

@gfanton gfanton commented Mar 26, 2025

This PR enhances the ufmt package by adding missing methods such as FprintX, AppendX, SprintX, and PrintX. These additions address the package's previous limitations. It also centralizes and improves the logic in a printer, similar to the approach used by the fmt package.

Additionally, I have added new tests and moved the logic of Println test into Sprint test (since the logic has been moved into the printer, we can now test it using the Sprint function)

Note: I added these functions mainly because I enjoy using fmt.FprintX with strings.Builder and bytes.Buffer.

@gfanton gfanton self-assigned this Mar 26, 2025
@gfanton gfanton requested review from moul and thehowl March 26, 2025 16:25
@github-actions github-actions bot added the 🧾 package/realm Tag used for new Realms or Packages. label Mar 26, 2025
@Gno2D2
Copy link
Collaborator

Gno2D2 commented Mar 26, 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: gfanton/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
Member

@moul moul left a comment

Choose a reason for hiding this comment

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

It looks good; however, this PR makes me feel that we really need a way to generate a "gas-report.txt" file when running gno test or gno benchmark. This would allow us to measure the impact of those changes.
Can we prioritize the gas-report system if not yet developed, possibly with a bounty? Else, we should start using it.

cc @petar-dambovaliev @mvertes @thehowl

@github-actions github-actions bot added the 📦 ⛰️ gno.land Issues or PRs gno.land package related label Mar 27, 2025
@gfanton gfanton merged commit a1f03e1 into gnolang:master Mar 27, 2025
63 checks passed
@gfanton gfanton deleted the feat/ufmt-fprtinf branch March 27, 2025 14:23
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 🧾 package/realm Tag used for new Realms or Packages.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants