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

fix: user resolvable errors no longer cause the cli to exit #2014

Merged
merged 14 commits into from
Apr 9, 2024

Conversation

maschad
Copy link
Member

@maschad maschad commented Apr 5, 2024

Description

This PR fixes a few painpoints that I picked up when trying to build a demo native asset deployer dApp

Changes

  • When using create fuels, there is nothing to indicate how to select which programs I don't / do want so I've enabled instructions to true

  • In the scenario an error is thrown, the program exits, this is not ideal as this type of error could be resolved if the project is renamed, so I've added a re-try.

✔ What is the name of your project? … my-fuel-project
Error: A folder already exists at my-fuel-project. Please choose a different project name.

@maschad maschad added bug Issue is a bug chore Issue is a chore labels Apr 5, 2024
@maschad maschad marked this pull request as ready for review April 5, 2024 03:24
@maschad maschad changed the title fix: remove CHANGELOG from template + add instructions sway programs fix: user solveable errors no longer cause the cli to exit Apr 5, 2024
@maschad maschad self-assigned this Apr 5, 2024
@maschad maschad marked this pull request as draft April 5, 2024 03:46
@maschad maschad changed the title fix: user solveable errors no longer cause the cli to exit fix: user resolvable errors no longer cause the cli to exit Apr 5, 2024
@maschad maschad marked this pull request as ready for review April 5, 2024 18:26
Dhaiwat10
Dhaiwat10 previously approved these changes Apr 5, 2024
Copy link
Member

@Dhaiwat10 Dhaiwat10 left a comment

Choose a reason for hiding this comment

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

LGTM! Just left one comment:

packages/create-fuels/src/cli.ts Outdated Show resolved Hide resolved
packages/create-fuels/src/cli.ts Outdated Show resolved Hide resolved
packages/create-fuels/src/cli.ts Show resolved Hide resolved
@maschad maschad requested a review from arboleya April 6, 2024 20:04
@petertonysmith94
Copy link
Contributor

I tried to exit out of the CLI but I believe it's stuck in a while loop. May be worth listening to the SIGINT process signal and exiting accordingly.

image

@petertonysmith94
Copy link
Contributor

petertonysmith94 commented Apr 8, 2024

Something else I noticed (unrelated to your changes), was exiting out at the program types section causes the following error:

image

I believe it's due to programsToIncludeInput.programsToInclude not being defined as an Array.
https://github.com/FuelLabs/fuels-ts/blob/master/packages/create-fuels/src/cli.ts#L84-L86

@maschad
Copy link
Member Author

maschad commented Apr 8, 2024

Good catch @petertonysmith94 I've made the adjusments.

@maschad maschad requested a review from Dhaiwat10 April 8, 2024 15:14
Copy link
Contributor

@petertonysmith94 petertonysmith94 left a comment

Choose a reason for hiding this comment

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

Beautiful ❤️

Copy link
Member

@Dhaiwat10 Dhaiwat10 left a comment

Choose a reason for hiding this comment

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

👏🏻

Copy link
Contributor

@danielbate danielbate left a comment

Choose a reason for hiding this comment

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

LGTM, just nits

packages/create-fuels/src/cli.ts Show resolved Hide resolved
packages/create-fuels/src/cli.ts Show resolved Hide resolved
packages/create-fuels/src/cli.ts Show resolved Hide resolved
@maschad maschad dismissed arboleya’s stale review April 9, 2024 20:50

The changes have been resolved, I'm sure @arboleya would approve now :)

@maschad maschad merged commit 95dac31 into FuelLabs:master Apr 9, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is a bug chore Issue is a chore
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants