Skip to content

Ignore extra bundler output when DEBUG is set#8895

Merged
tagliala merged 2 commits intomasterfrom
bugfix/8891-fix-bundle-show
Jan 6, 2026
Merged

Ignore extra bundler output when DEBUG is set#8895
tagliala merged 2 commits intomasterfrom
bugfix/8891-fix-bundle-show

Conversation

@tagliala
Copy link
Contributor

When the DEBUG environment variable is set (even if empty), bundler may output additional messages to stdout, such as "Found no changes, using resolution from the lockfile". This can interfere with asset compilation, as scripts expecting a single path may instead receive multiple output lines, causing path corruption.

This commit adjusts the logic to always use the last line of the output from bundle show activeadmin, preventing such issues even if extraneous lines are present due to DEBUG or other future messaging changes.

Ref: #8891

@codecov
Copy link

codecov bot commented Dec 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.08%. Comparing base (d5958d7) to head (79ef761).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8895   +/-   ##
=======================================
  Coverage   99.08%   99.08%           
=======================================
  Files         139      139           
  Lines        4046     4046           
=======================================
  Hits         4009     4009           
  Misses         37       37           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tagliala tagliala force-pushed the bugfix/8891-fix-bundle-show branch 2 times, most recently from 805516c to 7462aaa Compare December 28, 2025 17:18
Copy link
Contributor

@iangreenleaf iangreenleaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, this is working fine for me in testing.

@tagliala
Copy link
Contributor Author

Thanks for the test and have a nice new year.

I'm going to close the other PR, but of course I've kept you as the author of the commit.

I'll test on a windows machine (just the javascript line) and update if necessary

@tagliala tagliala requested a review from javierjulio December 30, 2025 21:11
@tagliala tagliala marked this pull request as ready for review December 30, 2025 21:11
@tagliala
Copy link
Contributor Author

I can confirm this works on Windows as well and fixes the issue if DEBUG is set

Before

PS .\demo.activeadmin.info> yarn build:css --production

PS .\demo.activeadmin.info> ls .\app\assets\builds\active_admin.css


    Directory: .\demo.activeadmin.info\app\assets\builds


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----        30/12/2025     22:10          24227 active_admin.css

After

PS .\demo.activeadmin.info> yarn build:css --production

PS .\demo.activeadmin.info> ls .\app\assets\builds\active_admin.css


    Directory: .\demo.activeadmin.info\app\assets\builds


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----        30/12/2025     22:12          80982 active_admin.css

@tagliala tagliala force-pushed the bugfix/8891-fix-bundle-show branch 2 times, most recently from ee2ffb4 to 56c458c Compare January 3, 2026 11:00
Copy link
Member

@javierjulio javierjulio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

iangreenleaf and others added 2 commits January 6, 2026 10:48
When the DEBUG environment variable is set (even if empty), bundler may output
additional messages to stdout, such as "Found no changes, using resolution from
the lockfile". This can interfere with asset compilation, as scripts expecting
a single path may instead receive multiple output lines, causing path
corruption.

This commit adjusts the logic to always use the last line of the output from
`bundle show activeadmin`, preventing such issues even if extraneous lines are
present due to DEBUG or other future messaging changes.

Ref: #8891
@tagliala tagliala force-pushed the bugfix/8891-fix-bundle-show branch from b6b09e3 to 79ef761 Compare January 6, 2026 09:48
@tagliala tagliala merged commit bd154cd into master Jan 6, 2026
31 checks passed
@tagliala tagliala deleted the bugfix/8891-fix-bundle-show branch January 6, 2026 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants