Skip to content

Commit

Permalink
[compiler] improve error message when hl_version is missing
Browse files Browse the repository at this point in the history
closes #11086
  • Loading branch information
Simn committed Aug 8, 2023
1 parent 743ab41 commit 3a5140e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/compiler/compiler.ml
Expand Up @@ -143,7 +143,14 @@ module Setup = struct
"python"
| Hl ->
add_std "hl";
if not (Common.defined com Define.HlVer) then Define.define_value com.defines Define.HlVer (try Std.input_file (Common.find_file com "hl/hl_version") with Not_found -> die "" __LOC__);
if not (Common.defined com Define.HlVer) then begin
let hl_ver = try
Std.input_file (Common.find_file com "hl/hl_version")
with Not_found ->
failwith "The file hl_version could not be found. Please make sure HAXE_STD_PATH is set to the standard library corresponding to the used compiler version."
in
Define.define_value com.defines Define.HlVer hl_ver
end;
"hl"
| Eval ->
add_std "eval";
Expand Down

0 comments on commit 3a5140e

Please sign in to comment.