mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
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:
parent
8b4c4ca50f
commit
99a95b7200
2 changed files with 6 additions and 3 deletions
|
@ -64,7 +64,7 @@ impl TagName {
|
||||||
impl ModuleName {
|
impl ModuleName {
|
||||||
// NOTE: After adding one of these, go to `impl ModuleId` and
|
// NOTE: After adding one of these, go to `impl ModuleId` and
|
||||||
// add a corresponding ModuleId to there!
|
// 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 BOOL: &'static str = "Bool";
|
||||||
pub const STR: &'static str = "Str";
|
pub const STR: &'static str = "Str";
|
||||||
pub const NUM: &'static str = "Num";
|
pub const NUM: &'static str = "Num";
|
||||||
|
|
|
@ -908,13 +908,16 @@ where
|
||||||
D::Doc: Clone,
|
D::Doc: Clone,
|
||||||
A: Clone,
|
A: Clone,
|
||||||
{
|
{
|
||||||
|
use roc_module::ident::ModuleName;
|
||||||
|
|
||||||
if PRETTY_PRINT_IR_SYMBOLS {
|
if PRETTY_PRINT_IR_SYMBOLS {
|
||||||
alloc.text(format!("{:?}", symbol))
|
alloc.text(format!("{:?}", symbol))
|
||||||
} else {
|
} else {
|
||||||
let text = format!("{}", symbol);
|
let text = format!("{}", symbol);
|
||||||
|
|
||||||
if text.starts_with('.') {
|
if text.starts_with(ModuleName::APP) {
|
||||||
alloc.text("Test").append(text)
|
let name: String = text.trim_start_matches(ModuleName::APP).into();
|
||||||
|
alloc.text("Test").append(name)
|
||||||
} else {
|
} else {
|
||||||
alloc.text(text)
|
alloc.text(text)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue