Skip to content

feat: add workspace support to forc docs #7229

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

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

Conversation

JoE11-y
Copy link
Contributor

@JoE11-y JoE11-y commented Jun 12, 2025

Description

Closes #4103

  1. Noticed uncontrolled error when running the comand in contract/script/predicate, so cleaned up error handling.
  2. Added tokio runtime to main function, due to http errors when compiling, for scenarios where library code is either imported from git or forc registry.
  3. add support to workspaces.

Preview

Screenshot from 2025-06-13 14-33-36

Checklist

  • I have linked to any relevant issues.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation where relevant (API docs, the reference, and the Sway book).
  • [] I have added tests that prove my fix is effective or that my feature works.
  • I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@JoE11-y JoE11-y changed the title feat: add workspace support feat: add workspace support to forc docs Jun 12, 2025
@JoE11-y JoE11-y temporarily deployed to fuel-sway-bot June 12, 2025 20:12 — with GitHub Actions Inactive
@JoE11-y JoE11-y temporarily deployed to fuel-sway-bot June 13, 2025 12:53 — with GitHub Actions Inactive
@JoE11-y JoE11-y temporarily deployed to fuel-sway-bot June 13, 2025 13:14 — with GitHub Actions Inactive
@JoE11-y JoE11-y marked this pull request as ready for review June 13, 2025 13:28
@JoE11-y JoE11-y requested review from a team as code owners June 13, 2025 13:28
@@ -27,6 +27,7 @@ sway-features.workspace = true
sway-lsp.workspace = true
sway-types.workspace = true
swayfmt.workspace = true
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
Copy link
Contributor

Choose a reason for hiding this comment

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

seems weird you'd need to include a full async runtime just to deal with some http errors, surely there are some synchronous facilities to do that even if the given library is written with an async client in mind.

Can you specifically explain the reasoning here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh yeah the actual error is this:

There is no reactor running must be called from the context of a tokio-1-x-runtime

Usually occurs if any of the library deps is from github or the forc registry.

@JoE11-y JoE11-y temporarily deployed to fuel-sway-bot June 18, 2025 07:54 — with GitHub Actions Inactive
@JoE11-y JoE11-y requested a review from IGI-111 June 18, 2025 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

forc-doc: support workspaces
2 participants