I'm not able to compile stdlib
first time running gleam showed this error which is shown as well when running rebar3 eunit
PS C:\Users\sharno\projects\gleam_stdlib> rebar3 eunit
===> Verifying dependencies...
error: Syntax error
┌─ \\?\C:\Users\sharno\projects\gleam_stdlib\test\gleam\bit_builder_test.gleam:75:2
│
75 │ }
│ ^ Unexpected end of file
===> Unable to compile Gleam project
I checked the file and not sure what's the problematic syntax.
When I removed the test folder completely just to try, this error appeared instead:
error: Unknown module field
┌─ \\?\C:\Users\sharno\projects\gleam_stdlib\src\gleam\set.gleam:1:19
│
1 │ import gleam/map.{Map}
│ ^^^
The module `gleam/map` does not have a `Map` field.
What am I missing?
Hi @sharno. Could you share what versions of the compiler and stdlib you are using?
The stdlib version can be found in rebar.lock and the compiler version can be got with gleam --version.
Thanks,
Hi @lpil ,
Thanks for the quick reply
gleam version:
gleam 0.11.2
rebar.lock shows:
[].
but I just cloned the repo a few minutes ago and was trying to compile it
Oh I see! You're compiling the stdlib repo itself.
Which commit is the repo at? (git show HEAD --shortstat)
I've just tested 56738b7f3b588d272e7f60b7b642b45f835702ff with Gleam 0.11.2 and it compiles for me so it's not yet clear what the issue might be.
The error output looks strange there with ┌ characters, perhaps this is related.
PS C:\Users\sharno\projects\gleam_stdlib> git show HEAD --shortstat
commit 2d7e7143d6b6445bd6973ff88e6594dfd1da4966 (HEAD -> main, origin/main, origin/HEAD)
Author: RJ Dellecese <[email protected]>
Date: Mon Sep 7 13:08:02 2020 -0400
Fix typo in `bit_string.to_string` doc
1 file changed, 1 insertion(+), 1 deletion(-)
yeah I noticed these weird characters, I'm running gleam on PowerShell (Windows machine) maybe this is related?
It's an older commit but it should still work. Does the latest commit work?
We test on Windows so it should work, but I've not verified it lately. I'll see if I can do that.
I just tried Ubuntu through WSL now and it still shows the same errors
@lpil
Ok I realized what's the problem I think, I cloned the repo again through WSL and it compiled fine. Re-cloning on Windows shows the errors again.
Probably something related to git handling of line endings on Windows and the gleam compiler?
Not sure, could it be related to this line handling only \n not \r\n?
https://github.com/gleam-lang/gleam/blob/fe537d095c10b4b2c6b91e9538f7b139c85110a7/src/parser.rs#L187
That was my thought too! My plan was to start my investigation there
On Sun, 11 Oct 2020, 16:29 Mohamed Elsharnouby, notifications@github.com
wrote:
Not sure, could it be related to this line handling only \n not \r\n?
https://github.com/gleam-lang/gleam/blob/fe537d095c10b4b2c6b91e9538f7b139c85110a7/src/parser.rs#L187
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/gleam-lang/stdlib/issues/109#issuecomment-706722018,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABOZVBRMUFSVK5GMJO4IXW3SKHFOPANCNFSM4SLG7LLA
.
You were right @sharno ! That was the problem. Comments didn't get terminated correctly
@lpil Awesome! thanks a lot for dealing with this 😄
I'm excited for Gleam and want to build something with it
Awesome!
I'm primarily on Windows now so hopefully this won't happen again.