This is an automated email from the ASF dual-hosted git repository.

Jens-G pushed a commit to branch release/0.24.0
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/release/0.24.0 by this push:
     new 4f303a241 Strip node_modules from dist to fix make dist symlink 
recursion
4f303a241 is described below

commit 4f303a2413c9f6b0116a0714c55a7686579109e6
Author: Jens Geyer <[email protected]>
AuthorDate: Sun Jul 5 13:54:36 2026 +0200

    Strip node_modules from dist to fix make dist symlink recursion
    
    When lib/nodejs/test has been through "npm install", it contains a
    node_modules/thrift symlink pointing back at the repo root (so the tests
    can require('thrift')). "make dist" copies the whole test/ tree via
    EXTRA_DIST and tars it with --hard-dereference, which follows that
    self-referential link recursively until paths exceed tar's 256-char
    limit, aborting the build with "file name is too long". It only
    reproduces when node_modules is present, so a clean checkout never hits
    it and CI did not catch it.
    
    Prune node_modules from the distribution in the top-level dist-hook,
    alongside the existing .git/.deps/.DS_Store handling. Also add
    test/node_modules to the nodejs clean-local rule, which already removed
    the episodic node_modules but not this one.
    
    Client: nodejs
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
---
 Makefile.am            | 1 +
 lib/nodejs/Makefile.am | 1 +
 2 files changed, 2 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index 1bdb21473..b854ad8a6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -65,6 +65,7 @@ dist-hook:
        find $(distdir) -type f \( -iname ".DS_Store" -or -iname "._*" -or 
-iname ".gitignore" \) | xargs rm -f
        find $(distdir) -type d \( -iname ".deps" -or -iname ".libs" \) | xargs 
rm -rf
        find $(distdir) -type d \( -iname ".svn" -or -iname ".git" \) | xargs 
rm -rf
+       find $(distdir) -type d -name node_modules -prune -exec rm -rf {} +
 
 print-version:
        @echo $(PACKAGE_VERSION)
diff --git a/lib/nodejs/Makefile.am b/lib/nodejs/Makefile.am
index ac192451a..0ecee1982 100644
--- a/lib/nodejs/Makefile.am
+++ b/lib/nodejs/Makefile.am
@@ -39,6 +39,7 @@ check: deps
 clean-local:
        $(RM) -r test/gen-*
        $(RM) -r test/fuzz/gen-*
+       $(RM) -r test/node_modules
        $(RM) -r $(top_srcdir)/node_modules
        $(RM) -r test/episodic-code-generation-test/gen*
        $(RM) -r test/episodic-code-generation-test/node_modules

Reply via email to