Open skulidropek opened 1 day ago
I didn't expect any issue with this code
import "@stdlib/deploy";
import "@stdlib/ownable";
import "@stdlib/stoppable";
May you share information about your environment? I see that you use Windows, as and I, but maybe not the latest version for the extension? Also, may this issue be related to different tact compiler version?
It does not give errors, but when pressing ctrl + click the functionality does not work for libraries taken from stdlib. It simply does not load them from the folder
I am using the latest version of the compiler
there is another problem that I found it does not load the default libraries that Tact uses
import "./std/primitives";
import "./std/cells";
import "./std/crypto";
import "./std/text";
import "./std/math";
import "./std/contract";
import "./std/debug";
import "./std/context";
import "./std/reserve";
import "./std/send";
import "./std/config";
import "./std/base";
I'm writing code now to make it load them because it doesn't see them for autocomplete or for ctrl+click.
const stdlibPath = path.resolve(path.dirname(this.absolutePath), "../node_modules/@tact-lang/compiler/stdlib/std");
const standardImports = [
"primitives", "cells", "crypto", "text", "math", "contract",
"debug", "context", "reserve", "send", "config", "base"
];
const contractFileName = path.basename(contractPath);
for (const lib of standardImports) {
const fullPath = path.join(stdlibPath, `${lib}.tact`);
const fullPathFileName = path.basename(fullPath);
if (fs.existsSync(fullPath) && fullPathFileName !== contractFileName && !this.imports.includes(fullPath)) {
this.imports.push(fullPath);
}
}
The formatter does not recognize libraries imported using the @stdlib syntax, resulting in missing syntax highlighting and potentially affecting other IDE features.
For instance, the following snippet:
tact
is not recognized by the formatter and syntax highlighter, while the workaround below works as expected: tact
Logs: