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 #3646

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

Conversation

nedsalk
Copy link
Contributor

@nedsalk nedsalk commented Jan 30, 2025

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

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 7:08pm
ts-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 30, 2025 7:08pm
ts-docs-api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 30, 2025 7:08pm

@nedsalk nedsalk force-pushed the ns/fix/fuels-dev-hang branch from 8fd1265 to 6a2b369 Compare January 30, 2025 13:59
@FuelLabs FuelLabs deleted a comment from fuel-cla-bot bot Jan 30, 2025
@nedsalk
Copy link
Contributor Author

nedsalk commented Jan 30, 2025

I had to do a force push to reset the commit history because it had @Dhaiwat10's commits in it, which triggered the fuel-cla-bot to require a signature. The old commit history, alongside the corresponding comments, can be found in #3504. All the comments that were on that PR have been addressed.

Copy link
Contributor

Coverage Report:

Lines Branches Functions Statements
77.07%(+0.03%) 70.72%(+0.08%) 75.17%(+0.07%) 77.07%(+0.03%)
Changed Files:
Ok File (✨=New File) Lines Branches Functions Statements
✨ packages/account/src/assets/assets.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
✨ packages/account/src/assets/utils/fuelAssetsBaseUrl.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
🔴 ✨ packages/account/src/assets/utils/network.ts 91.3%
(+91.3%)
83.33%
(+83.33%)
100%
(+100%)
91.3%
(+91.3%)
✨ packages/account/src/assets/utils/resolveIconPaths.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
🔴 ✨ packages/account/src/assets/utils/url.ts 100%
(+100%)
88.88%
(+88.88%)
100%
(+100%)
100%
(+100%)
🔴 packages/account/src/providers/provider.ts 68.52%
(-0.03%)
58.91%
(+0.45%)
70.21%
(+0.32%)
68.26%
(-0.02%)
🔴 packages/account/src/providers/generated/operations.ts 94.11%
(+0.08%)
100%
(+0%)
82%
(+0.37%)
94.57%
(+0.06%)
🔴 packages/address/src/address.ts 90.69%
(-0.21%)
92.85%
(+6.19%)
85.71%
(+0%)
90.9%
(-0.17%)
🔴 packages/address/src/utils.ts 80.95%
(+11.72%)
68.75%
(+18.75%)
83.33%
(+5.56%)
81.39%
(+11.02%)
🔴 packages/fuels/src/cli/commands/withConfig.ts 92.85%
(-7.15%)
100%
(+0%)
100%
(+0%)
92.85%
(-7.15%)
🔴 packages/math/src/bn.ts 89.81%
(+0.19%)
87.5%
(+0.66%)
83.33%
(+0%)
89.81%
(+0.19%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Command fuels dev hangs on generating types
2 participants