-
Notifications
You must be signed in to change notification settings - Fork 229
pubspec.lock paths are incompatible on Windows #3012
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
Comments
Hmm, it seems reasonable that |
Please also see dart-lang/build#3137 |
@creativecreatorormaybenot |
@ZeroOneTV For me, it is enough to run But I do also agree that this is a big issue and should be prioritized in some way because it basically breaks the functionality. |
|
@ZeroOneTV I have seen the error, but it does not consistently appear for me as I said. I suggest you can create an issue on |
Thank you friend, I will create an issue related to this at the latest until tomorrow 👍 |
cc @sigurdm - do you understand from the description above where the bug is here? Is this something we need to prioritize before the next stable SDK release? |
Yeah - it is a regression introduced by 86bf8b2 . I will try to work on a fix. |
As @natebosch mentioned in the issue I opened, here would be the best place to present my error Problem information
Making use of these packages mentioned, i'm currently trying to run build_runner to generate the .g models and mocks for testing. I get the following error: Could not find a file named "pubspec.yaml" in "C:\Users\Zero\AppData\Local\Pub\Cache\git\flutter_plugins-fe50c5bb70cde2cbec931f082aabad229e8003d7\packages%5Cequalizer".
pub finished with exit code 66 Could not find a file named "pubspec.yaml" in "C:\Users\Zero\AppData\Local\Pub\Cache\git\flutter_plugins-fe50c5bb70cde2cbec931f082aabad229e8003d7\packages%5Cequalizer". I tried to remove the backslash from pubspec.lock file but I get the error:
This error occurs on flutter channel:
The only one in which the build is possible without major problems is the Stable channel. |
FYI for anyone finding this issue: Fixed (CP) in the newest version of the stable Dart SDK. |
In my case, the reason for this problem was that I used to pull the packges using So be sure to run build_runner with the same command as the one you pulled the packages with. |
Environment
Problem
When using
dart pub run build_runner build
(using thebuild_runner
package), the command immediately crashed because:The
pubspec.yaml
for this package looks like this:The generated
pubspec.lock
for this package looks like this:And here it was immediately obvious to me:
packages\\bar
was the culprit.Expected behavior
path
in thepubspec.lock
should be a forward slash (packages/bar
) as the lock file should be version controlled for apps, which means that non-Windows users should use the same lock file.flutter pub run build_runner build
works :)Actual behavior
Workaround
I figured out a workaround solution:
packages\\bar
topackages/bar
in thepubspec.lock
file.flutter pub run build_runner build
runs successfully).The text was updated successfully, but these errors were encountered: