mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
Make sure FunctionKind is determined in all entry points
There are a lot of entry points for a Roc program. They should probably be all consolidated into one, but for now, when FunctionKind is needed, determine it from the environment. This fixes EXPERIMENTAL_ROC_ERASE for `roc test` etc. Also print the location of a failure when `internal_error!` is called. I think this should panic instead, and I thought it used to - does anyone know if that changed?
This commit is contained in:
parent
6869c9f2e1
commit
0e52a7e069
6 changed files with 31 additions and 25 deletions
|
@ -516,8 +516,7 @@ pub fn test(matches: &ArgMatches, target: Target) -> io::Result<i32> {
|
|||
}
|
||||
|
||||
let arena = &arena;
|
||||
// TODO may need to determine this dynamically based on dev builds.
|
||||
let function_kind = FunctionKind::LambdaSet;
|
||||
let function_kind = FunctionKind::from_env();
|
||||
|
||||
let opt_main_path = matches.get_one::<PathBuf>(FLAG_MAIN);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue