-
Notifications
You must be signed in to change notification settings - Fork 229
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
Cannot depend on a git package if the git package depends on a path package. #2447
Comments
Yes, my guess is that these are the same. Is the path being interpreted relative to the git root?
|
Edit: to be clear, I rename project names in the example.
As I mentioned, partner_project_a is not my project so I cannot change My project depends on partner_project_a:
|
It was not meant as a solution, just to explore what is currently happening when you have a path dependency in a git dependency. |
Nevermind - I realize now that pub doesn't support relative paths from git at all. |
You can work around this with Another option for sharing private dependencies is to use a private pub repository. I think the fix for |
Thanks for suggestion! Currently I checkout project locally as workaround. But |
Tested but unfortunately it doesn't help. |
any update? dependency_overrides is not work at my side. |
I don't think we'll prioritize work on this issue in the short-term future. Your best bet might be to make a local check-out and use a path-dependency to that. |
Reading more carefully, I'm not sure this is a dup of #449 |
Also fix relative path dependencies from a directory git dependency dart-lang#2447
dependencies:
audio_service:
git:
url: https://github.com/ryanheise/audio_service.git
ref: one-isolate
path: audio_service
dependency_overrides:
audio_service_platform_interface:
git:
url: https://github.com/ryanheise/audio_service.git
ref: one-isolate
path: audio_service_platform_interface Doing this still does not work:
It seems that the error is raised even before |
That |
Dived into the code a bit, the problem is that the |
I'm currently using path to workaround flutter/flutter#63240 but this behavior certainly isn't helpful as now the dependency can't be used from git. |
Anyone found any work around for this case? |
any update on this other than cloning the dependency locally and giving the path ? |
Path dependency override don't appear to work for dependencies in flutter. Seems to be a known bug (see dart-lang/pub#2447)
Path dependency override don't appear to work for dependencies in flutter. Seems to be a known bug (see dart-lang/pub#2447)
Closing this as duplicate of #449 |
see this solution it may help you. |
I am also affected. |
@RubenGarcia this should be fixed in dart 3.4 and onwards: https://github.com/dart-lang/sdk/blob/main/CHANGELOG.md#pub-2 |
I have a problem when I want to add dependency from another team.
Assume my company has a partner. The partner allows my company access to their git repository
ssh://git@partner.com/root_project.git
. Inroot_project
, we have 2 sub-projects:project_a
andproject_b
. Below is thepubspec.yaml
ofproject_a
:My
pubspec.yaml
:If I run
pub get
, I hope that it's smart enough to findproject_b
from relative path of the git repository.Unfortunately, I get error:
dependency: "../project_b" is a relative path, but this isn't a local pubspec.
The problem is that I have no permission to change the file
/project_a/pubspec.yaml
to use git url because it's not my project.The text was updated successfully, but these errors were encountered: