Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package snowball for openSUSE:Factory 
checked in at 2026-12-04 15:23:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/snowball (Old)
 and      /work/SRC/openSUSE:Factory/.snowball.new.1340718 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "snowball"

Fri Dec  4 15:23:31 2026 rev:7 rq:1402413 version:3.2.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/snowball/snowball.changes        2026-11-25 
16:11:54.936711189 +0100
+++ /work/SRC/openSUSE:Factory/.snowball.new.1340718/snowball.changes   
2026-12-04 15:23:44.478451334 +0100
@@ -1,0 +2,56 @@
+Wed Dec  2 09:51:04 UTC 2026 - Dominique Leuenberger <[email protected]>
+
+- Update to version 3.2.1:
+  * Generic code generation changes:
+    + Code quality:
+      - We now warn if `try` is applied to command which always signals `t`,
+        since doing so suggests a misunderstanding on the part of the
+        programmer.  We also now replace such a `try` with a `(`...`)` block in
+        the parse tree, which avoids generating code with an unused temporary
+        variable.
+  * Ada:
+    + Bug fixes:
+      - The generated code for `among` could have unclosed blocks in some cases
+        (but not any exercised by stemming algorithms we ship).
+    + Code quality:
+      - Avoid setting Ada variable `A` when its value isn't used.
+  * C/C++:
+    + Bug fixes:
+      - Reset cursor after failed `among` gating function check when there is
+        an empty string case in the among.  This bug is specific to the new
+        among implementation for C/C++ which was merged in Snowball 3.2.0.
+        Patch from Saša Janiška.  Fixes #310.
+      - The generated code for `among` could reference an undeclared
+        `among_var` variable.
+    + Code quality:
+      - Avoid C/C++ compiler warnings about unused parameters in the code
+        generated for degenerate `externals` (e.g. `define stem as ()`).
+  * Go:
+    + Documentation:
+      - Update go/README.md.
+  * Python:
+    + Other changes:
+      - Add classifier for Python 3.15.
+      - Omit classifier for earlymodernenglish.
+      - CI now checks that all our trove classifiers are valid.  Patch from
+        Dmitry Shachnev.
+  * Rust:
+    + Bug fixes:
+      - The generated code for `among` could reference an undeclared
+        `among_var` variable.
+  * Zig:
+    + Bug fixes:
+      - Fix code generated for degenerate `externals` (e.g. `define stem as
+        ()`). These are valid Snowball, but resulted in errors from Zig due to
+        unused function parameters (which are an error in Zig).
+      - Avoid unused variable error in generated code.  Fixes #311, reported by
+        Saša Janiška.
+
+-------------------------------------------------------------------
+Wed Dec  2 03:52:59 UTC 2026 - Zoltan Balogh <[email protected]>
+
+- Enable the upstream test suite: ship the pinned snowball-data
+  test data as an additional source and run make check. The data is
+  test-only and is not installed.
+
+-------------------------------------------------------------------

Old:
----
  snowball-3.2.0.tar.gz

New:
----
  snowball-3.2.1.tar.gz
  snowball-data-019921c3a41c2b70063ee3feb215a00c8e594597.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ snowball.spec ++++++
--- /var/tmp/diff_new_pack.YXXYlX/_old  2026-12-04 15:23:45.710503041 +0100
+++ /var/tmp/diff_new_pack.YXXYlX/_new  2026-12-04 15:23:45.711503083 +0100
@@ -19,13 +19,15 @@
 %define library_name libstemmer1d
 
 Name:           snowball
-Version:        3.2.0
+Version:        3.2.1
 Release:        0
 Summary:        Snowball compiler and stemming algorithms
 License:        BSD-3-Clause
 URL:            https://snowballstem.org
 Source:         
https://github.com/snowballstem/snowball/archive/v%{version}.tar.gz#/snowball-%{version}.tar.gz
 Source1:        libstemmer.ver
+# Test data for the compiler and the stemming algorithms.
+Source2:        
https://github.com/snowballstem/snowball-data/archive/019921c3a41c2b70063ee3feb215a00c8e594597.tar.gz#/snowball-data-019921c3a41c2b70063ee3feb215a00c8e594597.tar.gz
 # PATCH-FIX-OPENSUSE build-options.diff Stefano Rivera <[email protected]> 
-- Honor build flags passed as command line arguments.
 Patch0:         build-options.diff
 # PATCH-FIX-OPENSUSE shared-library.diff Stefano Rivera <[email protected]> 
-- Build libstemmer as a shared library.
@@ -95,6 +97,8 @@
 %autosetup -p1
 mkdir -p debian
 cp %{S:1} debian/
+tar -xf %{SOURCE2}
+mv snowball-data-019921c3a41c2b70063ee3feb215a00c8e594597 ../snowball-data
 
 %build
 %make_build CFLAGS="%{optflags}"
@@ -105,6 +109,11 @@
 install -D -m 0644 include/libstemmer.h %{buildroot}%{_includedir}/libstemmer.h
 install -D -m 0755 stemwords            %{buildroot}%{_bindir}/stemwords
 
+%check
+# The check targets share a temporary file, so run them serially.
+export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
+%make_build -j1 check
+
 %post   -n %{library_name} -p /sbin/ldconfig
 %postun -n %{library_name} -p /sbin/ldconfig
 

++++++ _scmsync.obsinfo ++++++
--- /var/tmp/diff_new_pack.YXXYlX/_old  2026-12-04 15:23:45.740504300 +0100
+++ /var/tmp/diff_new_pack.YXXYlX/_new  2026-12-04 15:23:45.744504468 +0100
@@ -1,7 +1,7 @@
-mtime: 1795450266
-commit: ea4910cfcebfc9ee0d0e4e950672317260759b420e4c6b1a253bfb702ac08d0f
+mtime: 1796207053
+commit: 690cd538ac4d5b3c6fd2a4d6b9049bb6e49f59b211e81b789e9c847c06adb815
 url: https://src.opensuse.org/GNOME/snowball
-revision: ea4910cfcebfc9ee0d0e4e950672317260759b420e4c6b1a253bfb702ac08d0f
+revision: 690cd538ac4d5b3c6fd2a4d6b9049bb6e49f59b211e81b789e9c847c06adb815
 trackingbranch: factory
 projectscmsync: https://src.opensuse.org/GNOME/_ObsPrj
 

++++++ build.specials.obscpio ++++++

++++++ build.specials.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/.gitignore new/.gitignore
--- old/.gitignore      1970-01-01 01:00:00.000000000 +0100
+++ new/.gitignore      2026-12-02 11:24:13.000000000 +0100
@@ -0,0 +1,5 @@
+*.obscpio
+*.osc
+_build.*
+.pbuild
+osc-collab.*

++++++ snowball-3.2.0.tar.gz -> snowball-3.2.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snowball-3.2.0/.github/workflows/ci.yml 
new/snowball-3.2.1/.github/workflows/ci.yml
--- old/snowball-3.2.0/.github/workflows/ci.yml 2026-10-17 09:25:01.000000000 
+0200
+++ new/snowball-3.2.1/.github/workflows/ci.yml 2026-12-02 04:34:25.000000000 
+0100
@@ -65,8 +65,8 @@
           apt_packages: 'golang-1.13'
           GO: go
         - name: go_new
-          os: 'ubuntu-24.04'
-          apt_packages: 'golang-1.22'
+          os: 'ubuntu-26.04'
+          apt_packages: 'golang-1.26'
           GO: go
         - name: javascript_node
           JSRUN: node
@@ -85,13 +85,17 @@
         - name: Pascal
           FPC: fpc
           apt_packages: 'fpc'
+        - name: PHP 8.6
+          PHP: php
+          apt_extra_repo: https://packages.sury.org/php/
+          apt_packages: 'php8.6-cli php8.6-mbstring'
         - name: PHP 8.5
           PHP: php
-          apt_extra_repo: ppa:ondrej/php
+          os: 'ubuntu-26.04'
           apt_packages: 'php8.5-cli php8.5-mbstring'
         - name: PHP 8.4
           PHP: php
-          apt_extra_repo: ppa:ondrej/php
+          apt_extra_repo: https://packages.sury.org/php/
           apt_packages: 'php8.4-cli php8.4-mbstring'
         - name: PHP 8.3
           PHP: php
@@ -240,8 +244,10 @@
     - name: Enable extra Ubuntu package repo
       if: matrix.apt_extra_repo
       run: |
-        sudo apt-get -qq remove "php*-cli" "php*-dev"
-        sudo add-apt-repository -y ${{ matrix.apt_extra_repo }}
+        sudo apt-get -qq remove php-cli
+        curl -sSLo /tmp/debsuryorg-archive-keyring.deb 
https://packages.sury.org/debsuryorg-archive-keyring.deb
+        sudo dpkg -i /tmp/debsuryorg-archive-keyring.deb
+        sudo sh -c 'echo "deb 
[signed-by=/usr/share/keyrings/debsuryorg-archive-keyring.gpg] ${{ 
matrix.apt_extra_repo }} $(lsb_release -sc) main" > 
/etc/apt/sources.list.d/php.list'
         sudo apt-get update
     - name: Install Ubuntu packages
       if: matrix.apt_packages
@@ -352,6 +358,28 @@
         $MAKE clean ${{ case(inputs.runtime-tests == true, 
'clean_runtime_tests', '') }}
         git status --porcelain=v1 --ignored|grep -v '^?? \.s\?ccache/$'|grep 
