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: fuels dev hangs after compilation errors #3504

Closed
wants to merge 31 commits into from

Conversation

Dhaiwat10
Copy link
Contributor

@Dhaiwat10 Dhaiwat10 commented Dec 26, 2024

Release notes

In this release, we:

  • Fixed a bug where fuels dev would hang after a Sway compilation error

Summary

This PR fixes the issue where fuels dev would hang after a Sway compilation error. The build process was failing and the failure was caught, but the reject callback that is called on failure was being called with an error code 1, which can't be rethrown later once the reject's error is caught in a try/catch - it has to be an Error object. After changing it to an Error(forc exited with exit code ${code}), I realized that the error handlers present in those try/catches weren't re-throwing the caught error. After adding a re-throw in them, I found out that the error was further being swallowed in the bin.ts file. The bug was fixed upon changing that.

Checklist

  • All changes are covered by tests (or not applicable)
  • All changes are documented (or not applicable)
  • I reviewed the entire PR myself (preferably, on GH UI)
  • I described all Breaking Changes (or there's none)

Copy link

vercel bot commented Dec 26, 2024

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

Name Status Preview Comments Updated (UTC)
fuels-template ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 30, 2025 2:03pm
ts-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 30, 2025 2:03pm
ts-docs-api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 30, 2025 2:03pm

Copy link
Contributor

github-actions bot commented Dec 26, 2024

This PR is published in NPM with version 0.0.0-pr-3504-20250102160454

@Dhaiwat10 Dhaiwat10 marked this pull request as ready for review December 26, 2024 17:11
Copy link
Contributor

Coverage Report:

Lines Branches Functions Statements
77.02%(-0.02%) 70.58%(-0.06%) 75.1%(+0%) 77.03%(-0.01%)
Changed Files:
Ok File (✨=New File) Lines Branches Functions Statements
🔴 packages/account/src/providers/transaction-request/transaction-request.ts 88.57%
(+0%)
76.71%
(-1.37%)
84%
(+0%)
88.81%
(+0%)
🔴 packages/fuels/src/cli/commands/withConfig.ts 92.85%
(-7.15%)
100%
(+0%)
100%
(+0%)
92.85%
(-7.15%)

@fuel-cla-bot
Copy link

fuel-cla-bot bot commented Jan 30, 2025

Thanks for the contribution! Before we can merge this, we need @Dhaiwat10 to sign the Fuel Labs Contributor License Agreement.

@nedsalk
Copy link
Contributor

nedsalk commented Jan 30, 2025

@FuelLabs/sdk-ts I closed this branch because of the fuel-cla-bot comment and opened #3646 as a substitute.

@vercel vercel bot temporarily deployed to Preview – ts-docs January 30, 2025 14:03 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is a bug cla:missing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Command fuels dev hangs on generating types
4 participants