make sure the app and Pkg-Config have different names

otherwise there could be naming conflicts. for the mono tests, we must rename the app module to our tests continue to work
This commit is contained in:
Folkert 2020-12-14 01:57:42 +01:00
parent 8b4c4ca50f
commit 99a95b7200
2 changed files with 6 additions and 3 deletions

View file

@ -64,7 +64,7 @@ impl TagName {
impl ModuleName {
// NOTE: After adding one of these, go to `impl ModuleId` and
// add a corresponding ModuleId to there!
pub const APP: &'static str = ""; // app modules have no module name
pub const APP: &'static str = "#UserApp"; // app modules have no module name
pub const BOOL: &'static str = "Bool";
pub const STR: &'static str = "Str";
pub const NUM: &'static str = "Num";

View file

@ -908,13 +908,16 @@ where
D::Doc: Clone,
A: Clone,
{
use roc_module::ident::ModuleName;
if PRETTY_PRINT_IR_SYMBOLS {
alloc.text(format!("{:?}", symbol))
} else {
let text = format!("{}", symbol);
if text.starts_with('.') {
alloc.text("Test").append(text)
if text.starts_with(ModuleName::APP) {
let name: String = text.trim_start_matches(ModuleName::APP).into();
alloc.text("Test").append(name)
} else {
alloc.text(text)
}