Open hapeeeeee opened 5 months ago
I suspect that this has something to do with implicit imports of the commonly used modules (explicit imports incorrectly shadowing implicit ones?). @tnowacki, is this the intended behavior?
Have you set the flavor to Sui? This is done in the package config.
As a side note, I would probably also advise against invoking the compiler directly, and instead using the package system with the custom compiler driver, compile_with_driver
Have you set the flavor to Sui? This is done in the package config.
As a side note, I would probably also advise against invoking the compiler directly, and instead using the package system with the custom compiler driver, compile_with_driver
I tried introducing Sui
in the dependencies of sui-move-analyzer
, but the issue still persists. On the other hand, the current diagnostic information generation is already based on the compile_with_driver
function, as shown in the picture below.
@hapeeeeee
Sui
listed as a dependency in your Move.toml
?sui
mode (via build_config.default_flavor = Some(Flavor::Sui)
)?@hapeeeeee have you managed to get this working? If so, let's close this issue. If not, feel free to add more details so that the team can help you.
We are developing
sui-move-analyzer
to be compatible with the2024.beta
version of the Sui Move language, based on the version: (git = "https://github.com/MystenLabs/sui.git", rev = "6e1cf7a1a9971fedd8b7830e586029d6c2cf801a").We have found that the interface for generating diagnostics (compiler.run::) seems to have issues. The diagnostic information at this level appears incorrect.
When encountering types provided by Sui itself, an "unbound type" message appears. For example, ID and TxContext.
The diagnostic information only does not appear if the Sui types are explicitly imported using the
use
statement, such asuse sui::object::ID
, or ifsui::object::ID
andsui::tx_context::TxContext
are specified when using these types.