Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat(forc): add manifest formatter #616

Merged
merged 11 commits into from
Jan 14, 2022
105 changes: 105 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions docs/src/getting-started/temporary_workarounds.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,7 @@ Serializing arbitrary structures can be accomplished manually by composition of
## Optimizer

The optimizing pass of the compiler is not yet implemented, therefore bytecode will be more expensive and larger than it would be in production. Note that eventually the optimizer will support zero-cost abstractions, avoiding the need for developers to go down to inline assembly to produce optimal code.

## Formatter

Currently, we need to parse the Sway code before formatting it, and the best way to do this is to compile the code. Hence, **the formatter cannot work on Sway code that does not compile**. This requirement may be changed in the future.
1 change: 1 addition & 0 deletions forc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ sway-fmt = { version = "0.2.1", path = "../sway-fmt" }
sway-server = { version = "0.2.1", path = "../sway-server" }
sway-utils = { version = "0.2.1", path = "../sway-utils" }
sway-types = { version = "0.2.1", path = "../sway-types" }
taplo = "0.7"
tar = "0.4.35"
term-table = "1.3"
termcolor = "1.1"
Expand Down
Loading