Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array of sequence is not supported #283

Open
t0ny-peng opened this issue Feb 10, 2025 · 2 comments
Open

Array of sequence is not supported #283

t0ny-peng opened this issue Feb 10, 2025 · 2 comments
Labels
feature New feature or request

Comments

@t0ny-peng
Copy link

Description

The OMGIDL allows defining an array whose element is a bounded sequence. However, this is not supported in the foxglove.

  • Version: Latest one on Flxglove website
  • Platform: Browser

Steps To Reproduce

Create an MCAP file with the following omgidl definition:

module test {
module group {
    @final struct Groups {
        sequence<octet, 71> grp7[70];
    };

};
};

Open the mcap file in foxglove UI and you'll see this error message

Error message:

Error in topic /chatter2 (channel 1)
Syntax error at line 10 col 33:

 8  };
 9  
10  
                                    ^
Unexpected LBR token: "[". Instead, I was expecting to see one of the following:

A "," based on:
    multiFieldNames$ebnf$1$subexpression$1 →  ● "," fieldName
    multiFieldNames$ebnf$1 → multiFieldNames$ebnf$1 ● multiFieldNames$ebnf$1$subexpression$1
    multiFieldNames → fieldName ● multiFieldNames$ebnf$1
    fieldDcl$subexpression$1 → sequenceType ● multiFieldNames
    fieldDcl →  ● fieldDcl$subexpression$1
    fieldWithAnnotation → multiAnnotations ● fieldDcl
    member →  ● fieldWithAnnotation semi
    struct$ebnf$1$subexpression$1 →  ● member
    struct$ebnf$1 → struct$ebnf$1 ● struct$ebnf$1$subexpression$1
    struct → "struct" fieldName "{" ● struct$ebnf$1 "}"
    typeDcl$subexpression$1 →  ● struct
    typeDcl →  ● typeDcl$subexpression$1
    definition$subexpression$1 →  ● typeDcl
    definition → multiAnnotations ● definition$subexpression$1 semi
    moduleDcl$ebnf$1$subexpression$1 →  ● definition
    moduleDcl$ebnf$1 →  ● moduleDcl$ebnf$1$subexpression$1
    moduleDcl → "module" fieldName "{" ● moduleDcl$ebnf$1 "}"
    definition$subexpression$1 →  ● moduleDcl
    definition → multiAnnotations ● definition$subexpression$1 semi
    moduleDcl$ebnf$1$subexpression$1 →  ● definition
    moduleDcl$ebnf$1 →  ● moduleDcl$ebnf$1$subexpression$1
    moduleDcl → "module" fieldName "{" ● moduleDcl$ebnf$1 "}"
    definition$subexpression$1 →  ● moduleDcl
    definition → multiAnnotations ● definition$subexpression$1 semi
    main$ebnf$1$subexpression$2 → main$ebnf$1$subexpression$2$ebnf$1 ● definition
    main$ebnf$1 → main$ebnf$1 ● main$ebnf$1$subexpression$2
    main →  ● main$ebnf$1
A ";" based on:
    semi →  ● ";"
    member → fieldWithAnnotation ● semi
    struct$ebnf$1$subexpression$1 →  ● member
    struct$ebnf$1 → struct$ebnf$1 ● struct$ebnf$1$subexpression$1
    struct → "struct" fieldName "{" ● struct$ebnf$1 "}"
    typeDcl$subexpression$1 →  ● struct
    typeDcl →  ● typeDcl$subexpression$1
    definition$subexpression$1 →  ● typeDcl
    definition → multiAnnotations ● definition$subexpression$1 semi
    moduleDcl$ebnf$1$subexpression$1 →  ● definition
    moduleDcl$ebnf$1 →  ● moduleDcl$ebnf$1$subexpression$1
    moduleDcl → "module" fieldName "{" ● moduleDcl$ebnf$1 "}"
    definition$subexpression$1 →  ● moduleDcl
    definition → multiAnnotations ● definition$subexpression$1 semi
    moduleDcl$ebnf$1$subexpression$1 →  ● definition
    moduleDcl$ebnf$1 →  ● moduleDcl$ebnf$1$subexpression$1
    moduleDcl → "module" fieldName "{" ● moduleDcl$ebnf$1 "}"
    definition$subexpression$1 →  ● moduleDcl
    definition → multiAnnotations ● definition$subexpression$1 semi
    main$ebnf$1$subexpression$2 → main$ebnf$1$subexpression$2$ebnf$1 ● definition
    main$ebnf$1 → main$ebnf$1 ● main$ebnf$1$subexpression$2
    main →  ● main$ebnf$1

Expected Behavior

@t0ny-peng t0ny-peng added the bug Something isn't working label Feb 10, 2025
@defunctzombie
Copy link
Contributor

From what I can see in your description - this is an issue with the schema parsing which would be on this repo: https://github.com/foxglove/omgidl.

While we do have this general purpose omgidl support in that repo, we do not support the entire universe of the omgidl language. We are open to PRs for adding support for more capabilities though if you want to dive into the code and contribute.

@defunctzombie defunctzombie transferred this issue from foxglove/cdr Feb 10, 2025
@defunctzombie defunctzombie added feature New feature or request and removed bug Something isn't working labels Feb 10, 2025
@t0ny-peng
Copy link
Author

@defunctzombie Thanks for the explanation. It's not a dealbreaker for us since this is just a weird test case we have right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Development

No branches or pull requests

2 participants