MystenLabs / sui

Sui, a next-generation smart contract platform with high throughput, low latency, and an asset-oriented programming model powered by the Move programming language
https://sui.io
Apache License 2.0
5.97k stars 11.09k forks source link

Error [E01003] struct NFT { Invalid struct declaration. Internal struct declarations are not yet supported #17079

Open UXSciGuy opened 5 months ago

UXSciGuy commented 5 months ago

When running "sui move build" with the following code in my .move file:

/// Module: test_nft
module test_nft::test_nft {
    use sui::url::{Self, Url};
    use std::string;
    use sui::object::{Self, ID, UID};
    use sui::event;
    use sui::transfer;
    use sui::tx_context::{Self, TxContext};

    /// An example NFT that can be minted by anybody
    struct DevNetNFT has key, store {
        id: UID,
        /// Name for the token
        name: string::String,
        /// Description of the token
        description: string::String,
        /// URL for the token
        url: Url,
    }
}

I get the following error message:

error[E01003]: invalid modifier ┌─ sources/simba_nft.move:4:5 │ 4 │ struct NFT { │ ^^^^^^ Invalid struct declaration. Internal struct declarations are not yet supported

I know that internal struct declarations are allowed. What is the issue? I've setup the sui environment per the documentation. Can some one help?

mshakeg commented 4 months ago

Your issue might be related to https://github.com/MystenLabs/sui/issues/17087

gordonkoehn commented 4 months ago

I am getting the same issue/warning when running the VS Code Studio language support plugin.

github-actions[bot] commented 2 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

stefan-mysten commented 1 month ago

@UXSciGuy is this issue still ongoing?