Skip to content

Commit

Permalink
feat: intern dojo and output world contract artifacts (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
tarrencev authored Mar 29, 2023
1 parent cd5c011 commit 75b6324
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion crates/dojo-lang/src/compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ use std::ops::DerefMut;

use anyhow::{Context, Result};
use cairo_lang_compiler::db::RootDatabase;
use cairo_lang_filesystem::db::FilesGroup;
use cairo_lang_filesystem::ids::CrateLongId;
use cairo_lang_starknet::contract::find_contracts;
use cairo_lang_starknet::contract_class::compile_prepared_db;
use cairo_lang_utils::Upcast;
Expand Down Expand Up @@ -36,7 +38,10 @@ impl Compiler for DojoCompiler {

let compiler_config = build_compiler_config(&unit, ws);

let main_crate_ids = collect_main_crate_ids(&unit, &db);
let mut main_crate_ids = collect_main_crate_ids(&unit, &db);
if unit.main_component().cairo_package_name() != "dojo" {
main_crate_ids.push(db.intern_crate(CrateLongId("dojo".into())));
}

let contracts = {
let _ = trace_span!("find_contracts").enter();
Expand Down

0 comments on commit 75b6324

Please sign in to comment.