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

[cli] improve git output #18636

Merged
merged 2 commits into from
Sep 14, 2024
Merged

[cli] improve git output #18636

merged 2 commits into from
Sep 14, 2024

Conversation

vegetabledogdog
Copy link
Contributor

@vegetabledogdog vegetabledogdog commented Jul 12, 2024

Description

Check if git is installed.
Ouput the git clone or git fetch message

Test plan

  1. git is not installed
sui move build
Git is not installed or not in the PATH.
Failed to build Move modules: Failed to resolve dependencies for package 'gitt'

Caused by:
    0: Fetching 'Sui'
    1: Git is not installed or not in the PATH..

2.network error

sui move build
FETCHING GIT DEPENDENCY https://github.com/MystenLabs/sui.git
Cloning into '/home/sun/.move/https___github_com_MystenLabs_sui_git_framework__testnet'...
fatal: unable to access 'https://github.com/MystenLabs/sui.git/': Could not resolve host: github.com
Failed to build Move modules: Failed to resolve dependencies for package 'up'

Caused by:
    0: Parsing manifest for 'Sui'
    1: No such file or directory (os error 2).

3.Show the progress of git

sui move build
FETCHING GIT DEPENDENCY https://github.com/MystenLabs/sui.git
Cloning into '/home/sun/.move/https___github_com_MystenLabs_sui_git_framework__testnet'...
remote: Enumerating objects: 345462, done.
remote: Counting objects: 100% (5589/5589), done.
remote: Compressing objects: 100% (2204/2204), done.
Receiving objects:   9% (33800/345462), 35.71 MiB | 4.38 MiB/s

Release notes

Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.

For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.

  • Protocol:
  • Nodes (Validators and Full nodes):
  • Indexer:
  • JSON-RPC:
  • GraphQL:
  • CLI: Improve error and status messages for sui move build.
  • Rust SDK:

Copy link

vercel bot commented Jul 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 14, 2024 5:36am
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Sep 14, 2024 5:36am
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview Sep 14, 2024 5:36am
sui-typescript-docs ⬜️ Ignored (Inspect) Visit Preview Sep 14, 2024 5:36am

Copy link

vercel bot commented Jul 12, 2024

@vegetabledogdog is attempting to deploy a commit to the Mysten Labs Team on Vercel.

A member of the Team first needs to authorize it.

@stefan-mysten
Copy link
Contributor

Thanks @vegetabledogdog! I think this is reasonable.

Copy link
Contributor

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Sep 13, 2024
@stefan-mysten
Copy link
Contributor

@tzakian what do you think?

@stefan-mysten stefan-mysten merged commit 12cf3a0 into MystenLabs:main Sep 14, 2024
44 checks passed
Copy link
Contributor

@uvd uvd left a comment

Choose a reason for hiding this comment

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

suiwombat pushed a commit that referenced this pull request Sep 16, 2024
## Description 
Check if git is installed.
Ouput the git clone or git fetch message


## Test plan 

1. git is not installed

```
sui move build
Git is not installed or not in the PATH.
Failed to build Move modules: Failed to resolve dependencies for package 'gitt'

Caused by:
    0: Fetching 'Sui'
    1: Git is not installed or not in the PATH..

```

2.network error

```
sui move build
FETCHING GIT DEPENDENCY https://github.com/MystenLabs/sui.git
Cloning into '/home/sun/.move/https___github_com_MystenLabs_sui_git_framework__testnet'...
fatal: unable to access 'https://github.com/MystenLabs/sui.git/': Could not resolve host: github.com
Failed to build Move modules: Failed to resolve dependencies for package 'up'

Caused by:
    0: Parsing manifest for 'Sui'
    1: No such file or directory (os error 2).

```

3.Show the progress of git
```
sui move build
FETCHING GIT DEPENDENCY https://github.com/MystenLabs/sui.git
Cloning into '/home/sun/.move/https___github_com_MystenLabs_sui_git_framework__testnet'...
remote: Enumerating objects: 345462, done.
remote: Counting objects: 100% (5589/5589), done.
remote: Compressing objects: 100% (2204/2204), done.
Receiving objects:   9% (33800/345462), 35.71 MiB | 4.38 MiB/s
```

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [x] CLI: Improve error and status messages for `sui move build`.
- [ ] Rust SDK:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants