mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
Revise message for trying to run non-app modules
This commit is contained in:
parent
05d2b24e3a
commit
eacc65e07f
1 changed files with 12 additions and 15 deletions
|
@ -5420,11 +5420,10 @@ fn to_missing_platform_report(module_id: ModuleId, other: PlatformPath) -> Strin
|
|||
}
|
||||
RootIsInterface => {
|
||||
let doc = alloc.stack([
|
||||
alloc.reflow(r"The input file is an interface module, but only app modules can be run."),
|
||||
alloc.concat([
|
||||
alloc.reflow(r"I will still parse and typecheck the input file and its dependencies, "),
|
||||
alloc.reflow(r"but won't output any executable."),
|
||||
])
|
||||
alloc.reflow(
|
||||
r"The input file is an `interface` module, but only `app` modules can be run.",
|
||||
),
|
||||
alloc.reflow(r"Tip: You can use `roc check` or `roc test` to verify an interface module like this one."),
|
||||
]);
|
||||
|
||||
Report {
|
||||
|
@ -5436,11 +5435,10 @@ fn to_missing_platform_report(module_id: ModuleId, other: PlatformPath) -> Strin
|
|||
}
|
||||
RootIsHosted => {
|
||||
let doc = alloc.stack([
|
||||
alloc.reflow(r"The input file is a hosted module, but only app modules can be run."),
|
||||
alloc.concat([
|
||||
alloc.reflow(r"I will still parse and typecheck the input file and its dependencies, "),
|
||||
alloc.reflow(r"but won't output any executable."),
|
||||
])
|
||||
alloc.reflow(
|
||||
r"The input file is a `hosted` module, but only `app` modules can be run.",
|
||||
),
|
||||
alloc.reflow(r"Tip: You can use `roc check` or `roc test` to verify a hosted module like this one."),
|
||||
]);
|
||||
|
||||
Report {
|
||||
|
@ -5452,11 +5450,10 @@ fn to_missing_platform_report(module_id: ModuleId, other: PlatformPath) -> Strin
|
|||
}
|
||||
RootIsPlatformModule => {
|
||||
let doc = alloc.stack([
|
||||
alloc.reflow(r"The input file is a package config file, but only app modules can be run."),
|
||||
alloc.concat([
|
||||
alloc.reflow(r"I will still parse and typecheck the input file and its dependencies, "),
|
||||
alloc.reflow(r"but won't output any executable."),
|
||||
])
|
||||
alloc.reflow(
|
||||
r"The input file is a `platform` module, but only `app` modules can be run.",
|
||||
),
|
||||
alloc.reflow(r"Tip: You can use `roc check` or `roc test` to verify a platform module like this one."),
|
||||
]);
|
||||
|
||||
Report {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue