Repository navigation
pfixtools: pcre -> pcre2 - #532824
pfixtools: pcre -> pcre2#532824jerith666 wants to merge 2 commits into
Conversation
|
I've finally gotten a chance to test the |
|
Let me also say explicitly that I'm aware this is stretching the boundaries of the AI contribution policy. If we need to drop this from nixpkgs rather than accept this PR, I understand! |
|
Hey, I'm curious as to why you think this is within the bounds of the AI policy? It looks to me like you have pasted claude's output verbatim.
I do not get the sense that if this ends up breaking, that you have the understanding to diagnose and traige what broke. The purpose of the AI policy (as i interpret it) is to ensure that contributions are done by humans. This way the humans gain the understanding necessary to work in nixpkgs. When something breaks, these humans can fix it, since they wrote what broke in the first place. I understand you only want to help with a quick fix! Unfortunately, if nobody owns and understands your code, we're not actually fixing anything. Just creating tech debt. |
|
This is indeed Claude's output verbatim. Maybe I was never a good candidate to maintain this package in the first place? It's not just these patches that are C code that I don't deeply grok, the whole pfixtools package is C code that I don't deeply grok! :) And as mentioned it appears abandoned upstream, so that means perhaps there's nobody left who groks it? :( Is it worth waiting a bit to see if someone else involved with the overall effort in #356387 might have a look and say "yep, that looks pretty much like what we did for packages X, Y, and Z"? Or is that not enough? I hope this doesn't come off as a waste of everyone's time, I'm certainly still learning best practices when using these LLM tools! |
|
I don't mean to discourage you from contributing or maintaining, only from pushing code you don't grok :). If this is something you use or find useful, it may be worth taking the time to familiarize yourself. If not, I think it's safe to drop it. Rest assured you've wasted nobody's time. Learning best practices is never a waste :) |
|
It is something I'm actively using (with these patches) on my mail server, and it's been working fine. I'll leave this open for a while to see if anyone else wants to endorse these patches; if not, I can close this PR and open one to drop the package instead. |
|
Diff seems small enough and ok to me and i would probably keep it as long as there is someone (you) that maintains the package somewhat 🤷 but im not sure what the nixpkg policy is here I assume you check that this test actually is run and still works https://github.com/Fruneau/pfixtools/blob/master/tests/regexp.c#L132 |
3768bf2 to
138eff5
Compare
No, I had no idea those tests existed! 🤦 I've pushed a new commit here that runs them. That new commit comes first, because I've confirmed the same set of tests pass before and after this pcre2 change. Here's the full glibc malloc error, mentioned in the commit message, from
|
|
I looked a bit into the spf test it seems that there is some lib collision between If you run it with libevent first it seem to do the trick: I ran out of time to look why still most of the tests fail and it would be some work to replace libev with libevent i think. What i would fix is this warning here: |
upstream Makefile is not set up to run these via 'make test', so we have to execute them manually. one of the tests triggers a malloc assertion error in glibc, so we skip it. also update substitutions to use --replace-fail per current best practice
these patches were constructed by Claude from the following prompts: > Can you scope out what would be involved in migrating https://github.com/Fruneau/pfixtools and https://github.com/Fruneau/libcommon to use pcre2? > tell me more about the code unit width definition. > okay, that makes sense. please prepare a patch against libcommon that carries out this migration. > please prepare a patch for the pfixtools repo as well. the key bit of explanation from the 2nd prompt was: > For this codebase, 8 is the only sensible choice. The strings being matched are email addresses and SMTP protocol data — plain ASCII/UTF-8 byte strings, exactly what PCRE1 was already treating them as. the changes look plausible to me, but I have not done any real C programming since college 25+ years ago. link to full chat session: https://claude.ai/share/9ec35d1c-e9fe-442a-ab33-3ecf4468c015 no attempt is being made to upstream these changes, as neither repo has seen any activity in 10 years. Assisted-by: Claude:claude-4.6-sonnet
138eff5 to
3710ad5
Compare
Done! :) |
jackrosenberg
left a comment
There was a problem hiding this comment.
Sorry, I do not feel that the following has been established.
Before submission, they must establish a reasonable level of understanding of the contribution and expectation of its correctness. (AI poilcy)
|
For me this clears the
@jerith666 manually inspected the changes, he tested the output and we even worked on running the upstream tests now as part of the package But no idea how this gets decided at the end and i personally as a non user of this package are also fine with just removing it from nixpkgs. |
|
Looking at upstream having last made a change a decade ago, why not migrate to postsrsd, if what you want is Sender Rewriting Scheme support? Then we could drop this dead package. |
Sorry for the delayed response, I was mostly offline for the last 3 weeks. SRS is indeed what I'm interested in, so I will look into switching my mail server to use |
as discussed in NixOS#532824, upstream has not made any changes in a decade, there is no nixpkgs maintainer with sufficient knowledge of C to update this package to use pcre2 (NixOS#356387), and postsrsd provides a ready alternative that is currently maintained.
|
|
as discussed in NixOS#532824, upstream has not made any changes in a decade, there is no nixpkgs maintainer with sufficient knowledge of C to update this package to use pcre2 (NixOS#356387), and postsrsd provides a ready alternative that is currently maintained.
#356387
these patches were constructed by Claude from the following prompts:
the key bit of explanation from the 2nd prompt was:
the changes look plausible to me, but I have not done any real C programming since college 25+ years ago. link to full chat session: https://claude.ai/share/9ec35d1c-e9fe-442a-ab33-3ecf4468c015
no attempt is being made to upstream these changes, as neither repo has seen any activity in 10 years.
Assisted-by: Claude:claude-4.6-sonnet
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.