-
Notifications
You must be signed in to change notification settings - Fork 163
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
Change of master branch alias to 1.4.x-dev breaks packages depending on 1.3.x-dev #313
Comments
Depending on dev version is not quite correct As soon as @stof will release 1.4.0, you'll be able to use 1.4.0 as temporary solution you can use |
Thank you @oleg-andreyev ! I realize that that's not ideal but that alias was published on Packagist and people started using it relying on the fact that, since it was published, it would not be removed. I'd consider keeping this as a permanent solution for the issue, also in future, when 1.5.0 will be released. |
An branch alias for master will change over time. And it will always be published (otherwise the alias is useless). The whole point of the alias is to be able to depend on Branching 1.3.x-dev from a commit which will never be part of a 1.3.x release (as this commit will be part of 1.4.0) will not happen. If we were branching 1.3.x today, it would have to be from the last published 1.3.x tag (to create a |
Projects created on top of https://github.com/drupal-composer/drupal-project at least explodes by this change. Maybe just add one more alias, where Edit: assuming that latest |
well, the thing is, we don't have something to hotfix as 1.3.2, and so we don't need such 1.3.x branch. |
Yeah the problem is that that version constraints is in old For what is worth this actually fixes it on the "host project", meaning the project that depends on ...
"webflo/drupal-core-require-dev": "~8.6",
"behat/mink-selenium2-driver": "1.4.x-dev as 1.3.x-dev"
} Edit: since people are linking at this comment in PRs I'm linking here the workaround we ended up using in our projects, which is slightly more refined that this one above. Check #313 (comment) |
well, if |
Webflo will still be on vacation until 11.09.2019 ... |
We don't depend on A 1.3.x would really help us in the short term as we look at rolling out an update to all those repos. |
Well, repos which use a composer.lock are not broken by this change until the time you run a |
We have a lot of projects broken by this because we depend on It'd be good if a 1.3.x-dev alias could be recreated and pushed out again as this is going to be a problem for a lot of people. |
I think we should play it a bit more safe by not using a (possibly moving) I've gone with one that wasn't updated recently, since that was probably(?) used for
Of course, this would be less work for a lot of people. (Not saying using a |
it would be good if |
I appreciate that I appreciate that you're busy though, and we do have a workaround so it's not a showstopper. |
tbh. I also do think, that the Mink maintainers are partially responsible for this mess. As you did not release a new version for three years, projects were more or less forced to use the -dev tag. |
@JeremySkinner @dbosen |
To summarize I see several solutions (in above comments) that involve changing P.S.
|
@oleg-andreyev I appreciate your point of view, but will respectfully disagree. Part of choosing to maintain and support an open source project involves understanding how the community are using that project and being empathetic even when the community perhaps starts using the project in a way that wasn’t intended. As someone who runs a reasonably popular oss project, there have been times where I’ve changed something that I believed was in the best interest of the project, that has caused pain for the community, and in those cases I always try to take time to consider the feedback and re-examine those choices if necessary. At the end of the day, our oss projects exist to help developers deliver value. In this particular case, a large portion of the Drupal community depend on |
@JeremySkinner , is this a viable solution:
? Theoretically (I don't do such tricks every day to be certain) that should restore missing |
Quite a lot of people here are "blaming" webflo but in reality this issue is in Drupal core: https://github.com/drupal/drupal/blob/8.8.x/composer.json#L14 and that is what webflo copies over from require-dev to require. So the expectation that webflo should have to fix this for Drupal is not correct. It should be fixed in Drupal core. Update: Drupal core issue: https://www.drupal.org/project/drupal/issues/3078671 |
this is useless. A
but then, are we expected to create the same mess again each time we release a minor version ? Updating the branch alias for master is a required step of releasing a minor version (as the master branch will then be the codebase for the next minor).
Then ask Drupal core to fix it. I don't know this webflo thing and so I don't know where they take their constraint from. |
Solutions for Drupal core are being discussed at https://www.drupal.org/project/drupal/issues/3078671 |
Please just create a 1.4.0 tag, so drupal can update it's composer file to fix this mess. |
@stof , here my suggestion in more details:
Since Packagist will read
Are you certain this won't work?
Nope. We should mention in README, that people shouldn't depend on aliases at all. If they will, then we promise no support. |
…th revised alias minkphp/MinkSelenium2Driver#313 Branch alias for master was changed from 1.3.x-dev to 1.4.x-dev. This PR adds an explicit declaration for behat/mink-selenium2-driver, mapping 1.4.x-dev to 1.3.x-dev as an alias. This is a temporary fix until Drupal Core corrects this issue (see above minkphp project issue for more details) On branch feature-23-mink-selenium2-explicit-dependency Changes to be committed: modified: build-project.sh
I'm not sure if it's safe to create branch named exactly as alias in
|
@aik099 no need for an alias. A I will look into releasing the 1.4.0 stable release in the next few days. @ryanaslett couldn't drupal update their constraint to |
@stof maybe we can adopt same approach as Symfony is using? Each minor version has it's own branch? This way we'll never have such issues again. |
@oleg-andreyev , that approach would be painful for contributors, because they'll need to remember into which branch the PR should go into. Also maintainers needs to merge back and forth the branches. There is a possibility to change PR base branch in GitHub UI directly, but that might as well result in a conflicts down the road. In Symfony Fabien has magical script, that allows him to move PR around different branches if contributor has submitted it into wrong branch. Git-wise it works correctly, but GitHub-wise it looks awful, because every moved PR looks |
plus, it only makes sense if you actually plan to maintain minor versions in parallel (which makes sense in the case of a big project like Symfony, but not in our case. Fabien does not do that either for Twig). |
I have tested creating Drupal cannot change the constraint from 1.3.x-dev to something else. The constraint is recorded forever in every stable tag from Drupal 8.6.0 to 8.7.7 (just came out today). Anyone who tries to install an old stable version with Composer will run into problems. It is not a problem to create a 1.3.x branch that will never have another 1.3 release on it. It is an ordinary and expected thing that, if you depend on a branch such as 1.3.x-dev that you may get commits that belong on 1.4.x, because 1.3.x-dev means the same thing as dev-master (or did, a short while ago), which means everything newer than the last stable release on the 1.3 line. I can understand your point about not wanting the 1.4.x commits on 1.3.x-dev if you were going to maintain the 1.3.x branch. However, we are not asking you to maintain the 1.3.x-dev branch; we just need it to repair the sins of the past. When 1.3.x-dev did exist, it had commits on it destined only for 1.4.x. We do not want that history rewritten. As soon as there is a stable 1.4 release, we will move Drupal to that (similarly with a new stable 1.7 release on behat/mink). We are not looking to solve the problem of how to abuse using the minor release dev branches in the future. Drupal is going to stop doing that. We only want to solve the problem of the past, where Drupal is using 1.3.x-dev constraints in old existing stable tags. Thank you for your understanding and help. |
@stof So,
Is what we're asking for, as those commits used to appear to us to be part of 1.3.x until the branch alias changed, which effectively backdated all of the commits from 1.3.1 onwards as being on the 1.4.x line. We definitely appreciate your help in getting this resolved. |
@greg-1-anderson , are you sure, that in #313 (comment) the commit should be 8684ee4 (some random commit IMO) and not 0a09c43 (commit just before alias was changed) |
@aik099: 8684ee4 is what we would prefer, because that is the commit that is in Drupal's composer.lock file. Other more recent commits would also work, but since this branch is being created to support broken Drupal builds, and not to serve as a maintained 1.3 branch, I think that the conservative choice is best. If you prefer to use 0a09c43, though, that would be acceptable. |
If anyone lands here because of this issue while upgrading Lightning 4 while using BLT please see acquia/blt#3840. |
Just wondering if comment 527995474 by @aik099 means there will be a 1.3 branch created here (using either 8684ee4 or 0a09c43)? @ryanaslett actually asked for the later commit. I'm indifferent, as long as we have the branch. |
@josephdpurcell this is what we ended up doing in our projects'
As also |
I've created |
Thanks! |
Thank you @aik099 ! |
Awesome. Thanks so much, @aik099 !!!!! |
That’s great, thank you for making the change 😊 |
Thanks @aik099 and other nice people at Mink's side. |
Thank you so much. This saves us. |
Drupal 8 requires PHP 5.5 or later, so Drupal is indifferent to the inclusion of that commit. 8684ee4 might have been better, but let's not go back now. There should not be much demand for the 1.3 branch outside of Drupal users (presuming that 1.4.0 is tagged soon). |
@greg-1-anderson sure, we won't got back! I hope that we all learned a lesson and will never have this issue again. |
I can't seem to get the i've already tried |
@pookmish I had similar problem. Try this
https://gist.github.com/snize/7d90fb26de07028d296881cb10a7917d |
Problem
While creating the 1.4.0 release of this project this line was changed:
This resulted in broken builds for all packages that depended on
behat/mink-selenium2-driver: 1.3.x-dev
such as Drupal core and many others. In turn this resulted in several CI/CD builds to fail with the following message:Also, we cannot simply fix our composer.json files by upgrading it to
1.4.x-dev
since builds that depends on current or previous versions of, say webflo/drupal-core-require-dev, have no way of fixing that dependency, other than forking this project, creating a1.3.x-dev
branch and update all their composer.json by adding a custom repository information.Proposed solution
The proposed solution is to create an actual
1.3.x-dev
branch on this project, branching off the correct commit hash, this branch will then be published on Packagist, allowing all projects to access it.The text was updated successfully, but these errors were encountered: