nujan-io / nujan-ide

Web IDE, powered by Nujan, is your ultimate browser-based IDE designed to simplify the journey of writing, testing, compiling, deploying, and interacting with smart contracts on TON. Write smart contracts from anywhere, No setups, no downloads, just pure convenience and versatility.
https://ide.nujan.io
Other
98 stars 10 forks source link

Tact files cannot reference FunC contracts in imports #27

Closed anton-trunov closed 2 months ago

anton-trunov commented 2 months ago

This is almost like issue #4, but for FunC imports this time. Let's say we have these two files:

The main Tact project:

// main
import "@stdlib/deploy";
import "./native.fc";

struct Pair {
    fst: Int;
    snd: Int;
}

@name(get_pair)
native getPair(): Pair;

contract Native with Deployable {

    init() {}

    receive("go") {
        dump(getPair().fst);
        dump(getPair().snd);
    }
}

And a FunC file:

// native.fc
(int, int) get_pair() {
    return (4, 2);
}

When trying to build main.tact, I get the following error message:

Could not resolve import ./native.fc in /main.tact