What's up with the 710k patch to panels?

In commit 6a23801 Lightning introduced a 710k (!) patch that we apply to Panels. What's more, the patch file itself doesn't live in the Panels issue queue - it actually lives in the Lightning's. I'm sure you're wondering why :)

Background

This all started when we discovered that Composer does not allow us to pull specific commit hashes in dependencies of dependencies. So, first: why would we want to pull specific commit hashes instead of tags?

Why reference specific commits?

There are a few reasons; but in this case, we wanted to ensure users could edit blocks placed with the IPE via Quickedit. That functionality has been committed to panels. However, panels has not tagged another release since that commit.

Normally in this case, we would just apply the patch supplied in the issue to panels; but that patch does not apply cleanly. So, as a workaround, we decided to just reference and depend on that specific commit.

The problem

But remember that Composer does not allow dependencies of dependencies to reference specific commits. And:

  1. Lightning Project has a dependency on ->
  2. Lightning Distribution which has a dependency on ->
  3. Panels. Which is a dependency of a dependency

 

So we need to allow users to edit blocks placed with IPE via Quickedit. But:

  • We can't use the patch provided in the panels queue (doesn't apply cleanly)
  • We can't pull the specific commit (composer doesn't allow dependencies of dependencies to reference specific commits)

 

The 710k patch

What we ended up doing was generating a diff for all changes to Panels (20+ commits) between beta4 and commit 8eba1a0. That's where the 710k patch came from.

Whew.

Powered by Drupal Lightning