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

error message (Cannot convert expression to parametric) not in correct form #1860

Open
dank-openai opened this issue Jan 16, 2025 · 0 comments
Labels
dslx:lsp DSLX language server/protocol implementation dslx DSLX (domain specific language) implementation / front-end

Comments

@dank-openai
Copy link

dank-openai commented Jan 16, 2025

Describe the bug
This error message is not in the correct form, and as a result, there are some problems with it:

  • when compiling at the command line, we don't get an error that tells us which text cause the error
  • when type checking with the DSLX language server, it can't report the problem to the IDE and the problem is hidden unless you dig into the log
E0116 00:42:07.901671  490782 command_line_utils.cc:47] Could not extract a textual position from error message: INVALID_ARGUMENT: Cannot convert expression to parametric: IS_SIGNED > u32:0: INVALID_ARGUMENT: Provided status is not in recognized error form: INVALID_ARGUMENT: Cannot convert expression to parametric: IS_SIGNED > u32:0
Error: INVALID_ARGUMENT: Cannot convert expression to parametric: IS_SIGNED > u32:0

To Reproduce

pub struct foo<IS_SIGNED: u32 , NUM_BITS: u32, sign:bool = {IS_SIGNED > u32:0} > {
    data: xN[sign][NUM_BITS], 
}

#[test]
fn test_instantiate_foo() {
    let _ = foo<u32:0, u32:1> { data: u1:0};
}

compile the above

Expected behavior
I expect the error to be reported in the proper format, so that the issues identified above don't occur.

@dank-openai dank-openai changed the title error message not in correct form error message (Cannot convert expression to parametric) not in correct form Jan 16, 2025
@dplassgit dplassgit added dslx DSLX (domain specific language) implementation / front-end dslx:lsp DSLX language server/protocol implementation labels Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dslx:lsp DSLX language server/protocol implementation dslx DSLX (domain specific language) implementation / front-end
Projects
Status: No status
Development

No branches or pull requests

2 participants