rattler-build icon indicating copy to clipboard operation
rattler-build copied to clipboard

[Feature] Grouping of certain files in "Files in package" output

Open JaninaWibkerQC opened this issue 9 months ago • 3 comments

Certain packages contain a ton of files and thus the output of rattler build gets massive due to listing each and every file, which can result in exceeding $GITHUB_STEP_SUMMARY limits or just being annoying to work with

Image

It would be cool if there were some kind of way to group certain files and folders together in the output, ideally via a glob pattern (**/node_modules/** or something along those lines), because without it the output can get diluted with thousands of lines of output similar to these:

 │ │   - site-packages/*****/node_modules/.pnpm/@[email protected]/node_modules/@esbuild/darwin-arm64/README.md
 │ │   - site-packages/*****/node_modules/.pnpm/@[email protected]/node_modules/@esbuild/darwin-arm64/bin/esbuild
 │ │   - site-packages/*****/node_modules/.pnpm/@[email protected]/node_modules/@esbuild/darwin-arm64/package.json
 │ │   - site-packages/*****/node_modules/.pnpm/@[email protected]/node_modules/@esbuild/darwin-arm64/README.md
 │ │   - site-packages/*****/node_modules/.pnpm/@[email protected]/node_modules/@esbuild/darwin-arm64/bin/esbuild
 │ │   - site-packages/*****/node_modules/.pnpm/@[email protected]/node_modules/@esbuild/darwin-arm64/package.json
 │ │   - site-packages/*****/node_modules/.pnpm/@[email protected]/node_modules/@esbuild/darwin-arm64/README.md
 │ │   - site-packages/*****/node_modules/.pnpm/@[email protected]/node_modules/@esbuild/darwin-arm64/bin/esbuild
 │ │   - site-packages/*****/node_modules/.pnpm/@[email protected]/node_modules/@esbuild/darwin-arm64/package.json

I am not sure where such an option could be supplied, maybe via CLI flag

Alternatively maybe some automated way of grouping such folders together into a single entry could work out too

The output could then look like this instead:

│ │   - site-packages/*****/node_modules/* (10512 files)

Thanks!

JaninaWibkerQC avatar Mar 26 '25 13:03 JaninaWibkerQC

That's a tricky issue indeed. I think we could certainly think about shorting the GITHUB summary, but for the log itself I am unsure. There is a good amount of value in seeing all the files and it's very hard to decide (from rattler-build's POV) what files are important and what files are not.

Theoretically one could probably write some kind of bash script that filters all lines that contain node_modules and solve the issue that way (in a more customized fashion).

Maybe something like: rattler-build ... | grep -v "node_modules"

wolfv avatar Mar 26 '25 13:03 wolfv

Modifying the output to $GITHUB_STEP_SUMMARY would still be a part of rattler-build and not of the rattler-build action, right? At least this is what I could gather from this code: https://github.com/prefix-dev/rattler-build/blob/main/src/metadata.rs#L575

When using the github integration I don't think you can easily do the manual filtering using grep, thus something inside of rattler-build itself would still be necessary if I am not mistaken.

JaninaWibkerQC avatar Mar 27 '25 12:03 JaninaWibkerQC

@JaninaWibkerQC - yes, that would indeed be on the rattler-build side. You are correct :)

wolfv avatar Mar 27 '25 13:03 wolfv