#dev 2026-07-21

2026-07-21 UTC
moose3339, _raidev[d], _perfectaxiom[d], kdas_, _fluffy, joshproehl, Saige_Leah, TwinAdam, JadedBlueEyes1, ttybitnik, blacklight_0, grufwub, vidak, bterry1, WinnerWi-, CRISPR, Adi1, Adi2, decipaliz, hypha_, doesnm, Hello1 and doesnm_ joined the channel
hypha_, ax562, sage_rakurai, ttybitnik, [Jo], Hello1, [pcarrier], spri, [schmarty], blacklight1, Xe, [tantek]1, jjuran_, mossymaker4, chimo, jjuran, neatnik, [tantek], shoesNsocks, moose333, sknebel, omz13, cotsuka, [Trevor_Morris], enky, PyDev_, [manton] and btrem joined the channel
#
btrem
Git question. Can I apply a patch from a Drupal module's repo? Drupal's git repo interface is confusing, and I'm lost. (BTW, why can't Drupal use a normal git repo system instead of their own Frankenstein system?)
#
[artlung]
So you have a file that ends in `".patch"` and you need to apply it? https://www.drupal.org/docs/develop/git/using-git-to-contribute-to-drupal/working-with-patches/applying-a-patch-in-a-feature-branch seems to describe this in a drupal context. A patch is a "diff" file. It can apply to 1 or more files. It should be a roughly readable file - --- and +++ plus line numbers to see the differences (or maybe >>> and <<<?). But the Drupal site
#
[artlung]
also says "patches are now deprecated"
cotsuka and barnaby joined the channel
#
btrem
[artlung]++ thanks for the info. But after more research, I think I need to apply the patch via composer. And I think I have the right incantation. As for "patches are now deprecated," I wonder what that means? As I said before, I wish they'd just join the rest of the world and use branches and merge requests. But maybe I say that only because it's what I understand.
#
btrem
What, no karma today? Wakey wakey, Loqi.
#
btrem
Hello Loqi
#
btrem
Nothing. Ah well, the intention was there.
#
btrem
Loqi-- for being asleep at the wheel. :-p
#
Loqi
Loqi has 2 karma in this channel over the last year (12 in all channels)
#
btrem
Hah, that's the page I have loaded in my browser this very instant!
#
btrem
But nothing is working today. Composer won't update my Drupal install because of security advisories. That's a new one for me. I can't figure out how to get around it. Maybe I just need to wait for Drupal admins to sort things out?
#
btrem
Sorted. I had to `composer update drupal/webform` first, which deleted some (deprecated?) dependencies. Then `composer update` worked fine. @#!@# composer! :-D
#
gRegor
yeah those locked dependencies preventing updating other libs can be frustrating!
#
btrem
Still not working. :( "No available patcher was able to apply patch patches/webform-ajax_refresh_view_selection.patch to drupal/webform". No idea how to resolve this problem. Interwebs says install gpatch if you're on OSX, but I'm on Ubuntu.
#
btrem
https://www.drupal.org/files/issues/2022-09-12/webform-ajax_refresh_view_selection.patch is not right format, is it? ISTM that the first line is what one types in a terminal to produce a patch file, and the second is, well, I suppose I dunno, but it doesn't look like it belongs in a patch file.
#
[artlung]
no that's what a patch looks like. note that is refers to some hashes there which may have some impact. think of a patch as a kind of merge. Some merges are clean, with no conflicts, some merges introduce a conflict because the code is too different to apply cleanly.
#
[artlung]
but reading the patch, it appears to be all adding lines, so you can *sort of* read what the added lines are, and if the content matters to you you could paste those in (if you remove the + signs at the beginning of each line). but that's your call. If anything the patch may be showing you what the fixes are because to my eye it's pretty readable. Whether it will actually HELP you and your project is an entirely other thing. 😕
#
btrem
Yep, I just did a test `git diff` and the format is, as you said, correct. I can manually add the lines. In fact, I already tried that on my dev server, and the module worked as advertised. For production, I thought I'd apply the patch via composer, but I can't get that to work. I suppose I could just upload my modified copy. I feel like I'm in the danger zone. :-o
#
btrem
Does linux have an equivalent to the OSX gpatch?
#
btrem
The really strange thing is the behavior alternates, seemingly back and forth, between installing the module in question and ignoring the patch, and exiting with an error because it can't apply the patch. Very odd that the same command, executed in succession, produces completely different results.
ttybitnik and [snarfed] joined the channel
#
[snarfed]
the linux command is `patch`
#
[snarfed]
`g*` on macOS (not sure if they're built in or from homebrew?) are the gnu coreutils versions of the normal `*` programs
#
[snarfed]
apologies if you already knew that
#
btrem
I didn't. Thanks [snarfed]++
#
Loqi
[snarfed] has 37 karma in this channel over the last year (50 in all channels)
[snarfed] joined the channel
#
btrem
So that means that I don't need to install any additional software, which leaves me wondering why the composer patch is failing. I'm not sure that it's ready for prime time. The behavior is very strange. The package in question, drupal/webform, has lots of dependencies. If I `composer require`, it fails. Then I try `composer remove` and it *installs* the dependencies! I have to `remove` again to remove the dependencies.
#
btrem
My takeaway is that I don't think I want to run this stuff on the production server.
ax562 joined the channel
#
btrem
The alternate route is to work on the patch. The maintainer says it breaks existing tests, and there's no interest in the feature. I don't really understand how tests work. If Drupal used a github style repo system, I might be able to dip my toe in the water, see if I can fix things up to the maintainer's satisfaction. But Drupal has some hybrid git/bugzilla system that I just can't wrap my head around.
[Tabitha] joined the channel
#
btrem
Oh ffs. Back to "can't update because of security advisories." @#$@! composer.