You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since 2.9 Cairo adds a notion of crate dependencies which limit visibility of other crates in each crate within a compilation unit.
Scarb resolver is the place where all the necessary information for building all dependencies is generated, and Scarb itself is capable of passing this information to the compiler. Unfortunately, other tools (CairoLS, scarb doc, cairo lint) also need it, and currently they have to copy the complex logic from Scarb codebase.
Proposed Solution
Add the following properties to scarb metadata --format-version 1:
structCompilationUnitComponentMetadata{// Option for backwards compatibility/// Unique string identifying this component.pubid:Option<CompilationUnitComponentMetadataId>,pubdependencies:Option<Vec<CompilationUnitComponentDependencyMetadata>>,}structCompilationUnitComponentMetadataId{/* same kind as PackageId etc. */}structCompilationUnitComponentDependencyMetadata{/// Id of component from the same compilation unit that this dependency refers to.////// This should directly translate to a `discriminator` field in Cairo compiler terminology,/// except that it should be `None` for `core` crate **only**.pubid:String,pub extra // same story as everywhere}
Notes
No response
The text was updated successfully, but these errors were encountered:
Problem
Since 2.9 Cairo adds a notion of crate dependencies which limit visibility of other crates in each crate within a compilation unit.
Scarb resolver is the place where all the necessary information for building all dependencies is generated, and Scarb itself is capable of passing this information to the compiler. Unfortunately, other tools (CairoLS,
scarb doc
,cairo lint
) also need it, and currently they have to copy the complex logic from Scarb codebase.Proposed Solution
Add the following properties to
scarb metadata --format-version 1
:Notes
No response
The text was updated successfully, but these errors were encountered: