From 5330d3c16dc0a3dadf19586e160beaf8c4a6267d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Matos?= Date: Wed, 6 Nov 2024 10:24:21 +0000 Subject: [PATCH] Remove `forc` help test. (#6682) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description This test has shown itself to apparently not be deterministic, so remove it as it is causing issues when merging https://github.com/FuelLabs/sway/pull/6565. @xunilrj I think you added this test originally, so cc'ing you to make sure there is no issue with this. ## Checklist - [x] I have linked to any relevant issues. - [x] I have commented my code, particularly in hard-to-understand areas. - [x] I have updated the documentation where relevant (API docs, the reference, and the Sway book). - [x] If my change requires substantial documentation changes, I have [requested support from the DevRel team](https://github.com/FuelLabs/devrel-requests/issues/new/choose) - [x] I have added tests that prove my fix is effective or that my feature works. - [x] I have added (or requested a maintainer to add) the necessary `Breaking*` or `New Feature` labels where relevant. - [x] 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). - [x] I have requested a review from the relevant team or maintainers. Co-authored-by: Kaya Gökalp --- .../should_pass/forc/help/snapshot.toml | 16 - .../should_pass/forc/help/stdout.snap | 597 ------------------ 2 files changed, 613 deletions(-) delete mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/forc/help/snapshot.toml delete mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/forc/help/stdout.snap diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/forc/help/snapshot.toml b/test/src/e2e_vm_tests/test_programs/should_pass/forc/help/snapshot.toml deleted file mode 100644 index b9151f7a736..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/forc/help/snapshot.toml +++ /dev/null @@ -1,16 +0,0 @@ -cmds = [ - "forc addr2line -h", - "forc build -h", - "forc check -h", - "forc clean -h", - "forc completions -h", - "forc new -h", - "forc init -h", - "forc parse-bytecode -h", - "forc test -h", - "forc update -h", - "forc plugins -h", - "forc template -h", - "forc contract-id -h", - "forc predicate-root -h", -] diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/forc/help/stdout.snap b/test/src/e2e_vm_tests/test_programs/should_pass/forc/help/stdout.snap deleted file mode 100644 index 8dd4a804aae..00000000000 --- a/test/src/e2e_vm_tests/test_programs/should_pass/forc/help/stdout.snap +++ /dev/null @@ -1,597 +0,0 @@ ---- -source: test/tests/tests.rs ---- -> forc addr2line -h -exit status: 0 -output: -Show location and context of an opcode address in its source file - -Usage: forc addr2line [OPTIONS] --sourcemap-path --opcode-index - -Options: - -S, --search-dir Where to search for the project root [default: .] - -g, --sourcemap-path Source file mapping in JSON format - -c, --context How many lines of context to show [default: 2] - -i, --opcode-index Opcode index - -v, --verbose... Use verbose output - -s, --silent Silence all output - -L, --log-level Set the log level - -h, --help Print help - -> forc build -h -exit status: 0 -output: -Compile the current or target project - -Usage: forc build [OPTIONS] - -Options: - -p, --path - Path to the project - --offline - Offline mode - -t, --terse - Terse mode - --output-directory - The directory in which Forc output artifacts are placed - --locked - Requires that the Forc.lock file is up-to-date - --ipfs-node - The IPFS node to use for fetching IPFS sources - --ast - Print the generated Sway AST (Abstract Syntax Tree) - --dca-graph - Print the computed Sway DCA (Dead Code Analysis) graph - --dca-graph-url-format - URL format to be used in the generated DCA graph .dot file. - --asm ... - Print the generated ASM (assembler). [possible values: virtual, allocated, abstract, final, all] - --bytecode - Print the bytecode - --ir ... - Print the generated Sway IR (Intermediate Representation). [possible values: initial, final, all, modified, inline, simplify-cfg, sroa, dce, fn-dce, fn-dedup-release, fn-dedup-debug, mem2reg, memcpyopt, const-folding, arg-demotion, const-demotion, ret-demotion, misc-demotion] - --time-phases - Output the time elapsed over each part of the compilation process - --reverse-order - Output build errors and warnings in reverse order - --metrics-outfile - Output compilation metrics into the specified file - -v, --verbose... - Use verbose output - --json-abi - Minify JSON ABI files - -s, --silent - Silence all output - --json-storage-slots - Minify JSON storage slot files - -L, --log-level - Set the log level - -o, --output-bin - Create a binary file at the provided path representing the final bytecode - -g, --output-debug - Create a file at the provided path containing debug information - --build-profile - The name of the build profile to use [default: debug] - --release - Use the release build profile - --error-on-warnings - Treat warnings as errors - --build-target - Build target to use for code generation [default: fuel] [possible values: fuel, evm] - --tests - Also build all tests within the project - --experimental - Comma separated list of all experimental features that will be enabled [possible values: new_encoding] - --no-experimental - Comma separated list of all experimental features that will be disabled [possible values: new_encoding] - -h, --help - Print help (see more with '--help') - -V, --version - Print version - -EXAMPLES: - # Compile the current projectx - forc build - - # Compile the current project from a different path - forc build --path - - # Compile the current project without updating dependencies - forc build --path --locked - -> forc check -h -exit status: 0 -output: -Check the current or target project and all of its dependencies for errors - -Usage: forc check [OPTIONS] [BUILD_TARGET] - -Arguments: - [BUILD_TARGET] Build target to use for code generation [default: fuel] [possible values: fuel, evm] - -Options: - -p, --path - Path to the project, if not specified, current working directory will be used - --offline - Offline mode, prevents Forc from using the network when managing dependencies. Meaning it will only try to use previously downloaded dependencies - --locked - Requires that the Forc.lock file is up-to-date. If the lock file is missing, or it needs to be updated, Forc will exit with an error - -t, --terse - Terse mode. Limited warning and error output - --disable-tests - Disable checking unit tests - --ipfs-node - The IPFS Node to use for fetching IPFS sources - --experimental - Comma separated list of all experimental features that will be enabled [possible values: new_encoding] - --no-experimental - Comma separated list of all experimental features that will be disabled [possible values: new_encoding] - -v, --verbose... - Use verbose output - -s, --silent - Silence all output - -L, --log-level - Set the log level - -h, --help - Print help (see more with '--help') - -V, --version - Print version - -EXAMPLES: - # Check the current project - forc check - - # Check the current project with a different path - forc check --path - - # Check the current project without updating dependencies - forc check --locked - -> forc clean -h -exit status: 0 -output: -Removes the default forc compiler output artifact directory, i.e. `/out` - -Usage: forc clean [OPTIONS] - -Options: - -p, --path Path to the project, if not specified, current working directory will be used - -v, --verbose... Use verbose output - -s, --silent Silence all output - -L, --log-level Set the log level - -h, --help Print help - -V, --version Print version - -EXAMPLES: - # Clean project - forc clean - - # Clean project with a custom path - forc clean --path - -> forc completions -h -exit status: 0 -output: -Generate tab-completion scripts for your shell - -Usage: forc completions [OPTIONS] --target - -Options: - -T, --target Specify shell to enable tab-completion for [possible values: bash, elvish, fish, power-shell, zsh, fig] - -v, --verbose... Use verbose output - -s, --silent Silence all output - -L, --log-level Set the log level - -h, --help Print help (see more with '--help') - -> forc new -h -exit status: 0 -output: -Create a new Forc project at `` - -Usage: forc new [OPTIONS] - -Arguments: - The path at which the project directory will be created - -Options: - --contract The default program type. Excluding all flags or adding this flag creates a basic contract program - --script Adding this flag creates an empty script program - --predicate Adding this flag creates an empty predicate program - --library Adding this flag creates an empty library program - --workspace Adding this flag creates an empty workspace - --name Set the package name. Defaults to the directory name - -v, --verbose... Use verbose output - -s, --silent Silence all output - -L, --log-level Set the log level - -h, --help Print help - -V, --version Print version - -EXAMPLES: - # Create a new project - forc new --contract --name my_project - - # Create a new workspace - forc new --workspace --name my_workspace - - # Create a new Forc project with a predicate - forc new --predicate - - # Create a new Forc library project - forc new --library - -> forc init -h -exit status: 0 -output: -Create a new Forc project in an existing directory - -Usage: forc init [OPTIONS] - -Options: - --path The directory in which the forc project will be initialized - --contract The default program type, excluding all flags or adding this flag creates a basic contract program - --script Create a package with a script target (src/main.sw) - --predicate Create a package with a predicate target (src/predicate.rs) - --library Create a package with a library target (src/lib.sw) - --workspace Adding this flag creates an empty workspace - --name Set the package name. Defaults to the directory name - -v, --verbose... Use verbose output - -s, --silent Silence all output - -L, --log-level Set the log level - -h, --help Print help - -V, --version Print version - -EXAMPLES: - # Initialize a new Forc project - forc init --path - - # Initialize a new Forc project as workspace - forc init --path --workspace - - # Initialize a new Forc project with a predicate - forc init --path --predicate - - # Initialize a new Forc library project - forc init --path --library - -> forc parse-bytecode -h -exit status: 0 -output: -Parse bytecode file into a debug format - -Usage: forc parse-bytecode [OPTIONS] - -Arguments: - - -Options: - -v, --verbose... Use verbose output - -s, --silent Silence all output - -L, --log-level Set the log level - -h, --help Print help - -V, --version Print version - -EXAMPLES: - # Parse bytecode - forc parse-bytecode - -> forc test -h -exit status: 0 -output: -Run the Sway unit tests for the current project - -Usage: forc test [OPTIONS] [FILTER] - -Arguments: - [FILTER] When specified, only tests containing the given string will be executed - -Options: - -p, --path - Path to the project - --offline - Offline mode - -t, --terse - Terse mode - --output-directory - The directory in which Forc output artifacts are placed - --locked - Requires that the Forc.lock file is up-to-date - --ipfs-node - The IPFS node to use for fetching IPFS sources - --ast - Print the generated Sway AST (Abstract Syntax Tree) - --dca-graph - Print the computed Sway DCA (Dead Code Analysis) graph - --dca-graph-url-format - URL format to be used in the generated DCA graph .dot file. - --asm ... - Print the generated ASM (assembler). [possible values: virtual, allocated, abstract, final, all] - --bytecode - Print the bytecode - --ir ... - Print the generated Sway IR (Intermediate Representation). [possible values: initial, final, all, modified, inline, simplify-cfg, sroa, dce, fn-dce, fn-dedup-release, fn-dedup-debug, mem2reg, memcpyopt, const-folding, arg-demotion, const-demotion, ret-demotion, misc-demotion] - --time-phases - Output the time elapsed over each part of the compilation process - --reverse-order - Output build errors and warnings in reverse order - --metrics-outfile - Output compilation metrics into the specified file - -v, --verbose... - Use verbose output - --json-abi - Minify JSON ABI files - -s, --silent - Silence all output - --json-storage-slots - Minify JSON storage slot files - -L, --log-level - Set the log level - -o, --output-bin - Create a binary file at the provided path representing the final bytecode - -g, --output-debug - Create a file at the provided path containing debug information - --build-profile - The name of the build profile to use [default: debug] - --release - Use the release build profile - --error-on-warnings - Treat warnings as errors - --build-target - Build target to use for code generation [default: fuel] [possible values: fuel, evm] - --pretty - Pretty-print the logs emitted from tests - -l, --logs - Print `Log` and `LogData` receipts for tests - --raw-logs - Print the raw logs for tests - --filter-exact - When specified, only the test exactly matching the given string will be executed - --test-threads - Number of threads to utilize when running the tests. By default, this is the number of threads available in your system - --experimental - Comma separated list of all experimental features that will be enabled [possible values: new_encoding] - --no-experimental - Comma separated list of all experimental features that will be disabled [possible values: new_encoding] - -h, --help - Print help (see more with '--help') - -V, --version - Print version - -EXAMPLES: - # Run test - forc test - - # Run test with a filter - forc test $filter - - # Run test without any output - forc test --silent - - # Run test without creating or update the lock file - forc test --locked - -> forc update -h -exit status: 0 -output: -Update dependencies in the Forc dependencies directory - -Usage: forc update [OPTIONS] - -Options: - -p, --path Path to the project, if not specified, current working directory will be used - -d Dependency to be updated. If not set, all dependencies will be updated - -c, --check Checks if the dependencies have newer versions. Won't actually perform the update, will output which ones are up-to-date and outdated - --ipfs-node The IPFS Node to use for fetching IPFS sources - -v, --verbose... Use verbose output - -s, --silent Silence all output - -L, --log-level Set the log level - -h, --help Print help (see more with '--help') - -V, --version Print version - -EXAMPLES: - # Update dependencies - forc update - - # Update a specific dependency - forc update -d std - - # Check if dependencies have newer versions - forc update --check - -> forc plugins -h -exit status: 0 -output: -List all forc plugins - -Usage: forc plugins [OPTIONS] - -Options: - -p, --paths Prints the absolute path to each discovered plugin - -d, --describe Prints the long description associated with each listed plugin - -v, --verbose... Use verbose output - -s, --silent Silence all output - -L, --log-level Set the log level - -h, --help Print help (see more with '--help') - -V, --version Print version - -EXAMPLES: - # List all plugins - forc plugins - - # List all plugins with their paths - forc plugins --paths - - # List all plugins with their descriptions - forc plugins --describe - - # List all plugins with their paths and descriptions - forc plugins --paths --describe - -> forc template -h -exit status: 0 -output: -Create a new Forc project from a git template - -Usage: forc template [OPTIONS] - -Arguments: - The name of the project that will be created - -Options: - -u, --url The template url, should be a git repo [default: https://github.com/fuellabs/sway] - -t, --template-name The name of the template that needs to be fetched and used from git repo provided - -v, --verbose... Use verbose output - -s, --silent Silence all output - -L, --log-level Set the log level - -h, --help Print help - -V, --version Print version - -EXAMPLES: - # Create a new Forc project from an option template - forc template new-path --template-name option - -> forc contract-id -h -exit status: 0 -output: -Determine contract-id for a contract. For workspaces outputs all contract ids in the workspace - -Usage: forc contract-id [OPTIONS] - -Options: - -p, --path - Path to the project - --offline - Offline mode - -t, --terse - Terse mode - --output-directory - The directory in which Forc output artifacts are placed - --locked - Requires that the Forc.lock file is up-to-date - --ipfs-node - The IPFS node to use for fetching IPFS sources - --json-abi - Minify JSON ABI files - --json-storage-slots - Minify JSON storage slot files - --ast - Print the generated Sway AST (Abstract Syntax Tree) - --dca-graph - Print the computed Sway DCA (Dead Code Analysis) graph - --dca-graph-url-format - URL format to be used in the generated DCA graph .dot file. - --asm ... - Print the generated ASM (assembler). [possible values: virtual, allocated, abstract, final, all] - --bytecode - Print the bytecode - --ir ... - Print the generated Sway IR (Intermediate Representation). [possible values: initial, final, all, modified, inline, simplify-cfg, sroa, dce, fn-dce, fn-dedup-release, fn-dedup-debug, mem2reg, memcpyopt, const-folding, arg-demotion, const-demotion, ret-demotion, misc-demotion] - --time-phases - Output the time elapsed over each part of the compilation process - -v, --verbose... - Use verbose output - --reverse-order - Output build errors and warnings in reverse order - -s, --silent - Silence all output - -L, --log-level - Set the log level - --metrics-outfile - Output compilation metrics into the specified file - -o, --output-bin - Create a binary file at the provided path representing the final bytecode - -g, --output-debug - Create a file at the provided path containing debug information - --build-profile - The name of the build profile to use [default: debug] - --release - Use the release build profile - --error-on-warnings - Treat warnings as errors - --salt - Added salt used to derive the contract ID - --experimental - Comma separated list of all experimental features that will be enabled [possible values: new_encoding] - --no-experimental - Comma separated list of all experimental features that will be disabled [possible values: new_encoding] - -h, --help - Print help (see more with '--help') - -V, --version - Print version - -EXAMPLES: - # Get contract id - forc contract-id - - # Get contract id from a different path - forc contract-id --path - -> forc predicate-root -h -exit status: 0 -output: -Determine predicate-root for a predicate. For workspaces outputs all predicate roots in the workspace - -Usage: forc predicate-root [OPTIONS] - -Options: - -p, --path - Path to the project - --offline - Offline mode - -t, --terse - Terse mode - --output-directory - The directory in which Forc output artifacts are placed - --locked - Requires that the Forc.lock file is up-to-date - --ipfs-node - The IPFS node to use for fetching IPFS sources - --json-abi - Minify JSON ABI files - --json-storage-slots - Minify JSON storage slot files - --ast - Print the generated Sway AST (Abstract Syntax Tree) - --dca-graph - Print the computed Sway DCA (Dead Code Analysis) graph - --dca-graph-url-format - URL format to be used in the generated DCA graph .dot file. - --asm ... - Print the generated ASM (assembler). [possible values: virtual, allocated, abstract, final, all] - --bytecode - Print the bytecode - --ir ... - Print the generated Sway IR (Intermediate Representation). [possible values: initial, final, all, modified, inline, simplify-cfg, sroa, dce, fn-dce, fn-dedup-release, fn-dedup-debug, mem2reg, memcpyopt, const-folding, arg-demotion, const-demotion, ret-demotion, misc-demotion] - --time-phases - Output the time elapsed over each part of the compilation process - -v, --verbose... - Use verbose output - --reverse-order - Output build errors and warnings in reverse order - -s, --silent - Silence all output - -L, --log-level - Set the log level - --metrics-outfile - Output compilation metrics into the specified file - -o, --output-bin - Create a binary file at the provided path representing the final bytecode - -g, --output-debug - Create a file at the provided path containing debug information - --build-profile - The name of the build profile to use [default: debug] - --release - Use the release build profile - --error-on-warnings - Treat warnings as errors - --experimental - Comma separated list of all experimental features that will be enabled [possible values: new_encoding] - --no-experimental - Comma separated list of all experimental features that will be disabled [possible values: new_encoding] - -h, --help - Print help (see more with '--help') - -V, --version - Print version - -EXAMPLES: - # Get predicate root - forc predicate-root