amuletml / amulet

An ML-like functional programming language
https://amulet.works/
BSD 3-Clause "New" or "Revised" License
324 stars 14 forks source link

"Unexpected let, expected end" in base.ml after 1.0.0.0 installation #266

Closed Lupus closed 4 years ago

Lupus commented 4 years ago

I've installed latest release (previously had 0.7 installed), and when trying to compile I get an error in base.ml:

(cd _build/default/rados-lua/aml && /home/vagrant/.local/bin/amc compile --lib . script.aml -o script.aml.lua)                                                               
/home/vagrant/.local/lib/amuletml/lib/amulet/base.ml[151:5 ..151:7]: error
  Unexpected let, expected end
    │
151 │     let! x = x
    │     ^^^

I've tried removing /home/vagrant/.local/lib and installing again (using curl https://amulet.works/install.sh | bash -), but I can't get past this errror. Am I missing something?

Lupus commented 4 years ago

Actually just running "amc" without any arguments after install results in the same error regarding let!.

SquidDev commented 4 years ago

Building manually using stack install appears to work fine, so I suspect this is an issue with our CI system. Odd.

Lupus commented 4 years ago

Just in case this is helpful:

$ uname -a
Linux buster 4.19.0-5-amd64 #1 SMP Debian 4.19.37-5 (2019-06-19) x86_64 GNU/Linux

$ cat /etc/debian_version 
10.0
SquidDev commented 4 years ago

I can confirm it breaks on Arch too, using the same install script. So I'm fairly sure it's not an OS issue.

Running amc --version shows that the compiled binary is built from a9e6841f1a10279afe5308227e6a95125307e7c3 (which is 6 days old), but the library comes from the latest commit. I'm not entirely sure why this is the case.

Lupus commented 4 years ago

Hey @SquidDev any new on fixing CI? May be correct release build could be published manually?

SquidDev commented 4 years ago

OK, the above commit appears to fix things temporarily. I'll have a look into a more permanent solution which doesn't actually break the build.

Lupus commented 4 years ago

Indeed, I can now install released version, thanks.

But I'll have to stay on 0.7 as 1.0 busy loops eating all my memory! lol

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                                                  
25718 vagrant   20   0 1024.3g   3.5g      4 R 100.0  92.0   0:49.61 /home/vagrant/.local/lib/amuletml/amc compile --lib . script.aml -o script.aml.lua