Skip to content
This repository has been archived by the owner on Jun 21, 2024. It is now read-only.

Forc plugin compatibility, e.g. forc-debugger #15

Closed
Voxelot opened this issue Jul 12, 2022 · 5 comments · Fixed by FuelLabs/sway#5390
Closed

Forc plugin compatibility, e.g. forc-debugger #15

Voxelot opened this issue Jul 12, 2022 · 5 comments · Fixed by FuelLabs/sway#5390
Assignees

Comments

@Voxelot
Copy link
Member

Voxelot commented Jul 12, 2022

Should we consider renaming this repo to forc-debugger? This would allow the debugger to be run as a forc plugin once installed.

cc @adlerjohn @mitchmindtree

@mitchmindtree
Copy link

Yeah I think that makes sense 🤔

I can imagine a future we might want to support debugging FVM bytecode that was generated from some means other than the Sway compiler in which case you wouldn't particularly want to use the debugger via forc as it has the whole Sway package graph built in. That said, the user can always just use forc-debugger directly in those cases without forc itself.

If we want to allow the debugger to keep an independent name, we can always add a small CLI wrapper downstream as an alternative approach too.

@mitchmindtree mitchmindtree changed the title Forc plugin compatibility Forc plugin compatibility, e.g. forc-debugger Jul 20, 2022
@mitchmindtree
Copy link

How about the following:

  1. Implement fuel-debugger independently within this repo. It acts purely as a standalone FVM client, accepts all configuration via CLI args and has no awareness of Sway or forc in particular.

  2. Create a forc-debugger (or forc-dbg?) wrapper command at the sway repo within the plugins directory. Extends the debugger with any sway/forc-specific functionality, such as configuration via manifest, ensuring the project is built before debugging begins, etc. Has documentation auto-generated along with the rest of the sway repo's plugins/ directory.

Perhaps this is a nice separation of concerns, where yourself, @Dentosal and client team can continue to take care of fuel-debugger, while the Sway Tooling team takes care of the downstream forc wrapper?

@mitchmindtree
Copy link

I've opened a tracking issue for a downstream forc debugger command here: FuelLabs/sway#2350

@sdankel
Copy link
Member

sdankel commented Nov 14, 2023

We'll need to do some maintenance on this repo before it can be used in forc. Related #16

@sdankel
Copy link
Member

sdankel commented Dec 13, 2023

We've decided to move this code into the Sway repo since the debugger will depend on the same code as forc-test, forc-submit, and SourceMaps within the compiler. It'll be easier to manage as a forc plugin within that repo (consistent releases, version bumps, etc)

sdankel added a commit to FuelLabs/sway that referenced this issue Dec 14, 2023
## Description

Closes FuelLabs/fuel-debugger#15

Moves https://github.com/FuelLabs/fuel-debugger into a forc plugin.

## 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](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [ ] I have requested a review from the relevant team or maintainers.

---------

Co-authored-by: Hannes Karppila <hannes.karppila@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants