ValeLang / Vale

Compiler for the Vale programming language - http://vale.dev/

Home Page:https://vale.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Panic running file with wrong extension

renatoathaydes opened this issue · comments

Just downloaded Vale to try it out. Followed the README instructions, which by the way are incorrect... it says:

    Download the latest binary at http://vale.dev/download
    Unzip it into, for example, ~/Vale, and cd into it.
    Compile a program: valec build hello=./samples/helloworld --output_dir target
    Run the program: target/main

I did that and got this:

▶ ./valec build hello=./samples/helloworld --output_dir target
resolve: Realpath failed for input "./samples/helloworld": No such file or directory

As there's no directory samples anywhere in the unzipped file.

Then I created a file hello.v, put the contents from if.vale in it, and ran the compiler:

▶ ./valec build hello=./hello.v --output_dir target
Moving existing output directory target to /tmp/old_output_dir_351728258241621.
Running:
/Users/renato/.sdkman/candidates/java/current/bin/java -cp /Users/renato/programming/apps/Vale-Mac-0.2.0.11/Frontend.jar dev.vale.passmanager.PassManager build --output_dir target --sanity_check true stdlib=/Users/renato/programming/apps/Vale-Mac-0.2.0.11/stdlib/src
Running:
/Users/renato/programming/apps/Vale-Mac-0.2.0.11/backend --verify --output_dir target target/vast/__vale.vast target/vast/stdlib.math.vast
Region override: assist
Warning: not using census when in assist mode!
Couldn't find main function! (Did you forget to export it?)
Backend returned error code 1, aborting.
(panic)

I had thought the extension was just v... I moved the file to hello.vale and tried again, and it worked.

Hey Renato, thank you for the detailed bug report, that's some tenacious investigating! I'm updating this now, and including it in #511.

And thank you for the kind words on Reddit, that made my day =)

Fixed and merged! Thanks Renato!

Thank you! BTW You mentioned one of my articles in the docs about fearless concurrency! Unfortunately it's on my older blog https://sites.google.com/a/athaydes.com/renato-athaydes/posts/fearlessconcurrencyhowclojurerustponyerlanganddartletyouachievethat

I hope to transfer some of the older blog posts to my new one renato.athaydes.com one day... hope Google doesn't take my old one down, if they do I will be forced to finally do it (they are asking for people to pay now for the old Google services that had been free for like 10 years!).

I knew I recognized that name somewhere! Thanks for writing that article =)