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

Ensure flake is locked at start of CI run #293

Merged
merged 1 commit into from
Aug 1, 2024
Merged

Conversation

purcell
Copy link
Owner

@purcell purcell commented Jul 31, 2024

What do you think of this, @akirak?

Maybe it's more trouble than it's worth, but it wasn't obvious how we could automatically verify that the flake.lock is not out of sync.

@akirak
Copy link
Collaborator

akirak commented Jul 31, 2024

@purcell I think it's fine to update the lock file this way. Sorry for the previous mistake.

Alternatively, we could check if nix profile install works with the same options as setup-emacs? That's what we want to test.

It's confusing that nix profile install and nix run/nix build handle an out-of-sync lock file in different ways. In the future, Nix may change how it handles these situations, as Nix flakes are currently not completely stable (it's still experimental). The test should be as close as possible to the major use case of nix-emacs-ci (i.e. setup-emacs).

I also noticed that tests/default.nix can be converted to Emacs Lisp code. It is possible to first install Emacs using nix profile install and then test it in a classic Emacs way without the Nix shell application.

@purcell
Copy link
Owner Author

purcell commented Jul 31, 2024

I also noticed that tests/default.nix can be converted to Emacs Lisp code

Maybe, but that file is used by the flake checks: https://github.com/purcell/nix-emacs-ci/blob/master/flake.nix#L163

and those are what the CI runs.

It's confusing that nix profile install and nix run/nix build handle an out-of-sync lock file in different ways.

Yes, that's the root problem I guess.

@purcell
Copy link
Owner Author

purcell commented Jul 31, 2024

Sorry for the previous mistake.

Also, no apology is necessary! We learned something useful.

@akirak
Copy link
Collaborator

akirak commented Jul 31, 2024

It's nice to ensure flake.lock is in sync.

Alternatively, we could check if nix profile install works with the same options as setup-emacs?

This is a separate problem, so we can merge this PR anyway.

@purcell purcell merged commit 8d78c92 into master Aug 1, 2024
51 checks passed
@purcell purcell deleted the auto-relock-flake branch August 1, 2024 10:47
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