Fork of daniellemaywood.uk/gleam — Wasm codegen work
2

Configure Feed

Select the types of activity you want to include in your feed.

fix unicode bugs

+12 -6
+4
CHANGELOG.md
··· 237 237 - Fixed a bug where the inferred variant of values was not properly cached, 238 238 leading to incorrect errors on incremental builds and in the Language Server. 239 239 ([Surya Rose](https://github.com/GearsDatapacks)) 240 + 241 + - Fixed a bug where Gleam would be unable to compile to BEAM bytecode if the 242 + project path contains a non-ascii character. 243 + ([yoshi](https://github.com/joshi-monster)) 240 244 241 245 ## v1.6.1 - 2024-11-19 242 246
+8 -6
compiler-cli/templates/gleam@@compile.erl
··· 4 4 % TODO: Don't concurrently print warnings and errors 5 5 % TODO: Some tests 6 6 7 - main(_) -> compile_package_loop(). 7 + main(_) -> 8 + ok = io:setopts([binary, {encoding, utf8}]), 9 + ok = configure_logging(), 10 + compile_package_loop(). 8 11 9 12 compile_package_loop() -> 10 - case file:read_line(standard_io) of 13 + case io:get_line("") of 11 14 eof -> ok; 12 - {ok, Line} -> 15 + Line -> 13 16 Chars = unicode:characters_to_list(Line), 14 17 {ok, Tokens, _} = erl_scan:string(Chars), 15 18 {ok, {Lib, Out, Modules}} = erl_parse:parse_term(Tokens), ··· 25 28 filename:extension(Module) =:= ".ex" 26 29 end, 27 30 {ElixirModules, ErlangModules} = lists:partition(IsElixirModule, Modules), 28 - ok = configure_logging(), 31 + ok = filelib:ensure_dir([Out, $/]), 29 32 ok = add_lib_to_erlang_path(Lib), 30 - ok = filelib:ensure_dir([Out, $/]), 31 33 {ErlangOk, _ErlangBeams} = compile_erlang(ErlangModules, Out), 32 34 {ElixirOk, _ElixirBeams} = case ErlangOk of 33 35 true -> compile_elixir(ElixirModules, Out); ··· 166 168 167 169 log(Term) -> 168 170 case persistent_term:get(gleam_logging_enabled) of 169 - true -> erlang:display(Term), ok; 171 + true -> io:fwrite("~p~n", [Term]), ok; 170 172 false -> ok 171 173 end.