task1 报错请教
代码:
```
module hello_move::hello_move {
use std::ascii::{String, string};
use sui::object::{Self,UID};
use sui::transfer::transfer;
use sui::tx_context::{TxContext, sender};
public struct Hello has key{
id:UID,
say: String
}
fun init(ctx: &mut TxContext) {
let hello_move = Hello {
id:object::new(ctx),
say: string(b"shismart-cool"),
};
transfer(hello_move, sender(ctx));
}
}
```
执行: sui client publish --gas-budget 100000000
报错:
error[E02004]: invalid 'module' declaration
┌─ /Users/.move/https___github_com_MystenLabs_sui_git_framework__testnet/crates/sui-framework/packages/move-stdlib/sources/vector.move:241:74
│
241 │ public macro fun find_index<$T>($v: &vector<$T>, $f: |&$T| -> bool): Option {
│ ^^^^^^^^^^^ 'std::option' uses 'std::vector'. This 'use' relationship creates a dependency cycle.
│
看起来像是sui内部报错了,不知道是不是我哪里写的有问题。
我给他们提个issue了:https://github.com/MystenLabs/sui/issues/18920
还没有回复,所以过来请教一下有没有大佬知道要怎么处理比较好?我可以本地把这个文件的内容给改掉么?
我的版本是:sui 1.29.2-homebrew
关闭于 2024-08-09 6 条评论