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

Allow custom chunk size for regex calls on Windows

Open adriendelsalle opened this issue 1 year ago • 5 comments

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?~~

adriendelsalle avatar Feb 15 '24 16:02 adriendelsalle

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 avatar Feb 15 '24 16:02 conda-bot

@conda-bot check

dbast avatar Feb 19 '24 13:02 dbast

pre-commit.ci autofix

dbast avatar Feb 19 '24 13:02 dbast

@dbast ping, is it possible to review this small PR?

adriendelsalle avatar Apr 25 '24 19:04 adriendelsalle

  • 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.

jacobwilliams avatar May 16 '24 18:05 jacobwilliams