Closed The-Mr-L closed 1 year ago
Hi, could you please provide a minimal reproducible sample? "lex error" seems like it does not understand something.
Btw, is this related https://github.com/fzyzcjy/flutter_rust_bridge/issues/1328
wellI can understand why you ask for more context since the error seams to be a general one. it was just me thinking you might be able to tell from what has changed since last release. but it is fair. and btw the latest codegen is running fine in a basic template app on my machine. but in my project it panics. for now I will just stick with 1.80.1. and I will try to make the minimal example hopefully this upcoming week or look into the error myself . thanks again for maintaining this repo!
and I don't think the error is related to the issue mentioned
Hi, it is because "lex error" can mean a lot of things... For example, which exact piece of code causes the lex error? With a minimal reproducible sample, it will be easier to realize that!
Yes for sure , I understand :)
Okay I am sorry I have not yet had the time to make a test case for this, and since it only seams to be me having the issue I will lose this for now, and report back later if I can't fix it on my end. with hopefully a more specific error message :)
:)
Sure, take your time and feel free to post the issues!
I am running into this issue as well. The codegen works fine in v1.80.1. When I get to v1.81.0, it breaks. Maybe whatever got expanded is invalid?
@erikas-taroza Hi, could you please create a minimal reproducible sample? e.g. bisect the code, etc.
Alternatively, maybe we should enhance frb's error message: When "lex error" happens, we should use anyhow's context
feature to attach some context to it, such as the surrounding code that is being parsed by frb.
@erikas-taroza Hi, could you please create a minimal reproducible sample? e.g. bisect the code, etc.
Sure.
Alternatively, maybe we should enhance frb's error message: When "lex error" happens, we should use anyhow's
context
feature to attach some context to it, such as the surrounding code that is being parsed by frb.
Yes, this is a good idea.
I found the issue.
This was taking a }
off from the end of the expanded file which was causing the error.
Great observation! Feel free to PR to fix it
Great observation! Feel free to PR to fix it
Created :) #1372
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new issue.
Describe the bug
Hi :) well I just wanted to let you know that for some reason the latest codegen fails but using either 1.79.0 or 1.80.1 seems to work as expected. I have not yet had time to look into it myself. But I will report back if I at some point know why :)
Codegen logs with
RUST_LOG=debug
environment variableTo Reproduce
No response
Expected behavior
No response
Generated binding code
No response
OS
No response
Version of
flutter_rust_bridge_codegen
No response
Flutter info
No response
Version of
clang++
No response
Version of
ffigen
No response
Additional context
No response