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

Add forc explorer command #674

Merged
merged 17 commits into from
Feb 12, 2022
Merged

Add forc explorer command #674

merged 17 commits into from
Feb 12, 2022

Conversation

alex-matthe
Copy link
Contributor

@alex-matthe alex-matthe commented Jan 20, 2022

Close #608

This PR adds the command for spinning up a local server that serves the static files of the Explorer app. These are fetched from the public releases of the Explorer repo and stored in ~/.fuel/explorer/<version> directories

Usage:

forc explorer            # start server
forc explorer -p 9999    # custom port number
forc explorer clean      # delete files from disk

Feel free to add other reviewers

Copy link
Contributor

@adlerjohn adlerjohn left a comment

Choose a reason for hiding this comment

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

Clippy lint failing

.gitignore Outdated Show resolved Hide resolved
forc/src/ops/forc_explorer.rs Outdated Show resolved Hide resolved
forc/src/ops/forc_explorer.rs Outdated Show resolved Hide resolved
forc/src/ops/forc_explorer.rs Outdated Show resolved Hide resolved
@alex-matthe alex-matthe reopened this Jan 20, 2022
Copy link
Contributor

@adlerjohn adlerjohn left a comment

Choose a reason for hiding this comment

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

  1. The command downloads the files to ./forc/www/ specifically, which only works when building from GitHub source and running forc from the repo checkout's root directory. The command must work in any random directory, and download files to ~/.forc/www/ or ~/.fuel/www/ (i.e. from the home directory), rather than the a directory from the CWD.
  2. Running the command then opening the given address in a browser showed a blank page.

.gitignore Outdated Show resolved Hide resolved
@sezna
Copy link
Contributor

sezna commented Jan 28, 2022

@alex-matthe are you still working on this?

@adlerjohn adlerjohn marked this pull request as draft January 28, 2022 17:05
@SilentCicero
Copy link
Member

@sezna I think Alex is away atm.

@alex-matthe
Copy link
Contributor Author

@alex-matthe are you still working on this?

Yes

@alex-matthe alex-matthe marked this pull request as ready for review January 31, 2022 21:23
@alex-matthe alex-matthe requested a review from adlerjohn January 31, 2022 21:25
@adlerjohn adlerjohn requested a review from digorithm January 31, 2022 22:09
Copy link
Member

@digorithm digorithm left a comment

Choose a reason for hiding this comment

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

Looking really solid, oh and I played with the explorer and it looks so cool! Very excited about it. I left just a couple of nits/clarification questions.

forc/src/ops/forc_explorer.rs Outdated Show resolved Hide resolved
forc/src/ops/forc_explorer.rs Outdated Show resolved Hide resolved
@adlerjohn adlerjohn added the enhancement New feature or request label Feb 6, 2022
@alex-matthe alex-matthe requested a review from digorithm February 7, 2022 00:29
digorithm
digorithm previously approved these changes Feb 8, 2022
Copy link
Member

@digorithm digorithm left a comment

Choose a reason for hiding this comment

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

LGTM! Should we open an issue for the future --version feature?

@alex-matthe
Copy link
Contributor Author

alex-matthe commented Feb 11, 2022

LGTM! Should we open an issue for the future --version feature?

Yes, I'll file a low priority issue for it

@alex-matthe
Copy link
Contributor Author

I rebased the branch on top of latest master

@alex-matthe alex-matthe requested review from adlerjohn and removed request for adlerjohn February 11, 2022 16:12
digorithm
digorithm previously approved these changes Feb 11, 2022
Copy link
Member

@digorithm digorithm left a comment

Choose a reason for hiding this comment

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

:shipit:

sezna
sezna previously approved these changes Feb 11, 2022
Copy link
Contributor

@sezna sezna left a comment

Choose a reason for hiding this comment

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

approved but there are some merge conflicts now

@adlerjohn adlerjohn dismissed stale reviews from sezna and digorithm via cd952d9 February 12, 2022 16:07
digorithm
digorithm previously approved these changes Feb 12, 2022
adlerjohn
adlerjohn previously approved these changes Feb 12, 2022
@adlerjohn adlerjohn dismissed stale reviews from digorithm and themself via 20007fd February 12, 2022 16:14
@adlerjohn adlerjohn merged commit 86fa3c8 into master Feb 12, 2022
@adlerjohn adlerjohn deleted the issues/608 branch February 12, 2022 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request forc
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Spin up explorer with forc command
5 participants