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

Prevent some rebuilds for future Nix reformats #326430

Merged
merged 6 commits into from
Aug 26, 2024

Commits on Aug 25, 2024

  1. nix-info: Format files with nixfmt

    This is a rare case of a Nix file actually ending up in the build result.
    We reformat this now, causing a rebuild, so that we won't cause a rebuild
    in the treewide reformatting PR.
    infinisil committed Aug 25, 2024
    Configuration menu
    Copy the full SHA
    65e7143 View commit details
    Browse the repository at this point in the history
  2. vimPluginsUpdater: Format files with nixfmt

    This is a rare case of a Nix file actually ending up in the build result.
    We reformat this now, causing a rebuild, so that we won't cause a rebuild
    in the treewide reformatting PR.
    infinisil committed Aug 25, 2024
    Configuration menu
    Copy the full SHA
    323012c View commit details
    Browse the repository at this point in the history
  3. tests.trivial-builders: Prevent rebuilds when Nix files change

    There's no need to use a Nix file in the path here. By using a different
    file we won't cause rebuilds when we change the Nix file, in particular
    also when the Nix file is reformatted.
    infinisil committed Aug 25, 2024
    Configuration menu
    Copy the full SHA
    ea17c50 View commit details
    Browse the repository at this point in the history
  4. tests.makeBinaryWrapper: Prevent rebuilds when Nix files change

    The source included way more files than it really needed.
    This commit limits it to exactly those it needs.
    
    This also makes sure that no rebuild is necessary when any Nix
    file changes, in particular useful when we reformat the Nix files.
    infinisil committed Aug 25, 2024
    Configuration menu
    Copy the full SHA
    7cb66fd View commit details
    Browse the repository at this point in the history
  5. tests.haskell.cabalSdist: Prevent rebuilds when Nix files change

    The generated file sets its own directory as the source, including the
    generated file itself, which causes rebuilds when that file is
    reformatted. We can avoid this by overriding the source with a filtered
    version and using that throughout the tests.
    
    See NixOS#320572 for more context
    infinisil committed Aug 25, 2024
    Configuration menu
    Copy the full SHA
    e6d4558 View commit details
    Browse the repository at this point in the history
  6. lib/tests: Format a file with nixfmt

    And fix locations to not break the test.
    This is a rare case where another change is required after formatting.
    We do this in a separate commit so that we don't need to do it in the
    treewide reformatting PR.
    infinisil committed Aug 25, 2024
    Configuration menu
    Copy the full SHA
    8f425c2 View commit details
    Browse the repository at this point in the history