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

chore: reorganize gnovm/cmd/gno #3587

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

moul
Copy link
Member

@moul moul commented Jan 23, 2025

  • Increase Go-Gno compatibility.
    • Sort alphabetically commands.
    • Move Gno-specific commands under gno tool <command>.
    • Improve ShortHelp.
  • Use embedmd in gnovm/cmd/gno's README as an example of how we should use it more frequently.

@moul moul self-assigned this Jan 23, 2025
@github-actions github-actions bot added 🧾 package/realm Tag used for new Realms or Packages. 📦 🤖 gnovm Issues or PRs gnovm related labels Jan 23, 2025
@Gno2D2 Gno2D2 requested review from a team January 23, 2025 08:25
@Gno2D2
Copy link
Collaborator

Gno2D2 commented Jan 23, 2025

🛠 PR Checks Summary

🔴 Changes to 'docs' folder must be reviewed/authored by at least one devrel and one tech-staff

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)
🔴 Changes to 'docs' folder must be reviewed/authored by at least one devrel and one tech-staff

☑️ 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
└── 🟢 The pull request was created from a fork (head branch repo: moul/gno)

Then

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

Changes to 'docs' folder must be reviewed/authored by at least one devrel and one tech-staff

If

🟢 Condition met
└── 🟢 A changed file matches this pattern: ^docs/ (filename: docs/reference/go-gno-compatibility.md)

Then

🔴 Requirement not satisfied
└── 🔴 And
    ├── 🟢 Or
    │   ├── 🟢 Pull request author is a member of the team: tech-staff
    │   └── 🟢 At least 1 user(s) of the team tech-staff reviewed pull request(with state "APPROVED")
    └── 🔴 Or
        ├── 🔴 Pull request author is a member of the team: devrels
        └── 🔴 At least 1 user(s) of the team devrels reviewed pull request(with state "APPROVED")

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 Jan 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

Signed-off-by: moul <[email protected]>
@moul moul mentioned this pull request Jan 23, 2025
5 tasks
Signed-off-by: moul <[email protected]>
@moul moul marked this pull request as ready for review January 23, 2025 10:06
Copy link
Member

@gfanton gfanton left a comment

Choose a reason for hiding this comment

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

Looks good. It will probably break compatibility with some current extension tools that use gno lint. If merged, I think it would be worth mentioning this to contributors.

| go doc | gno doc | limited compatibility; see https://github.com/gnolang/gno/issues/522 |
| go env | gno env | |
| go fix | | |
| go fmt | gno fmt | gofmt (& similar tools, like gofumpt) works on gno code. |
Copy link
Member

Choose a reason for hiding this comment

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

I think it's important to note that it includes import by default compared to the original go fmt, so it will try to format and resolve dependencies. (It should not fail)

Comment on lines +38 to 39
ShortHelp: "gnofmt (reformat) package sources",
LongHelp: "The `gno fmt` tool processes, formats, and cleans up `gno` source files.",
Copy link
Member

Choose a reason for hiding this comment

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

we should mention it here as well

@Gno2D2 Gno2D2 requested a review from a team January 23, 2025 11:48
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 agree to move transpile, it is not useful enough to be a top-level command; though I'm unsure about lint, it seems more useful in the day-to-day and go tool lint seems cumbersome. repl, I think ideally it could just be either a) the default behaviour of gno run without arguments or b) something you enable in gno run with a flag (so you could possibly also have a repl working on top of an existing package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 🤖 gnovm Issues or PRs gnovm related 🧾 package/realm Tag used for new Realms or Packages.
Projects
Status: 📥 Inbox
Status: Triage
Development

Successfully merging this pull request may close these issues.

4 participants