Skip to content
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

Relative paths seem to not be supported #198

Closed
mosuem opened this issue Dec 6, 2024 · 4 comments · Fixed by #199
Closed

Relative paths seem to not be supported #198

mosuem opened this issue Dec 6, 2024 · 4 comments · Fixed by #199
Labels
bug Something isn't working

Comments

@mosuem
Copy link
Contributor

mosuem commented Dec 6, 2024

Describe the bug
While trying out the PR health workflow in dart-lang/native, I saw that it throws for some of the packages in that monorepo.

To Reproduce

#git clone dart-lang/native
cd native/
flutter pub global run dart_apitool:main diff --no-check-sdk-version --old pub://ffigen --new pkgs/ffigen --report-format json --report-file-path report.json

Actual and Expected behavior
Throws an error

Error: Exception: Because ffigen depends on objective_c from path which doesn't exist (could not find package objective_c at "../objective_c"), version solving failed.

But this package does exist there. Probably some copying doesn't copy the path dependencies?

System info (please complete the following information):

  • Output of dart --version: Dart SDK version: 3.7.0-207.0.dev (dev) (Mon Dec 2 12:02:22 2024 -0800) on "linux_x64"
  • dart_apitool version (dart-apitool --version): 0.20.0

Additional context

@mosuem mosuem added the bug Something isn't working label Dec 6, 2024
@devmil
Copy link
Member

devmil commented Dec 6, 2024

@mosuem thanks for reporting this
The issue is that ffigen on pub contains dependency overrides and dart_apitool is trying to execute pub get on a downloaded copy which does not work.
The linked PR removes any dependency overrides in that situation which should be no issue as those overrides only affect local pub gets anyways

@mosuem
Copy link
Contributor Author

mosuem commented Dec 9, 2024

Thanks! That will work well for packages which are ready to be published. However, this will not help for packages during during development, where multiple packages may be touched at the same time. Should I open a new issue for this? This should be less common though.

@devmil
Copy link
Member

devmil commented Dec 9, 2024

@mosuem good point. Will test that but I think this works already as we execute pub get in place and transfer the resulting package config while turning relative paths into absolute ones.

But if you already have a concrete issue then please create a new issue. Will release this fix later so that you can use it already

@devmil
Copy link
Member

devmil commented Dec 11, 2024

@mosuem sorry for the delay. The fix is released now (0.20.1) and I added an integration test that covers ffigen (so a package in a mono repo with relative references from source) here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

2 participants