Skip to content

Annotate hash mismatches when Determinate features are enabled#158

Merged
grahamc merged 27 commits intomainfrom
hash-mismatch-annotations
Apr 14, 2025
Merged

Annotate hash mismatches when Determinate features are enabled#158
grahamc merged 27 commits intomainfrom
hash-mismatch-annotations

Conversation

@gustavderdrache
Copy link
Contributor

@gustavderdrache gustavderdrache commented Mar 29, 2025

Description

When Determinate features are enabled, this PR adds GitHub Actions annotations to point users directly to hash mismatches in their source files.

Example:

      - uses: DeterminateSystems/nix-installer-action@hash-mismatch-annotations
        with:
          determinate: true
Checklist
  • Tested changes against a test repository
  • Added or updated relevant documentation (leave unchecked if not applicable)
  • (If this PR is for a release) Updated README to point to the new tag (leave unchecked if not applicable)

src/fixHashes.ts Outdated
Comment on lines +25 to +29
const output = await getExecOutput("determinate-nixd", [
"fix",
"hashes",
"--json",
]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const output = await getExecOutput("determinate-nixd", [
"fix",
"hashes",
"--json",
]);
const output = await getExecOutput("determinate-nixd", [
"fix",
"hashes",
"--json",
], {
silent: true,
});

without silent: true the log gets littered with ugly output:

CleanShot 2025-04-14 at 11 50 47

@grahamc grahamc enabled auto-merge (squash) April 14, 2025 15:57
@grahamc grahamc merged commit 902d820 into main Apr 14, 2025
17 checks passed
@grahamc grahamc deleted the hash-mismatch-annotations branch April 14, 2025 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants