-
Notifications
You must be signed in to change notification settings - Fork 209
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
build_runner fails on Windows with dependencies using git and path #3137
Comments
Interesting, can you link your |
Sure:
|
Interesting... the package config looks fine. |
Maybe another relevant piece of information is that I discovered this with a flutter project on Flutter's beta channel. |
I just switched to Flutter's |
I do not yet, no. I haven't had a chance to dive into this but I will try and take a look in a bit. |
As far as I can tell though this is where we create the path
If you wanted to you could try some local debugging to see how the path looks at that point (check You can see some initial help on how to debug the build script here https://github.com/dart-lang/build/blob/master/docs/builder_author_faq.md#how-can-i-debug-my-builder although the actual debugging part is IDE specific. I can give an example vscode config if you would like. |
Thank you. I will try to debug it tomorrow. The vscode example config would definitely be of help, as I use this IDE. |
{
"version": "0.2.0",
"configurations": [
{
"name": "build script",
"program": ".dart_tool/build/entrypoint/build.dart",
"request": "launch",
"type": "dart",
// "cwd": "Set this to your package subdir if not the root",
"args": [
"build",
"--delete-conflicting-outputs"
]
}
]
} |
It looks like this is now a duplicate of dart-lang/pub#3012 where the underlying issue is being tracked, going to go ahead and close this one. |
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. |
When using a dependency like this:
build_runner fails parsing the path correctly on Windows:
As one can see from the error, it looks like the
path
parameter of thegit
dependency leads to an encoded backslash (%5C) which somehow messes up build_runner.The above way to add a dependency via git is an officially supported syntax:
https://dart.dev/tools/pub/dependencies
The text was updated successfully, but these errors were encountered: