purcell / setup-emacs

Github action which installs a given Emacs version
MIT License
139 stars 6 forks source link

Error `cannot write modified lock file of flake` #49

Closed unindented closed 1 month ago

unindented commented 1 month ago

Hi @purcell. Thank you so much for this action!

I've started getting this error today when using purcell/setup-emacs@master:

Configuring build cache and installing Emacs
  error:
         … while updating the lock file of flake 'github:purcell/nix-emacs-ci/2a9fb400307b36d76ea7288ee6221275ddbe707d?narHash=sha256-1clhQOWKqFy4ySLw3YQgfcAFkJNzR6UhfZMowKGdV3I%3D'

         error: cannot write modified lock file of flake 'github:purcell/nix-emacs-ci' (use '--no-write-lock-file' to ignore)

Do you know what could be happening?

akirak commented 1 month ago

This is because the lock file is not up to date, and it should be fixed with https://github.com/purcell/nix-emacs-ci/pull/292. Sorry for my oversight.

manateelazycat commented 1 month ago

@akirak Canyou merge patch please? My github action failed too.

Thanks for project!

akirak commented 1 month ago

@manateelazycat nix-emacs-ci is @purcell's project, and I don't have any permission on the repository. Please wait until he is back. Really sorry for my mistake...

manateelazycat commented 1 month ago

@akirak My github action test.yml is

      - name: Install emacs (Linux)
        uses: purcell/setup-emacs@master
        with:
          version: ${{ matrix.emacs_version }}
        if: matrix.os != 'windows-latest'

Can I change something in test.yml to make github action works? Example, change master to some older version?

akirak commented 1 month ago

@manateelazycat A temporary workaround would be to fork setup-emacs and edit install.sh to install from the bugfix branch:

https://github.com/purcell/setup-emacs/blob/b2aa076508504d3794cc561c18f3fd7f110d9c2d/install.sh#L20

(change github:purcell/nix-emacs-ci to github:akirak/nix-emacs-ci/lock-release-snapshot)

akirak commented 1 month ago

@manateelazycat It would also be possible to use github:purcell/nix-emacs-ci/SPECIFIC-REVISION-HASH, e.g. github:purcell/nix-emacs-ci/26e3a405e04ae655857929de56188586500e766d to refer to this commit.

samsonwang commented 1 month ago

@manateelazycat I modified my .yml file as following, using an older version, and it worked.

uses: purcell/setup-emacs@v6.0
with:
  version: 24.5
purcell commented 1 month ago

Thanks, the relevant PR from @akirak has been merged, so caching of builds should resume soon. I wouldn't suggest pinning to older releases of this repo, since they won't have all the Emacs versions you might need, and might have other compatibility issues.

BTW, I'll invite @akirak to be a committer in this repo, so that I'm not needed for fixes or updates like this.

akirak commented 1 month ago

@purcell Thank you for the invitation, but it would be more suitable to invite me to nix-emacs-ci, not to this repo. I have never touched setup-emacs so far.

purcell commented 1 month ago

Doh, right, sorry. Need more coffee! I'll do that now.

akirak commented 1 month ago

@purcell Thanks!