@@ -10,7 +10,9 @@ use cairo_lang_compiler::db::RootDatabase;
10
10
use cairo_lang_compiler:: project:: update_crate_roots_from_project_config;
11
11
use cairo_lang_defs:: db:: DefsGroup ;
12
12
use cairo_lang_diagnostics:: { DiagnosticEntry , Maybe } ;
13
- use cairo_lang_filesystem:: db:: { init_dev_corelib, FilesGroup , CORELIB_CRATE_NAME } ;
13
+ use cairo_lang_filesystem:: db:: {
14
+ init_dev_corelib, CrateIdentifier , FilesGroup , CORELIB_CRATE_NAME ,
15
+ } ;
14
16
use cairo_lang_filesystem:: ids:: { CrateLongId , FileId } ;
15
17
use cairo_lang_semantic:: db:: SemanticGroup ;
16
18
use cairo_lang_semantic:: diagnostic:: SemanticDiagnosticKind ;
@@ -159,10 +161,7 @@ fn main_inner(ui: &Ui, args: Args) -> Result<()> {
159
161
update_crate_roots_from_project_config ( & mut db, & config) ;
160
162
let crate_id = db. intern_crate ( CrateLongId :: Real {
161
163
name : SmolStr :: new ( & compilation_unit. target . name ) ,
162
- discriminator : main_component
163
- . discriminator
164
- . as_ref ( )
165
- . map ( ToSmolStr :: to_smolstr) ,
164
+ discriminator : Some ( CrateIdentifier :: from ( & main_component. name ) . clone ( ) . into ( ) ) ,
166
165
} ) ;
167
166
// Get all the diagnostics
168
167
let mut diags = Vec :: new ( ) ;
0 commit comments