Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow custom chunk size for regex calls on Windows #5185

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

adriendelsalle
Copy link

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

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

allow customization using env var to cover corner cases with many nested folders
@adriendelsalle adriendelsalle requested a review from a team as a code owner February 15, 2024 16:06
@conda-bot
Copy link
Contributor

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 (conda/infrastructure#877), and ping the bot to refresh the PR.

@dbast
Copy link
Member

dbast commented Feb 19, 2024

@conda-bot check

@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Feb 19, 2024
@dbast
Copy link
Member

dbast commented Feb 19, 2024

pre-commit.ci autofix

@adriendelsalle
Copy link
Author

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

@jacobwilliams
Copy link

jacobwilliams commented May 16, 2024

  • 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 (FileNotFoundError: [WinError 206] The filename or extension is too long #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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed [bot] added once the contributor has signed the CLA
Projects
Status: 🆕 New
Development

Successfully merging this pull request may close these issues.

FileNotFoundError: [WinError 206] The filename or extension is too long
4 participants