-
Notifications
You must be signed in to change notification settings - Fork 205
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
melos bootstrap
should consider path
when comparing two GitReference
s
#658
Comments
Good catch! Do you want to provide a PR for this? |
I may open a PR fixing it tomorrow. If j4qfrost/pubspec#9 is ever solved we may want to revert the code, but the repository seems to be abandoned (there are some open PRs that were never reviewed). Maybe we should consider forking it or using |
We could ask the author if they would be willing to transfer the repository and the package to one of our pub publishers first, I can do that tomorrow. |
Maybe it is better to move to pubspec2, since it seems quite well maintained. |
|
I've reached out to @bsutton and he said that he's working on a Using |
Is there an existing issue for this?
Version
4.1.0
Description
The
_updateDependencies
method in thebootstrap
command checks if twoDependencyReference
s are equal to decide if it should update the dependencies of the modules:https://github.com/invertase/melos/blob/ed826b39761039ba545d3ae7b18f491726d7ebe1/packages/melos/lib/src/commands/bootstrap.dart#L335C1-L362C1
However, the
GitReference
equals operator considers only theurl
andref
fields. As a consequence, if you change the path without changing theurl
or theref
inmelos.yaml
, the references are not going to be updated in the modules.I actually lost some hours of work trying to understand why my references were not being updated.
Running
melos clean
before the bootstrap does not solves the problem.Thus, Melos should consider the
path
field when theDependencyReference
is aGitReference
.Steps to reproduce
In any Melos project that has at least one git dependency on
melos.yaml
:melos bootstrap
path
to something elsemelos bootstrap
againExpected behavior
The modules references should be updated accordingly to the new path.
Screenshots
No response
Additional context and comments
Workaround: currently, you can workaround this by changing either the
url
or theref
to something different (it may not exist), runmelos bootstrap
, revert the changes and runmelos bootstrap
again.The text was updated successfully, but these errors were encountered: