-
Notifications
You must be signed in to change notification settings - Fork 215
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
fix: bootstrap race condition causes dart example to be restored before its pubspec_overrides.yaml is written #796
Comments
A workaround is to use path dependencies for the examples, since its not that important that it's not published anywhere (usually) explicit versions doesn't matter as much as for packages and apps. |
yes, but I think the root problem is that melos is writing |
@ahmednfwela that could very well be, if you have time to investigate it further and provide a PR I can assign you to the issue? |
sure, that would be great @spydon |
We faced the same issue when we used workflow run: https://github.com/GetStream/stream-chat-flutter/actions/runs/12549072449/job/34989464282?pr=2075 |
this just turns the issue into a race condition instead @xsahil03x it may or may not happen depending on the threading capacity of the process I was going to work on this issue, but I saw that pub workspaces were released , so I decided to just wait and see how they play with melos |
Is there an existing issue for this?
Version
6.2.0
Description
Running
melos bootstrap
with repos that contain dart packages with examples can sometimes fail because of race conditions, where flutter will try to resolve the example project before melos has a chance to write itspubspec_overrides.yaml
e.g. when running
melos bootstrap
in a clean clone of the oidc package, you can seeoidc_web_core/pubspec_overrides.yaml
present, butoidc_web_core/examples/pubspec_overrides.yaml
is not generated yet.this causes the following exception:
Steps to reproduce
git clone https://github.com/Bdaya-Dev/oidc && cd oidc
git clean -xdf
to make sure all caches are removedmelos bs
Expected behavior
Melos should first create
pubspec_overrides.yaml
for all packages, then execute pub get on them in arbitrary orderScreenshots
No response
Additional context and comments
I tried running
melos bootstrap --no-example
, and the first problem was resolved, but then I am facing a different error:the only workaround I have found to solve this is to run the following commands in this specific order:
The text was updated successfully, but these errors were encountered: