conda-build
conda-build copied to clipboard
Allow custom chunk size for regex calls on Windows
allow customization using env var to cover corner cases with many nested folders
Description
Fix build error on Windows, when paths are too long, or package contains too many files, by allowing users to set the chunk size for regex operation on Windows using environment variable CONDA_BLD_REGEX_CHUNK_SIZE
.
I don't know what's the best way to pass this configuration value. Maybe we could also add a try/catch around the regex call to give a hint if it fails.
Fixes #5122
Checklist - did you ...
- [x] Add a file to the
news
directory (using the template) for the next release's release notes? - [ ] ~~Add / update necessary tests?~~
- [ ] ~~Add / update outdated documentation?~~
We require contributors to sign our Contributor License Agreement and we don't have one on file for @adriendelsalle.
In order for us to review and merge your code, please e-sign the Contributor License Agreement PDF. We then need to manually verify your signature, merge the PR (https://github.com/conda/infrastructure/pull/877), and ping the bot to refresh the PR.
@conda-bot check
pre-commit.ci autofix
@dbast ping, is it possible to review this small PR?
- Would there be any harm for allowing it on all platforms?
- I don't think
CONDA_BLD_REGEX_CHUNK_SIZE
is a good name for this variable. It's really about the max command line length for the os. - I made some more comments in the ticket (#5122). Really I think the code is fundamentally broken and should be fixed (I might try to work of PR for my suggestions). But I do think a fallback option to the env var like you have a still a good idea.