Skip to content

Conversation

@MozirDmitriy
Copy link
Contributor

This change corrects misleading and outdated Rustdoc in cairo-lang-executable/src/compile.rs. The prepare_db() docs incorrectly stated it compiles a function by path and now accurately describe building a RootDatabase configured for #[executable], including cfg flags, plugin suite, corelib detection, and unsafe_panic handling. The compile_executable_function_in_prepared_db() docs previously listed a non-existent diagnostics_reporter parameter and claimed an Ok(Vec) return type; they now reflect the actual signature, the returned CompileExecutableResult<'db>, and clarify that diagnostics are ensured by the caller via ensure_diagnostics in compile_executable_in_prepared_db(). These updates align the documentation with the code and with the established pattern used in the Starknet compile module, removing ambiguity for users and maintainers.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion


crates/cairo-lang-executable/src/compile.rs line 206 at r1 (raw file):

///
/// Returns a ready-to-use database for subsequent compilation steps.
pub fn prepare_db(config: &ExecutableConfig) -> Result<RootDatabase> {

you added a function here - why?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants