Closed banool closed 1 year ago
unable to parse pubspec.yaml in /Users/dport/github/aclip/frontend
What about debugging like this: Add some more outputs around this yaml parsing functions, so we can clearly see what exactly is failing
Alright will do, though probably not for a week or so.
Take your time!
In my case, pubspec.yaml validation always failed if there were no version constraints specified for packages in pubspec.yaml
In prototyping, you can specify your dependencies like this:
dependencies:
flutter:
sdk: flutter
potato__package:
...and you'll just get the latest available package of potato_package. But, specifying packages with no version constraints causes flutter_rust_bridge YAML validation to choke.
To resolve, make sure all your packages have versions specified in the pubspec.yaml
@flutterfromscratch That looks like a bug in the validation logic and should be quite easy to fix. Feel free to PR!
I'm attempting a fix now. I'll use this message to update my progress.
So changing to show the error, I see this:
[2022-11-15T13:16:16Z ERROR flutter_rust_bridge_codegen] fatal: unable to parse pubspec.yaml in /Users/dport/github/aclip/frontend: dependencies: data did not match any variant of untagged enum PackageVersion at line 11 column 17
Investigating now what the problem is specifically. It does indeed seem to be that you need to specify versions explicitly.
Okay got it, check out https://github.com/fzyzcjy/flutter_rust_bridge/pull/846.
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
Problem
The problem is code generation fails due to some issue with the spec, though as far as I can tell, it's valid yaml (according to
yq
).Repro
Get the repo:
Try to generate the code:
I recently pulled the latest
justfile
from the template repo.Some other information:
Codegen logs with
RUST_LOG=debug
environment variable