Skip to content

Commit

Permalink
Fix getting semantic diags for a crate
Browse files Browse the repository at this point in the history
  • Loading branch information
wawel37 committed Dec 19, 2024
1 parent 349e370 commit 619ca7f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions crates/cairo-lint-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ use cairo_lang_compiler::db::RootDatabase;
use cairo_lang_compiler::project::update_crate_roots_from_project_config;
use cairo_lang_defs::db::DefsGroup;
use cairo_lang_diagnostics::{DiagnosticEntry, Maybe};
use cairo_lang_filesystem::db::{init_dev_corelib, FilesGroup, CORELIB_CRATE_NAME};
use cairo_lang_filesystem::db::{
init_dev_corelib, CrateIdentifier, FilesGroup, CORELIB_CRATE_NAME,
};
use cairo_lang_filesystem::ids::{CrateLongId, FileId};
use cairo_lang_semantic::db::SemanticGroup;
use cairo_lang_semantic::diagnostic::SemanticDiagnosticKind;
Expand Down Expand Up @@ -159,10 +161,7 @@ fn main_inner(ui: &Ui, args: Args) -> Result<()> {
update_crate_roots_from_project_config(&mut db, &config);
let crate_id = db.intern_crate(CrateLongId::Real {
name: SmolStr::new(&compilation_unit.target.name),
discriminator: main_component
.discriminator
.as_ref()
.map(ToSmolStr::to_smolstr),
discriminator: Some(CrateIdentifier::from(&main_component.name).clone().into()),
});
// Get all the diagnostics
let mut diags = Vec::new();
Expand Down

0 comments on commit 619ca7f

Please sign in to comment.