Skip to content

Commit

Permalink
Merge branch 'master' into xunilrj/improve-err-msg-new-encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaBatty authored Apr 5, 2024
2 parents e5243f5 + 187146b commit 3ca56c1
Show file tree
Hide file tree
Showing 67 changed files with 1,178 additions and 410 deletions.
157 changes: 125 additions & 32 deletions Cargo.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Cargo

<!-- markdown-link-check-disable -->
Cargo can be used to install the Sway toolchain with various [`plugins`](https://fuellabs.github.io/sway/v0.52.0/book/forc/plugins/index.html).
Cargo can be used to install the Sway toolchain with various [`plugins`](https://fuellabs.github.io/sway/v0.52.1/book/forc/plugins/index.html).
<!-- markdown-link-check-enable -->

## Dependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ The supported operating systems include Linux and macOS; however, Windows is [`u
`Cargo` may be used instead of [`Fuelup`](fuelup.md); however, the user needs to manage the toolchain themselves.

<!-- markdown-link-check-disable -->
The advantage of using `Cargo` is the installation of [`plugins`](https://fuellabs.github.io/sway/v0.52.0/book/forc/plugins/index.html) that have not been added into [`Fuelup`](fuelup.md).
The advantage of using `Cargo` is the installation of [`plugins`](https://fuellabs.github.io/sway/v0.52.1/book/forc/plugins/index.html) that have not been added into [`Fuelup`](fuelup.md).

The disadvantage occurs when [`Fuelup`](fuelup.md) and `Cargo` are used in tandem because the latest [`plugins`](https://fuellabs.github.io/sway/v0.52.0/book/forc/plugins/index.html) may not be recognized.
The disadvantage occurs when [`Fuelup`](fuelup.md) and `Cargo` are used in tandem because the latest [`plugins`](https://fuellabs.github.io/sway/v0.52.1/book/forc/plugins/index.html) may not be recognized.
<!-- markdown-link-check-enable -->

## Source
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The `Sway toolchain` can be built directly from the [`Sway repository`](https://
## Installation & Updating

<!-- markdown-link-check-disable -->
In the root of the repository `/sway/<here>` build [`forc`](https://fuellabs.github.io/sway/v0.52.0/book/forc/commands/index.html) with the following command:
In the root of the repository `/sway/<here>` build [`forc`](https://fuellabs.github.io/sway/v0.52.1/book/forc/commands/index.html) with the following command:
<!-- markdown-link-check-enable -->

```bash
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/src/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# The Sway Reference

<!-- markdown-link-check-disable -->
This is the technical reference for the Sway programming language. For a prose explanation and introduction to the language, please refer to the [Sway Book](https://fuellabs.github.io/sway/v0.52.0/book/).
This is the technical reference for the Sway programming language. For a prose explanation and introduction to the language, please refer to the [Sway Book](https://fuellabs.github.io/sway/v0.52.1/book/).
<!-- markdown-link-check-enable -->
14 changes: 7 additions & 7 deletions forc-pkg/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "forc-pkg"
version = "0.52.0"
version = "0.52.1"
description = "Building, locking, fetching and updating Sway projects as Forc packages."
authors.workspace = true
edition.workspace = true
Expand All @@ -12,8 +12,8 @@ repository.workspace = true
ansi_term = "0.12"
anyhow = "1"
cid = "0.10"
forc-tracing = { version = "0.52.0", path = "../forc-tracing" }
forc-util = { version = "0.52.0", path = "../forc-util" }
forc-tracing = { version = "0.52.1", path = "../forc-tracing" }
forc-util = { version = "0.52.1", path = "../forc-util" }
fuel-abi-types = { workspace = true }
futures = "0.3"
git2 = { version = "0.17.2", features = [
Expand All @@ -30,10 +30,10 @@ serde = { version = "1.0", features = ["derive"] }
serde_ignored = "0.1.9"
serde_json = "1.0"
serde_with = "3.3.0"
sway-core = { version = "0.52.0", path = "../sway-core" }
sway-error = { version = "0.52.0", path = "../sway-error" }
sway-types = { version = "0.52.0", path = "../sway-types" }
sway-utils = { version = "0.52.0", path = "../sway-utils" }
sway-core = { version = "0.52.1", path = "../sway-core" }
sway-error = { version = "0.52.1", path = "../sway-error" }
sway-types = { version = "0.52.1", path = "../sway-types" }
sway-utils = { version = "0.52.1", path = "../sway-utils" }
tar = "0.4.38"
toml = { version = "0.7", features = ["parse"] }
tracing = "0.1"
Expand Down
18 changes: 9 additions & 9 deletions forc-plugins/forc-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "forc-client"
version = "0.52.0"
version = "0.52.1"
description = "A `forc` plugin for interacting with a Fuel node."
authors.workspace = true
edition.workspace = true
Expand All @@ -14,11 +14,11 @@ async-trait = "0.1.58"
chrono = { version = "0.4", default-features = false, features = ["std"] }
clap = { version = "3", features = ["derive", "env"] }
devault = "0.1"
forc = { version = "0.52.0", path = "../../forc" }
forc-pkg = { version = "0.52.0", path = "../../forc-pkg" }
forc-tracing = { version = "0.52.0", path = "../../forc-tracing" }
forc-tx = { version = "0.52.0", path = "../forc-tx" }
forc-util = { version = "0.52.0", path = "../../forc-util" }
forc = { version = "0.52.1", path = "../../forc" }
forc-pkg = { version = "0.52.1", path = "../../forc-pkg" }
forc-tracing = { version = "0.52.1", path = "../../forc-tracing" }
forc-tx = { version = "0.52.1", path = "../forc-tx" }
forc-util = { version = "0.52.1", path = "../../forc-util" }
forc-wallet = { workspace = true }
fuel-abi-types = { workspace = true }
fuel-core-client = { workspace = true, features = ["subscriptions"] }
Expand All @@ -33,9 +33,9 @@ rand = "0.8"
rpassword = "7.2"
serde = "1.0"
serde_json = "1"
sway-core = { version = "0.52.0", path = "../../sway-core" }
sway-types = { version = "0.52.0", path = "../../sway-types" }
sway-utils = { version = "0.52.0", path = "../../sway-utils" }
sway-core = { version = "0.52.1", path = "../../sway-core" }
sway-types = { version = "0.52.1", path = "../../sway-types" }
sway-utils = { version = "0.52.1", path = "../../sway-utils" }
tokio = { version = "1.8", features = ["macros", "rt-multi-thread", "process"] }
tracing = "0.1"

Expand Down
6 changes: 3 additions & 3 deletions forc-plugins/forc-crypto/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "forc-crypto"
version = "0.52.0"
version = "0.52.1"
description = "A `forc` plugin for handling various cryptographic operations and conversions."
authors.workspace = true
edition.workspace = true
Expand All @@ -13,8 +13,8 @@ anyhow = "1.0.75"
async-trait = "0.1.58"
atty = "0.2.14"
clap = { version = "3", features = ["derive", "env"] }
forc-tracing = { version = "0.52.0", path = "../../forc-tracing" }
forc-util = { version = "0.52.0", path = "../../forc-util" }
forc-tracing = { version = "0.52.1", path = "../../forc-tracing" }
forc-util = { version = "0.52.1", path = "../../forc-util" }
fuel-core-types = { workspace = true }
fuel-crypto = { workspace = true, features = ["random"] }
fuels-core = { workspace = true }
Expand Down
6 changes: 2 additions & 4 deletions forc-plugins/forc-crypto/src/keys/new_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ use libp2p_identity::{secp256k1, Keypair, PeerId};
use serde_json::json;
use std::ops::Deref;

const ABOUT: &str = "Creates a new key for use with fuel-core";

forc_util::cli_examples! {
crate::Command {
[ Creates a new key default for block production => "forc crypto new-key" ]
Expand All @@ -21,9 +19,9 @@ forc_util::cli_examples! {
}
}

/// Generate a random new secret & public key in the format expected by fuel-core
/// Creates a new key for use with fuel-core
#[derive(Debug, clap::Args)]
#[clap(version, about = ABOUT, after_help = help())]
#[clap(version, after_help = help())]
pub struct Arg {
/// Key type to generate. It can either be `block-production` or `peering`.
#[clap(
Expand Down
5 changes: 1 addition & 4 deletions forc-plugins/forc-crypto/src/keys/parse_secret.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,17 @@ use libp2p_identity::{secp256k1, Keypair, PeerId};
use serde_json::json;
use std::{ops::Deref, str::FromStr};

const ABOUT: &str = "Parses a private key to view the associated public key";

forc_util::cli_examples! {
crate::Command {
[ Parses the secret of a block production => "forc crypto parse-secret \"f5204427d0ab9a311266c96a377f7c329cb8a41b9088225b6fcf40eefb423e28\"" ]
[ Parses the secret of a peering => "forc crypto parse-secret -k peering \"f5204427d0ab9a311266c96a377f7c329cb8a41b9088225b6fcf40eefb423e28\"" ]
}
}

/// Parse a secret key to view the associated public key
/// Parses a private key to view the associated public key
#[derive(Debug, clap::Args)]
#[clap(
version,
about = ABOUT,
after_help = help(),
)]
pub struct Arg {
Expand Down
4 changes: 1 addition & 3 deletions forc-plugins/forc-crypto/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ mod keccak256;
mod keys;
mod sha256;

const ABOUT: &str = "Forc plugin for hashing arbitrary data.";

fn help() -> &'static str {
Box::leak(
format!(
Expand All @@ -32,10 +30,10 @@ fn help() -> &'static str {
)
}

/// Forc plugin for hashing arbitrary data
#[derive(Debug, Parser)]
#[clap(
name = "forc-crypto",
about = ABOUT,
after_help = help(),
version
)]
Expand Down
10 changes: 5 additions & 5 deletions forc-plugins/forc-debug/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "forc-debug"
version = "0.52.0"
version = "0.52.1"
description = "Supports debugging Sway code via CLI and DAP server."
authors.workspace = true
edition.workspace = true
Expand All @@ -12,17 +12,17 @@ repository.workspace = true
anyhow = "1.0" # Used by the examples and for conversion only
clap = { version = "3", features = ["env", "derive"] }
dap = "0.4.1-alpha1"
forc-pkg = { version = "0.52.0", path = "../../forc-pkg" }
forc-test = { version = "0.52.0", path = "../../forc-test" }
forc-pkg = { version = "0.52.1", path = "../../forc-pkg" }
forc-test = { version = "0.52.1", path = "../../forc-test" }
fuel-core-client = { workspace = true }
fuel-types = { workspace = true, features = ["serde"] }
fuel-vm = { workspace = true, features = ["serde"] }
rayon = "1.7.0"
serde = "1.0"
serde_json = "1.0"
shellfish = { version = "0.6.0", features = ["rustyline", "async", "tokio"] }
sway-core = { version = "0.52.0", path = "../../sway-core" }
sway-types = { version = "0.52.0", path = "../../sway-types" }
sway-core = { version = "0.52.1", path = "../../sway-core" }
sway-types = { version = "0.52.1", path = "../../sway-types" }
thiserror = "1.0"
tokio = { version = "1.8", features = [
"net",
Expand Down
16 changes: 8 additions & 8 deletions forc-plugins/forc-doc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "forc-doc"
version = "0.52.0"
version = "0.52.1"
description = "Build the documentation for the local package and all dependencies. The output is placed in `out/doc` in the same format as the project."
authors.workspace = true
edition.workspace = true
Expand All @@ -13,19 +13,19 @@ anyhow = "1.0.65"
clap = { version = "4.0.18", features = ["derive"] }
colored = "2.0.0"
comrak = "0.16"
forc-pkg = { version = "0.52.0", path = "../../forc-pkg" }
forc-util = { version = "0.52.0", path = "../../forc-util" }
forc-pkg = { version = "0.52.1", path = "../../forc-pkg" }
forc-util = { version = "0.52.1", path = "../../forc-util" }
horrorshow = "0.8.4"
include_dir = "0.7.3"
minifier = "0.3.0"
opener = "0.5.0"
serde = "1.0"
serde_json = "1.0"
sway-ast = { version = "0.52.0", path = "../../sway-ast" }
sway-core = { version = "0.52.0", path = "../../sway-core" }
sway-lsp = { version = "0.52.0", path = "../../sway-lsp" }
sway-types = { version = "0.52.0", path = "../../sway-types" }
swayfmt = { version = "0.52.0", path = "../../swayfmt" }
sway-ast = { version = "0.52.1", path = "../../sway-ast" }
sway-core = { version = "0.52.1", path = "../../sway-core" }
sway-lsp = { version = "0.52.1", path = "../../sway-lsp" }
sway-types = { version = "0.52.1", path = "../../sway-types" }
swayfmt = { version = "0.52.1", path = "../../swayfmt" }

[dev-dependencies]
dir_indexer = "0.0.2"
Expand Down
4 changes: 1 addition & 3 deletions forc-plugins/forc-doc/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
use clap::Parser;
use forc_pkg::source::IPFSNode;

const ABOUT: &str = "Forc plugin for building a Sway package's documentation";

forc_util::cli_examples! {
crate::Command {
[ Build the docs for a project in the current path => "forc doc"]
Expand All @@ -14,10 +12,10 @@ forc_util::cli_examples! {
}
}

/// Forc plugin for building a Sway package's documentation
#[derive(Debug, Parser, Default)]
#[clap(
name = "forc-doc",
about = ABOUT,
after_help = help(),
version
)]
Expand Down
14 changes: 7 additions & 7 deletions forc-plugins/forc-fmt/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "forc-fmt"
version = "0.52.0"
version = "0.52.1"
description = "A `forc` plugin for running the Sway code formatter."
authors.workspace = true
edition.workspace = true
Expand All @@ -11,12 +11,12 @@ repository.workspace = true
[dependencies]
anyhow = "1"
clap = { version = "3", features = ["derive"] }
forc-pkg = { version = "0.52.0", path = "../../forc-pkg" }
forc-tracing = { version = "0.52.0", path = "../../forc-tracing" }
forc-util = { version = "0.52.0", path = "../../forc-util" }
forc-pkg = { version = "0.52.1", path = "../../forc-pkg" }
forc-tracing = { version = "0.52.1", path = "../../forc-tracing" }
forc-util = { version = "0.52.1", path = "../../forc-util" }
prettydiff = "0.5"
sway-core = { version = "0.52.0", path = "../../sway-core" }
sway-utils = { version = "0.52.0", path = "../../sway-utils" }
swayfmt = { version = "0.52.0", path = "../../swayfmt" }
sway-core = { version = "0.52.1", path = "../../sway-core" }
sway-utils = { version = "0.52.1", path = "../../sway-utils" }
swayfmt = { version = "0.52.1", path = "../../swayfmt" }
taplo = "0.7"
tracing = "0.1"
2 changes: 1 addition & 1 deletion forc-plugins/forc-fmt/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ forc_util::cli_examples! {
#[derive(Debug, Parser)]
#[clap(
name = "forc-fmt",
about = "Forc plugin for running the Sway code formatter.",
about = "Forc plugin for running the Sway code formatter",
after_help = help(),
version
)]
Expand Down
4 changes: 2 additions & 2 deletions forc-plugins/forc-lsp/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "forc-lsp"
version = "0.52.0"
version = "0.52.1"
description = "A simple `forc` plugin for starting the sway language server."
authors.workspace = true
edition.workspace = true
Expand All @@ -11,6 +11,6 @@ repository.workspace = true
[dependencies]
anyhow = "1"
clap = { version = "3", features = ["derive"] }
sway-lsp = { version = "0.52.0", path = "../../sway-lsp" }
sway-lsp = { version = "0.52.1", path = "../../sway-lsp" }
tikv-jemallocator = "0.5"
tokio = { version = "1.8" }
2 changes: 1 addition & 1 deletion forc-plugins/forc-lsp/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use clap::Parser;
#[derive(Debug, Parser)]
#[clap(
name = "forc-lsp",
about = "Forc plugin for the Sway LSP (Language Server Protocol) implementation.",
about = "Forc plugin for the Sway LSP (Language Server Protocol) implementation",
version
)]
struct App {}
Expand Down
4 changes: 2 additions & 2 deletions forc-plugins/forc-tx/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "forc-tx"
version = "0.52.0"
version = "0.52.1"
description = "A `forc` plugin for constructing transactions."
authors.workspace = true
edition.workspace = true
Expand All @@ -19,7 +19,7 @@ path = "src/main.rs"
anyhow = "1"
clap = { version = "3", features = ["derive", "env"] }
devault = "0.1"
forc-util = { version = "0.52.0", path = "../../forc-util" }
forc-util = { version = "0.52.1", path = "../../forc-util" }
fuel-tx = { workspace = true, features = ["serde"] }
fuel-types = { workspace = true, features = ["serde"] }
serde = "1.0"
Expand Down
8 changes: 4 additions & 4 deletions forc-test/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "forc-test"
version = "0.52.0"
version = "0.52.1"
description = "A library for building and running Sway unit tests within Forc packages."
authors.workspace = true
edition.workspace = true
Expand All @@ -10,11 +10,11 @@ repository.workspace = true

[dependencies]
anyhow = "1"
forc-pkg = { version = "0.52.0", path = "../forc-pkg" }
forc-pkg = { version = "0.52.1", path = "../forc-pkg" }
fuel-abi-types = { workspace = true }
fuel-tx = { workspace = true, features = ["builder"] }
fuel-vm = { workspace = true, features = ["random"] }
rand = "0.8"
rayon = "1.7.0"
sway-core = { version = "0.52.0", path = "../sway-core" }
sway-types = { version = "0.52.0", path = "../sway-types" }
sway-core = { version = "0.52.1", path = "../sway-core" }
sway-types = { version = "0.52.1", path = "../sway-types" }
2 changes: 1 addition & 1 deletion forc-tracing/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "forc-tracing"
version = "0.52.0"
version = "0.52.1"
description = "Tracing utility shared between forc crates."
authors.workspace = true
edition.workspace = true
Expand Down
Loading

0 comments on commit 3ca56c1

Please sign in to comment.