Closed blaugold closed 4 years ago
Oh wow that is a weird one given that it is valid yaml to have a space there, the yaml writer lib I'm using is doing that extra space.
I do have a fix I can do to remove that extra space anyway, so will push that shortly.
Thanks for the report!
Thanks for the quick fix.
No worries, published version is now up. Thanks
I'm trying to run
flutter pub run build_runner build
in one of the packages, but get this error:Investigating this issue, I found that
pub
does not fully parse the lock file as a yaml file. Instead, it uses a regex to find sdk constraints for frameworks, such asdart
andflutter
. This regex also matches part of the package declaration for theflutter
package, afterpubspec.lock
has been written bymelos
:When the lock file is written by
pub
, the line with the package name terminates right after:
, whereas when written by melos there is a space after:
, which allows the regex to match, but with an empty version string.To solve this issue, either the regex needs to be more strict (don't mach an empty version) or the code which prints the yaml doc needs to stop writing out the extra white space.