'^' && { echo 'The generated files listed above were not removed by `make 
clean`' ; exit 1; }; true
 
+  pypi-check:
+    # Build the Python dist and check it is acceptable to PyPI so problems
+    # are found on every commit, not just when we try to deploy a release.
+    if: inputs.runtime-tests != true
+    runs-on: ubuntu-latest
+    steps:
+    - name: Checkout
+      uses: actions/checkout@v7
+      with:
+        show-progress: false
+    - name: Set up Python
+      uses: actions/setup-python@v7
+      with:
+        python-version: '3.15'
+    - name: Install modules
+      # Use latest trove-classifiers so we check against the current list.
+      run: pip install --upgrade build trove-classifiers
+    - name: Generate dist
+      run: make --output-sync --jobs=4 dist_libstemmer_python
+    - name: Check classifiers
+      run: python python/check_classifiers.py dist/snowballstemmer-*.tar.gz
+
   pypi-publish:
     if: >
       github.event_name == 'push' &&
@@ -359,6 +387,7 @@
       inputs.runtime-tests != true
     needs:
     - build
+    - pypi-check
     runs-on: ubuntu-latest
     environment:
       name: pypi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snowball-3.2.0/GNUmakefile 
new/snowball-3.2.1/GNUmakefile
--- old/snowball-3.2.0/GNUmakefile      2026-10-17 09:25:01.000000000 +0200
+++ new/snowball-3.2.1/GNUmakefile      2026-12-02 04:34:25.000000000 +0100
@@ -2,7 +2,7 @@
 
 # After changing this, run `make update_version` to update various sources
 # which hard-code it.
-SNOWBALL_VERSION = 3.2.0
+SNOWBALL_VERSION = 3.2.1
 
 ifeq ($(OS),Windows_NT)
 EXEEXT = .exe
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snowball-3.2.0/NEWS new/snowball-3.2.1/NEWS
--- old/snowball-3.2.0/NEWS     2026-10-17 09:25:01.000000000 +0200
+++ new/snowball-3.2.1/NEWS     2026-12-02 04:34:25.000000000 +0100
@@ -1,3 +1,85 @@
+Snowball 3.2.1 (2026-12-02)
+===========================
+
+Generic code generation changes
+-------------------------------
+
+* Code quality:
+
+  - We now warn if `try` is applied to command which always signals `t`, since
+    doing so suggests a misunderstanding on the part of the programmer.  We
+    also now replace such a `try` with a `(`...`)` block in the parse tree,
+    which avoids generating code with an unused temporary variable.
+
+Ada
+---
+
+* Bug fixes:
+
+  - The generated code for `among` could have unclosed blocks in some cases
+    (but not any exercised by stemming algorithms we ship).
+
+* Code quality:
+
+  - Avoid setting Ada variable `A` when its value isn't used.
+
+C/C++
+-----
+
+* Bug fixes:
+
+  - Reset cursor after failed `among` gating function check when there is
+    an empty string case in the among.  This bug is specific to the new among
+    implementation for C/C++ which was merged in Snowball 3.2.0.  Patch from
+    Saša Janiška.  Fixes #310.
+
+  - The generated code for `among` could reference an undeclared `among_var`
+    variable.
+
+* Code quality:
+
+  - Avoid C/C++ compiler warnings about unused parameters in the code generated
+    for degenerate `externals` (e.g. `define stem as ()`).
+
+Go
+--
+
+* Documentation:
+
+  - Update go/README.md.
+
+Python
+------
+
+* Other changes:
+
+  - Add classifier for Python 3.15.
+
+  - Omit classifier for earlymodernenglish.
+
+  - CI now checks that all our trove classifiers are valid.  Patch from Dmitry
+    Shachnev.
+
+Rust
+----
+
+* Bug fixes:
+
+  - The generated code for `among` could reference an undeclared `among_var`
+    variable.
+
+Zig
+---
+
+* Bug fixes:
+
+  - Fix code generated for degenerate `externals` (e.g. `define stem as ()`).
+    These are valid Snowball, but resulted in errors from Zig due to
+    unused function parameters (which are an error in Zig).
+
+  - Avoid unused variable error in generated code.  Fixes #311, reported by
+    Saša Janiška.
+
 Snowball 3.2.0 (2026-10-17)
 ===========================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snowball-3.2.0/README.rst 
new/snowball-3.2.1/README.rst
--- old/snowball-3.2.0/README.rst       2026-10-17 09:25:01.000000000 +0200
+++ new/snowball-3.2.1/README.rst       2026-12-02 04:34:25.000000000 +0100
@@ -54,8 +54,8 @@
 To actually build the libstemmer library you then unpack and build the
 distribution tarball, e.g. for C::
 
-    tar xf dist/libstemmer_c-3.2.0.tar.gz
-    cd libstemmer_c-3.2.0
+    tar xf dist/libstemmer_c-3.2.1.tar.gz
+    cd libstemmer_c-3.2.1
     make
 
 Cross-compiling
@@ -66,8 +66,8 @@
 example::
 
     make CC=cc dist_libstemmer_c
-    tar xf dist/libstemmer_c-3.2.0.tar.gz
-    cd libstemmer_c-3.2.0
+    tar xf dist/libstemmer_c-3.2.1.tar.gz
+    cd libstemmer_c-3.2.1
     make CC=riscv64-unknown-linux-gnu-gcc
 
 If you are cross-compiling to or from Microsoft Windows, you'll need to also
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snowball-3.2.0/compiler/analyser.c 
new/snowball-3.2.1/compiler/analyser.c
--- old/snowball-3.2.0/compiler/analyser.c      2026-10-17 09:25:01.000000000 
+0200
+++ new/snowball-3.2.1/compiler/analyser.c      2026-12-02 04:34:25.000000000 
+0100
@@ -2449,7 +2449,6 @@
         case c_tolimit:
         case c_tomark:
         case c_true:
-        case c_try:
         case c_unset:
         case c_assign:
         case c_plusassign:
@@ -2459,6 +2458,16 @@
         case c_functionend:
             /* Always gives signal t. */
             return 1;
+        case c_try: {
+            int possible_signals = p->left->possible_signals;
+            if (possible_signals == 1) {
+                fprintf(stderr, "%s:%d: warning: body of 'try' always signals 
't'\n",
+                        a->tokeniser->file, p->line_number);
+                p->type = c_bra;
+            }
+            /* Always gives signal t. */
+            return 1;
+        }
         case c_repeat: {
             int possible_signals = p->left->possible_signals;
             if (possible_signals == 1) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snowball-3.2.0/compiler/generator_ada.c 
new/snowball-3.2.1/compiler/generator_ada.c
--- old/snowball-3.2.0/compiler/generator_ada.c 2026-10-17 09:25:01.000000000 
+0200
+++ new/snowball-3.2.1/compiler/generator_ada.c 2026-12-02 04:34:25.000000000 
+0100
@@ -1378,8 +1378,12 @@
             /* If the among includes the empty string, it can never fail
              * so not matching the bitmap means we match the empty string.
              */
-            g->I[4] = among_cases[empty_case].result;
-            writef(g, "~MA := ~I4;~-~N~Melse~+~N", p);
+            if (x->amongvar_needed) {
+                g->I[4] = among_cases[empty_case].result;
+                writef(g, "~MA := ~I4;~-~N~Melse~+~N", p);
+            } else {
+                writef(g, "~Mnull;~-~N~Melse~+~N", p);
+            }
             block_opened = 1;
         } else {
             writef(g, "~f", p);
@@ -1414,6 +1418,7 @@
             }
             // Suppress generating table for this among.
             x->used = false;
+            if (block_opened) writef(g, "~-~Mend if;~N", p);
             return;
         }
     }
@@ -1427,6 +1432,7 @@
     } else {
         write_failure_if(g, "A = 0", p);
     }
+    if (block_opened) writef(g, "~-~Mend if;~N", p);
 }
 
 static void generate_among(struct generator * g, struct node * p) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snowball-3.2.0/compiler/generator_c.c 
new/snowball-3.2.1/compiler/generator_c.c
--- old/snowball-3.2.0/compiler/generator_c.c   2026-10-17 09:25:01.000000000 
+0200
+++ new/snowball-3.2.1/compiler/generator_c.c   2026-12-02 04:34:25.000000000 
+0100
@@ -1430,6 +1430,12 @@
         w(g, "~-~M}~N");
     }
 
+    if (!q->has_among) {
+        // This routine may not use z at all (e.g. it might only test a
+        // boolean) so suppress unused variable warnings.
+        w(g, "~M(void)z;~N");
+    }
+
     g->next_label = 0;
     g->var_number = 0;
 
@@ -1557,8 +1563,12 @@
             /* If the among includes the ungated empty string, it can never
              * fail so not matching the bitmap means we match the empty string.
              */
-            g->I[4] = among_cases[empty_case].result;
-            writef(g, "among_var = ~I4; else~N", p);
+            if (x->amongvar_needed) {
+                g->I[4] = among_cases[empty_case].result;
+                writef(g, "among_var = ~I4; else~N", p);
+            } else {
+                writef(g, "{ } else~N", p);
+            }
         } else {
             writef(g, "~f~N", p);
         }
@@ -1691,19 +1701,22 @@
                     write_c_string_literal(g, e->b);
                     w(g, "'\\n\", stderr);~N");
                 }
-                g->I[2] = cursor_adjustment;
-                g->I[3] = f_result;
-                g->S[0] = (among_mode(x) == m_forward) ? "+" : "-";
                 if (f_result) {
                     assert(cursor_adjustment >= 0);
+                    // Restore position of cursor.
                     if (cursor_adjustment > 0) {
+                        g->I[2] = cursor_adjustment;
+                        g->S[0] = (among_mode(x) == m_forward) ? "+" : "-";
                         w(g, "~Mz->c = c0 ~S0 ~I2;~N");
+                    } else {
+                        w(g, "~Mz->c = c0;~N");
                     }
                 } else {
                     // among_var == 0 means the among signals f and the cursor
                     // will get restored when that signal is handled.
                     assert(cursor_adjustment == -1);
                 }
+                g->I[3] = f_result;
                 w(g, "~Mamong_var = ~I3;~N");
                 if ((f_result & AFS_FLAG)) {
                     assert(among_function_chains);
@@ -2183,7 +2196,7 @@
                 x->af[exact].t_result = t_result;
                 x->af[exact].f_result = f_result;
                 x->af[exact].cursor_adjustment = cursor_adjustment;
-                x->c0_used = x->c0_used || (f_result && cursor_adjustment > 0);
+                x->c0_used = x->c0_used || (f_result && cursor_adjustment >= 
0);
             } else {
                 bool add = true;
                 for (int i = 0; i < x->af_count; ++i) {
@@ -2201,7 +2214,7 @@
                     x->af[x->af_count].t_result = t_result;
                     x->af[x->af_count].f_result = f_result;
                     x->af[x->af_count].cursor_adjustment = cursor_adjustment;
-                    x->c0_used = x->c0_used || (f_result && cursor_adjustment 
> 0);
+                    x->c0_used = x->c0_used || (f_result && cursor_adjustment 
>= 0);
                     exact = x->af_count++;
                 }
             }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snowball-3.2.0/compiler/generator_rust.c 
new/snowball-3.2.1/compiler/generator_rust.c
--- old/snowball-3.2.0/compiler/generator_rust.c        2026-10-17 
09:25:01.000000000 +0200
+++ new/snowball-3.2.1/compiler/generator_rust.c        2026-12-02 
04:34:25.000000000 +0100
@@ -1233,11 +1233,15 @@
         }
         write_string(g, ") ");
         if (empty_case != -1 && !among_cases[empty_case].function) {
-            /* If the among includes the empty string, it can never fail
-             * so not matching the bitmap means we match the empty string.
+            /* If the among includes the ungated empty string, it can never
+             * fail so not matching the bitmap means we match the empty string.
              */
-            g->I[4] = among_cases[empty_case].result;
-            writef(g, "{among_var = ~I4;}~N~Melse ", p);
+            if (x->amongvar_needed) {
+                g->I[4] = among_cases[empty_case].result;
+                writef(g, "{among_var = ~I4;}~N~Melse ", p);
+            } else {
+                writef(g, "{ }~N~Melse ", p);
+            }
             write_block_start(g);
             block_opened = 1;
         } else {
@@ -1270,6 +1274,7 @@
             }
             // Suppress generating table for this among.
             x->used = false;
+            if (block_opened) write_block_end(g);
             return;
         }
     }
@@ -1283,6 +1288,7 @@
     } else {
         write_failure_if(g, "env.find_among~S0(A_~I0, context) == 0", p);
     }
+    if (block_opened) write_block_end(g);
 }
 
 static void generate_among(struct generator * g, struct node * p) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snowball-3.2.0/compiler/generator_zig.c 
new/snowball-3.2.1/compiler/generator_zig.c
--- old/snowball-3.2.0/compiler/generator_zig.c 2026-10-17 09:25:01.000000000 
+0200
+++ new/snowball-3.2.1/compiler/generator_zig.c 2026-12-02 04:34:25.000000000 
+0100
@@ -1094,20 +1094,43 @@
     }
 }
 
-static void generate_cast_context(struct generator * g) {
+static void generate_cast_context(struct generator * g, struct name * q) {
     w(g, "~Mconst context: *Context = @ptrCast(@alignCast(ctx));~N");
     w(g, "~Msuppress_any_unused_warning(@as(*anyopaque, 
@ptrCast(context)));~N");
+    if (!q->has_among) {
+        // This routine may not use env at all (e.g. it might only test a
+        // boolean).
+        w(g, "~Msuppress_any_unused_warning(@as(*anyopaque, 
@ptrCast(env)));~N");
+    }
 }
 
-static void generate_setup_context(struct generator * g) {
+static void generate_setup_context(struct generator * g,
+                                   struct name * q,
+                                   bool forward_to_routine) {
     w(g, "~Mvar context_val = Context{};~N");
     w(g, "~Mconst context = &context_val;~N");
-    w(g, "~Msuppress_any_unused_warning(@as(*anyopaque, 
@ptrCast(context)));~N");
-    for (struct name * q = g->analyser->names; q; q = q->next) {
-        if (q->local_to != NULL || q->type != t_string) continue;
+    if (!forward_to_routine) {
+        w(g, "~Msuppress_any_unused_warning(@as(*anyopaque, 
@ptrCast(context)));~N");
+    }
+    bool env_definitely_used = forward_to_routine;
+    for (struct name * n = g->analyser->names; n; n = n->next) {
+        if (n->local_to != NULL || n->type != t_string) continue;
         w(g, "~Mdefer context.");
-        write_varname(g, q);
+        write_varname(g, n);
         w(g, ".deinit(env.allocator);~N");
+        env_definitely_used = true;
+    }
+
+    env_definitely_used = env_definitely_used || q->has_among;
+
+    if (!env_definitely_used) {
+        // This allows us to generate valid Zig code for an external which is
+        // just `false` or `true` which won't use env at all.  These cases are
+        // valid Snowball code, though unlikely in real world use.
+        //
+        // We will also needlessly generate this for numerous other situations,
+        // but that's not really a problem.
+        w(g, "~Msuppress_any_unused_warning(@as(*anyopaque, 
@ptrCast(env)));~N");
     }
 }
 
@@ -1119,18 +1142,19 @@
 
     if (q->type == t_routine) {
         writef(g, "~Mfn ~W(env: *snowball.Env, ctx: *anyopaque) bool {~+~N", 
p);
-        generate_cast_context(g);
+        generate_cast_context(g, q);
     } else {
+        bool forward_to_routine = (q->used != q->definition);
         writef(g, "~Mpub fn ~E(env: *snowball.Env) bool {~+~N", p);
-        generate_setup_context(g);
-        if (q->used != q->definition) {
+        generate_setup_context(g, q, forward_to_routine);
+        if (forward_to_routine) {
             // This external needs to be callable as a routine, so generate
             // the actual code like a routine with an external which just
             // forwards to that.
             writef(g, "~Mreturn ~W(env, @as(*anyopaque, 
@ptrCast(context)));~N", p);
             w(g, "~-~M}~N~N");
             writef(g, "~Mfn ~W(env: *snowball.Env, ctx: *anyopaque) bool 
{~+~N", p);
-            generate_cast_context(g);
+            generate_cast_context(g, q);
         }
     }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snowball-3.2.0/compiler/header.h 
new/snowball-3.2.1/compiler/header.h
--- old/snowball-3.2.0/compiler/header.h        2026-10-17 09:25:01.000000000 
+0200
+++ new/snowball-3.2.1/compiler/header.h        2026-12-02 04:34:25.000000000 
+0100
@@ -7,7 +7,7 @@
 # include <stdbool.h>
 #endif
 
-#define SNOWBALL_VERSION "3.2.0"
+#define SNOWBALL_VERSION "3.2.1"
 
 typedef unsigned char byte;
 typedef unsigned short symbol;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snowball-3.2.0/csharp/Snowball/AssemblyInfo.cs 
new/snowball-3.2.1/csharp/Snowball/AssemblyInfo.cs
--- old/snowball-3.2.0/csharp/Snowball/AssemblyInfo.cs  2026-10-17 
09:25:01.000000000 +0200
+++ new/snowball-3.2.1/csharp/Snowball/AssemblyInfo.cs  2026-12-02 
04:34:25.000000000 +0100
@@ -32,5 +32,5 @@
 // You can specify all the values or you can default the Build and Revision 
Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion(/*SNOWBALL_VERSION*/"3.2.0.0")]
-[assembly: AssemblyFileVersion(/*SNOWBALL_VERSION*/"3.2.0.0")]
+[assembly: AssemblyVersion(/*SNOWBALL_VERSION*/"3.2.1.0")]
+[assembly: AssemblyFileVersion(/*SNOWBALL_VERSION*/"3.2.1.0")]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snowball-3.2.0/dart/pubspec.yaml 
new/snowball-3.2.1/dart/pubspec.yaml
--- old/snowball-3.2.0/dart/pubspec.yaml        2026-10-17 09:25:01.000000000 
+0200
+++ new/snowball-3.2.1/dart/pubspec.yaml        2026-12-02 04:34:25.000000000 
+0100
@@ -1,6 +1,6 @@
 name: snowball
 description: This package provides stemmers generated from Snowball algorithms.
-version: 3.2.0 # SNOWBALL_VERSION
+version: 3.2.1 # SNOWBALL_VERSION
 repository: https://github.com/snowballstem/snowball
 issue_tracker: https://github.com/snowballstem/snowball/issues
 topics:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snowball-3.2.0/go/README.md 
new/snowball-3.2.1/go/README.md
--- old/snowball-3.2.0/go/README.md     2026-10-17 09:25:01.000000000 +0200
+++ new/snowball-3.2.1/go/README.md     2026-12-02 04:34:25.000000000 +0100
@@ -1,38 +1,46 @@
 # Go Target for Snowball
 
-The initial implementation was built as a port of the Rust target.  The 
initial focus has been on getting it to function, and making it work correctly. 
 No attempt has been made to beautify the implementation, generated code, or 
address performance issues.
+The initial implementation was built as a port of the Rust target language
+support.
 
-## Usage
+## Building
+
+To generate the Go stemmers and compile them use:
 
-To generate Go source for a Snowball algorithm:
 ```
-$ snowball path/to/algorithm.sbl -go -o algorithm
+$ make go
 ```
 
-### Go specific options
-
-`-Package`/`-P`: the package name used in the generated go file (defaults to 
`snowball`)
-
-`-goruntime`/`-gor`: the import path used for the Go Snowball runtime 
(defaults to `github.com/snowballstem/snowball/go`)
-
-Snowball 3.0.1 and earlier supported `-go`/`-gopackage`, but this was just an
-alias for `-Package`/`-P` since Snowball 2.0.0.
+## Testing
 
-## Code Organization
+You can test the stemmers on sample vocabularies with:
 
-`compiler/generator_go.c` has the Go code generation logic
+```
+$ make check_go
+```
 
-`go/` contains the default Go Snowball runtime support
+This does not exercise all features of the language.  You can run explicit
+tests of language features using:
 
-`go/stemwords` contains the source for a Go version of the stemwords utility
+```
+$ make setup_runtime_tests
+$ make check_go
+$ make clean_runtime_tests
+```
 
-`go/algorithms` location where the makefile generated code will end up
+The generate Go stemmers were fuzz tested during the initial developement work.
+Each ran for 5 minutes and used an initial corpus seeded with 10k words from
+the algorithm's snowballstem-data voc.txt file.
 
 ## Using the Generated Stemmers
 
-Assuming you generated a stemmer, put that code in a package which is imported 
by this code as `english`.
+For example, to use the English stemmer:
 
 ```
+import (
+        english "github.com/snowballstem/snowball/go/algorithms/english"
+}
+
 env := snowball.NewEnv("")
 env.SetCurrent("beautiful")
 english.Stem(env)
@@ -45,19 +53,31 @@
 words is not recommended as the overhead is measurable (stemwords for the 
arabic
 stemmer on the sample vocabulary is about 12% faster if you reuse `env`).
 
-## Testing
-
-Only the existing Snowball algorithms have been used for testing.  This does 
not exercise all features of the language.
+## Tips for working on Snowball's Go support
 
-Run:
+If you're wanting to do development work on Snowball's Go support, you may want
+to run the Snowball compiler by hand.  To do this you would use a command line
+like:
 
 ```
-$ make check_go
+$ snowball path/to/algorithm.sbl -go -o algorithm
 ```
 
-An initial pass of fuzz-testing has been performed on the generated stemmers 
for the algorithms in this repo.  Each ran for 5 minutes and used an initial 
corpus seeded with 10k words from the algorithm's snowballstem-data voc.txt 
file.
+### Go specific options
 
-## Known Limitations
+`-Package`/`-P`: the package name used in the generated go file (defaults to 
`snowball`)
+
+`-goruntime`/`-gor`: the import path used for the Go Snowball runtime 
(defaults to `github.com/snowballstem/snowball/go`)
 
-- Code going through generate_dollar production has not been tested
-- Code going through generate_debug production has not been tested
+Snowball 3.0.1 and earlier supported `-go`/`-gopackage`, but this was just an
+alias for `-Package`/`-P` since Snowball 2.0.0.
+
+## Code Organization
+
+`compiler/generator_go.c` has the Go code generation logic
+
+`go/` contains the default Go Snowball runtime support
+
+`go/stemwords` contains the source for a Go version of the stemwords utility
+
+`go/algorithms` location where the makefile generated code will end up
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snowball-3.2.0/python/check_classifiers.py 
new/snowball-3.2.1/python/check_classifiers.py
--- old/snowball-3.2.0/python/check_classifiers.py      1970-01-01 
01:00:00.000000000 +0100
+++ new/snowball-3.2.1/python/check_classifiers.py      2026-12-02 
04:34:25.000000000 +0100
@@ -0,0 +1,44 @@
+#!/usr/bin/env python3
+"""Check that all classifiers in a built Python sdist are valid.
+
+PyPI rejects uploads using classifiers which aren't listed in
+https://pypi.org/classifiers/ - checking this in CI means we find out
+before we try to deploy a release.
+
+Usage: check_classifiers.py SDIST
+"""
+
+import sys
+import tarfile
+from email.parser import HeaderParser
+from pathlib import Path
+
+from trove_classifiers import classifiers as valid_classifiers
+
+
+def main(args):
+    if len(args) != 1:
+        sys.exit(__doc__.strip())
+    sdist = Path(args[0])
+    # The sdist contains a single top-level directory with the same name.
+    pkg_info = f"{sdist.name.removesuffix('.tar.gz')}/PKG-INFO"
+    with tarfile.open(sdist) as tf:
+        metadata = HeaderParser().parsestr(
+            tf.extractfile(pkg_info).read().decode("utf-8")
+        )
+    if not (classifiers := metadata.get_all("Classifier")):
+        sys.exit(f"{sdist}: No classifiers found")
+    # Deprecated classifiers are not in valid_classifiers.
+    if invalid := [c for c in classifiers if c not in valid_classifiers]:
+        sys.exit(
+            f"{sdist}: Invalid classifiers:\n"
+            + "".join(f"  {c}\n" for c in invalid)
+            + "Only classifiers listed in https://pypi.org/classifiers/ "
+            "are allowed.  Remove them in python/setup.py or submit "
+            "them to https://github.com/pypa/trove-classifiers";
+        )
+    print(f"{sdist}: {len(classifiers)} classifiers OK")
+
+
+if __name__ == "__main__":
+    main(sys.argv[1:])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snowball-3.2.0/python/setup.py 
new/snowball-3.2.1/python/setup.py
--- old/snowball-3.2.0/python/setup.py  2026-10-17 09:25:01.000000000 +0200
+++ new/snowball-3.2.1/python/setup.py  2026-12-02 04:34:25.000000000 +0100
@@ -3,7 +3,7 @@
 from setuptools import setup
 import re
 
-SNOWBALL_VERSION = '3.2.0'
+SNOWBALL_VERSION = '3.2.1'
 
 n_stemmers = 0
 
@@ -39,11 +39,16 @@
 ]
 
 for lang in langs:
