From d64b5eca22dc75ce60309a0e2cea09ea9ce93017 Mon Sep 17 00:00:00 2001 From: Piotr Magiera Date: Wed, 19 Jun 2024 16:50:53 +0200 Subject: [PATCH 1/2] Update statements mappings docs --- scarb/src/core/manifest/compiler_config.rs | 5 +++-- scarb/src/core/manifest/toml_manifest.rs | 5 +++-- website/docs/reference/manifest.md | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/scarb/src/core/manifest/compiler_config.rs b/scarb/src/core/manifest/compiler_config.rs index 9a2db87c6..8e20c6d17 100644 --- a/scarb/src/core/manifest/compiler_config.rs +++ b/scarb/src/core/manifest/compiler_config.rs @@ -20,8 +20,9 @@ pub struct ManifestCompilerConfig { /// Enable auto gas withdrawal and gas usage check. pub enable_gas: bool, /// Add a mapping between sierra statement indexes and fully qualified paths of cairo functions - /// to debug info. A statement index maps to a function which caused the statement to be - /// generated. Used by [cairo-profiler](https://github.com/software-mansion/cairo-profiler). + /// to debug info. A statement index maps to a vector consisting of a function which caused the + /// statement to be generated and all functions that were inlined or generated along the way. + /// Used by [cairo-profiler](https://github.com/software-mansion/cairo-profiler). /// This feature is unstable and is subject to change. pub unstable_add_statements_functions_debug_info: bool, } diff --git a/scarb/src/core/manifest/toml_manifest.rs b/scarb/src/core/manifest/toml_manifest.rs index e29f120d8..b5392bac4 100644 --- a/scarb/src/core/manifest/toml_manifest.rs +++ b/scarb/src/core/manifest/toml_manifest.rs @@ -315,8 +315,9 @@ pub struct TomlCairo { /// Enable auto gas withdrawal and gas usage check. pub enable_gas: Option, /// Add a mapping between sierra statement indexes and fully qualified paths of cairo functions - /// to debug info. A statement index maps to a function which caused the statement to be - /// generated. Used by [cairo-profiler](https://github.com/software-mansion/cairo-profiler). + /// to debug info. A statement index maps to a vector consisting of a function which caused the + /// statement to be generated and all functions that were inlined or generated along the way. + /// Used by [cairo-profiler](https://github.com/software-mansion/cairo-profiler). /// This feature is unstable and is subject to change. pub unstable_add_statements_functions_debug_info: Option, } diff --git a/website/docs/reference/manifest.md b/website/docs/reference/manifest.md index d5fb311de..2ce7a035a 100644 --- a/website/docs/reference/manifest.md +++ b/website/docs/reference/manifest.md @@ -285,8 +285,9 @@ This flag cannot be disabled while compiling the `starknet-contract` target. > It may slow down the compilation - it is advised not to use it for other purposes than mentioned in > [cairo-profiler](https://github.com/software-mansion/cairo-profiler) documentation. -If enabled, during the project compilation Scarb will add mapping between Sierra statement indexes and fully qualified -paths of Cairo functions to debug info. A statement index maps to a function which caused the statement to be generated. +If enabled, during the project compilation Scarb will a add mapping between Sierra statement indexes and vectors of fully +qualified paths of Cairo functions to debug info. A statement index maps to a vector consisting of a function which +caused the statement to be generated and all functions that were inlined or generated along the way. By default, this flag is disabled. ```toml From 8178c408a6e2007dd623834f2873c0e1467b01bf Mon Sep 17 00:00:00 2001 From: Piotr Magiera Date: Wed, 19 Jun 2024 17:34:22 +0200 Subject: [PATCH 2/2] fix formatting --- website/docs/reference/manifest.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/docs/reference/manifest.md b/website/docs/reference/manifest.md index 2ce7a035a..8ea28b911 100644 --- a/website/docs/reference/manifest.md +++ b/website/docs/reference/manifest.md @@ -285,9 +285,9 @@ This flag cannot be disabled while compiling the `starknet-contract` target. > It may slow down the compilation - it is advised not to use it for other purposes than mentioned in > [cairo-profiler](https://github.com/software-mansion/cairo-profiler) documentation. -If enabled, during the project compilation Scarb will a add mapping between Sierra statement indexes and vectors of fully -qualified paths of Cairo functions to debug info. A statement index maps to a vector consisting of a function which -caused the statement to be generated and all functions that were inlined or generated along the way. +If enabled, during the project compilation Scarb will a add mapping between Sierra statement indexes and vectors of fully +qualified paths of Cairo functions to debug info. A statement index maps to a vector consisting of a function which +caused the statement to be generated and all functions that were inlined or generated along the way. By default, this flag is disabled. ```toml