HigherOrderCO/hvm-64

`hvmc compile` throws error "No such file or directory"

Closed this issue · 5 comments

Screenshot 2024-01-26 at 19 01 15

This is on hvm-core commit 7d8053d.

Note this seems to be related to an output file, because if I do use a non-.hvmc file, it shows a different error:

Screenshot 2024-01-26 at 19 02 55

I do see my program compiled into Rust code in my .hvm/src/fns.rs, if that helps.

If I try cargo build --release in the .hvm directory, I get these:

Screenshot 2024-01-26 at 19 07 20

Perhaps something related to name munging? (Are dots in identifiers still allowed?)

Sources:
crc32.hvm.txt
crc32.hvmc.txt
Compiled with hvm-lang commit 074f043e693692e644e3f51da8f81a7b8a0a987b (current master)

FWIW, the issues persist even if I remove all . from my "user-space" identifiers. In that case I get

error: expected one of `:`, `;`, or `=`, found `.`
  --> src/fns.rs:52:13
   |
52 | pub const F_.    : Val = 0x00003f;
   |             ^ expected one of `:`, `;`, or `=`

error[E0599]: no method named `call_native` found for mutable reference `&mut run::Net<'a>` in the current scope
   --> src/run.rs:880:15
    |
880 |       if self.call_native(book, ptr, trg) {
    |               ^^^^^^^^^^^ method not found in `&mut Net<'a>`

error: missing type for `const` item
  --> src/fns.rs:52:13
   |
52 | pub const F_.    : Val = 0x00003f;
   |             ^ help: provide a type for the item: `: <type>`

For more information about this error, try `rustc --explain E0599`.
error: could not compile `hvm-core` (lib) due to 3 previous errors

Does it compile if you just rename the identifiers that ends with .?