-    lang_titlecase = lang.title()
     # Only classifiers listed in https://pypi.org/classifiers/ are allowed
     # Remove them here or submit them to 
https://github.com/pypa/trove-classifiers
-    if lang_titlecase != 'Sesotho':
-        classifiers.append('Natural Language :: ' + lang_titlecase)
+    if lang in (
+            'earlymodernenglish',
+            'sesotho',
+            ):
+        continue
+
+    lang_titlecase = lang.title()
+    classifiers.append('Natural Language :: ' + lang_titlecase)
 
     # Portuguese stemmer also works for Brazilian Portuguese.
     if lang_titlecase == 'Portuguese':
@@ -52,19 +57,14 @@
 classifiers.extend([
     'Operating System :: OS Independent',
     'Programming Language :: Python',
-    'Programming Language :: Python :: 3',
-    'Programming Language :: Python :: 3.3',
-    'Programming Language :: Python :: 3.4',
-    'Programming Language :: Python :: 3.5',
-    'Programming Language :: Python :: 3.6',
-    'Programming Language :: Python :: 3.7',
-    'Programming Language :: Python :: 3.8',
-    'Programming Language :: Python :: 3.9',
-    'Programming Language :: Python :: 3.10',
-    'Programming Language :: Python :: 3.11',
-    'Programming Language :: Python :: 3.12',
-    'Programming Language :: Python :: 3.13',
-    'Programming Language :: Python :: 3.14',
+    'Programming Language :: Python :: 3'
+])
+
+# NB adds minor versions < range end.
+for minor in range(3, 15 + 1):
+    classifiers.append('Programming Language :: Python :: 3.%d' % minor)
+
+classifiers.extend([
     'Programming Language :: Python :: Implementation :: CPython',
     'Programming Language :: Python :: Implementation :: PyPy',
     'Topic :: Database',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snowball-3.2.0/tests/runtime/among.sbl 
new/snowball-3.2.1/tests/runtime/among.sbl
--- old/snowball-3.2.0/tests/runtime/among.sbl  2026-10-17 09:25:01.000000000 
+0200
+++ new/snowball-3.2.1/tests/runtime/among.sbl  2026-12-02 04:34:25.000000000 
+0100
@@ -2,19 +2,46 @@
 
 externals (stem)
 
-routines (gate bgate bgate2 not_atlimit)
+integers (n)
+
+routines (
+  amongvar_regression_test
+  c0_regression_test
+  gate bgate bgate2 cmpgate bcmpgate not_atlimit
+)
 
 stringescapes {}
 
 define gate as 'q'
+define cmpgate as $(n > 3)
 
 backwardmode (
   define bgate as 'q'
   define bgate2 as test hop 4
+  define bcmpgate as $(n > 3)
   define not_atlimit as not atlimit
+
+  define c0_regression_test as (
+    [substring] among (
+      'uci' bgate
+      ''
+    ) delete
+  )
+)
+
+define amongvar_regression_test as (
+  // Regression test - the generated C code for this referenced undeclared
+  // `among_var`.
+  try (
+    [substring] among (
+      'qq'
+      ''
+    ) delete
+  )
 )
 
 define stem as (
+  $n = len
   not (
     among (
       'x' ()
@@ -109,5 +136,35 @@
   ) or fail='big-endian among regression test failed to match'
   test ('youthful' atlimit) or fail='big-endian among regression test output 
wrong'
 
+  // Test among gating functions which don't look at the current string.
+  // Regression test for Zig unused variable error in generated code (#311).
+  try (
+    [substring] among (
+      'qq' cmpgate
+      ''
+    ) delete
+  )
+  try backwards (
+    [substring] among (
+      'zz' bcmpgate
+      ''
+    ) delete
+  )
+
+  // Call twice to prevent inlining.
+  amongvar_regression_test and amongvar_regression_test
+
+  // Regression tests for #310.
+  test (
+    ='juci'
+    backwards c0_regression_test
+    'juci' atlimit
+  )
+  test (
+    ='x'
+    backwards c0_regression_test
+    'x' atlimit
+  )
+
   ='ok'
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snowball-3.2.0/tests/runtime/externals.sbl 
new/snowball-3.2.1/tests/runtime/externals.sbl
--- old/snowball-3.2.0/tests/runtime/externals.sbl      2026-10-17 
09:25:01.000000000 +0200
+++ new/snowball-3.2.1/tests/runtime/externals.sbl      2026-12-02 
04:34:25.000000000 +0100
@@ -1,6 +1,6 @@
 // Test calling externals within the program.
 
-externals (stem e1 e2)
+externals (stem e1 e2 ef et)
 
 define stem as (
   not e2 or fail='failed to call external e2'
@@ -20,3 +20,7 @@
 )
 
 define e2 as atlimit
+
+define ef as false
+
+define et as ()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snowball-3.2.0/tests/syntax/loops.stderr 
new/snowball-3.2.1/tests/syntax/loops.stderr
--- old/snowball-3.2.0/tests/syntax/loops.stderr        2026-10-17 
09:25:01.000000000 +0200
+++ new/snowball-3.2.1/tests/syntax/loops.stderr        2026-12-02 
04:34:25.000000000 +0100
@@ -2,8 +2,12 @@
 syntax/loops.sbl:5: warning: atleast -1 C is just repeat C
 syntax/loops.sbl:6: warning: loop 1 C is just C
 syntax/loops.sbl:8: warning: infinite loop: body of 'atleast' always signals 
't'
+syntax/loops.sbl:8: warning: body of 'try' always signals 't'
 syntax/loops.sbl:9: warning: infinite loop: body of 'atleast' always signals 
't'
+syntax/loops.sbl:9: warning: body of 'try' always signals 't'
 syntax/loops.sbl:10: warning: body of 'atleast' always signals 'f'
 syntax/loops.sbl:11: warning: infinite loop: body of 'repeat' always signals 
't'
+syntax/loops.sbl:11: warning: body of 'try' always signals 't'
 syntax/loops.sbl:12: warning: infinite loop: body of 'repeat' always signals 
't'
+syntax/loops.sbl:12: warning: body of 'try' always signals 't'
 syntax/loops.sbl:13: warning: body of 'repeat' always signals 'f'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snowball-3.2.0/tests/syntax/loops.syntax 
new/snowball-3.2.1/tests/syntax/loops.syntax
--- old/snowball-3.2.0/tests/syntax/loops.syntax        2026-10-17 
09:25:01.000000000 +0200
+++ new/snowball-3.2.1/tests/syntax/loops.syntax        2026-12-02 
04:34:25.000000000 +0100
@@ -7,21 +7,21 @@
     literal 'i'
     repeat
       literal 'y'
-    try
+    (
       atleast
       # len
         (
-    try
+    (
       atleast
       # len
         true
     try
       (
         false
-    try
+    (
       repeat
         (
-    try
+    (
       repeat
         true
     do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snowball-3.2.0/tests/syntax/noops.sbl 
new/snowball-3.2.1/tests/syntax/noops.sbl
--- old/snowball-3.2.0/tests/syntax/noops.sbl   2026-10-17 09:25:01.000000000 
+0200
+++ new/snowball-3.2.1/tests/syntax/noops.sbl   2026-12-02 04:34:25.000000000 
+0100
@@ -51,6 +51,14 @@
   // `setlimit tomark limit for X` is equivalent to just `X`.
   setlimit tomark limit for 'X'
 
+  // `try X` when X always signals `t` is equivalent to just `X`.
+  try (
+   [substring] among (
+      'qq'
+      ''
+    ) delete
+  )
+
   [substring] among ( // All actions equivalent to `false`.
     '0' (false)
     'a' (fail ())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snowball-3.2.0/tests/syntax/noops.stderr 
new/snowball-3.2.1/tests/syntax/noops.stderr
--- old/snowball-3.2.0/tests/syntax/noops.stderr        2026-10-17 
09:25:01.000000000 +0200
+++ new/snowball-3.2.1/tests/syntax/noops.stderr        2026-12-02 
04:34:25.000000000 +0100
@@ -17,10 +17,11 @@
 syntax/noops.sbl:28: warning: `insert ''` is a no-op
 syntax/noops.sbl:29: warning: `attach ''` is a no-op
 syntax/noops.sbl:52: warning: `setlimit tomark limit` is a no-op
-syntax/noops.sbl:58: warning: empty literal string is a no-op
-syntax/noops.sbl:59: warning: `loop 0 C` is a no-op
-syntax/noops.sbl:60: warning: `loop -1 C` is a no-op
-syntax/noops.sbl:61: warning: `hop 0` is a no-op
+syntax/noops.sbl:66: warning: empty literal string is a no-op
+syntax/noops.sbl:67: warning: `loop 0 C` is a no-op
+syntax/noops.sbl:68: warning: `loop -1 C` is a no-op
+syntax/noops.sbl:69: warning: `hop 0` is a no-op
+syntax/noops.sbl:55: warning: body of 'try' always signals 't'
 syntax/noops.sbl:5: warning: string 's' is set but never used
 syntax/noops.sbl:4: warning: boolean 'b' is set but never used
 syntax/noops.sbl:3: warning: integer 'y' is set but never used
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snowball-3.2.0/tests/syntax/noops.syntax 
new/snowball-3.2.1/tests/syntax/noops.syntax
--- old/snowball-3.2.0/tests/syntax/noops.syntax        2026-10-17 
09:25:01.000000000 +0200
+++ new/snowball-3.2.1/tests/syntax/noops.syntax        2026-12-02 
04:34:25.000000000 +0100
@@ -78,6 +78,15 @@
       literal 'F'
       (
     literal 'X'
+    (
+      (
+        [
+        substring
+        ]
+        among
+          literal 'qq'
+          literal ''
+        <- ''
     [
     substring
     ]

Reply via email to