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

fix: avoid "Argument list is too large" on building via nix. #2733

Closed

Conversation

0x450x6c
Copy link

The buildLeanPackage uses environment variable to store a list of libraries,
then passes that variable to the lean as CLI arguments.
According to this (https://stackoverflow.com/a/28865503), CLI arguments and environment variables share same space, therefore there is an error "Argument list is too large" when building a package with too many components.
(for example - mathlib4)

This change makes buildLeanPackage to use a file instead of environment variable to store a list of libraries.

  • Put an X in this bracket to confirm you have read the
    External Contribution Guidelines.

  • Please put the link to your RFC or bug issue here.
    PRs missing this link will be marked as missing RFC.

    Didn't created an issue, because patch is trivial.

@0x450x6c 0x450x6c force-pushed the fix-nix-build-when-too-many-deps branch from 5bacd9f to 0f04882 Compare October 22, 2023 18:57
The buildLeanPackage uses environment variable to store a list of libraries,
then passes that variable to the lean as CLI arguments.
According to this (https://stackoverflow.com/a/28865503),
CLI arguments and environment variables share same space,
therefore there is an error "Argument list is too large" when building a package with too many
components.
(for example - mathlib4)

This change makes buildLeanPackage to use a file instead of environment variable to store a list of
libraries.
@0x450x6c 0x450x6c force-pushed the fix-nix-build-when-too-many-deps branch from 0f04882 to b8fece8 Compare October 22, 2023 18:58
@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Oct 22, 2023
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Oct 22, 2023
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the builds-mathlib CI has verified that Mathlib builds against this PR label Oct 22, 2023
@leanprover-community-mathlib4-bot
Copy link
Collaborator

@Kha
Copy link
Member

Kha commented Nov 15, 2024

The Nix integration has been deprecated

@Kha Kha closed this Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builds-mathlib CI has verified that Mathlib builds against this PR toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants