Skip to content

Require Emacs 27.1, pin dependencies to MELPA Stable - #65

Merged
zonuexe merged 6 commits into
masterfrom
chore/require-emacs-27
Jul 17, 2026
Merged

Require Emacs 27.1, pin dependencies to MELPA Stable#65
zonuexe merged 6 commits into
masterfrom
chore/require-emacs-27

Conversation

@zonuexe

@zonuexe zonuexe commented Jul 17, 2026

Copy link
Copy Markdown
Member

Aligns the declared Emacs floor with reality, pins dependencies to MELPA Stable, and verifies the result on a real Emacs 27.2.

Require Emacs 27.1 everywhere

The declared floor was inconsistent and wrong: 25.1 in phpstan.el and flycheck-phpstan.el, 26.1 in flymake-phpstan.el and phpstan-hover.el, "Emacs 26+" in the README, 24.3 in Eask. But php-mode (1.27.0) and flycheck (36.0) each require (emacs (27 1)) themselves, so a 26.x user could never have resolved the dependencies. CI already dropped 27.2 because it does not pass. Everything now says 27.1.

Pin dependencies to MELPA Stable

(source 'melpa) pulled whatever was on MELPA that day — builds were resolving php-mode 20260716.1807 and flycheck 20260717.456, so a CI failure could come from a dependency's unreleased HEAD rather than from this package, and two runs a day apart were not testing the same thing. MELPA Stable carries releases new enough for our requirements (php-mode 1.27.0 ≥ 1.22.3, php-runtime 0.3.2 ≥ 0.2, flycheck 36.0 ≥ 26); compat comes from GNU ELPA regardless.

Verified on Emacs 27.2

Added .github/run-emacs-27-2.sh, which fetches Emacs 27.2 from nix-emacs-ci and runs eask install-deps + eask compile. Ran it: clean compile, 4/4 files, no warnings, with the MELPA Stable dependencies.

A couple of notes worth recording for whoever runs this next, on Apple Silicon:

  • nix-emacs-ci does not expose Emacs 27 on aarch64-darwin (its flake excludes it — old Emacs fails to build there), only on x86_64-darwin. So this runs through Rosetta, which needs extra-platforms = x86_64-darwin in /etc/nix/nix.conf.
  • The prebuilt binaries are not cached for x86_64-darwin (nix-emacs-ci's own CI does not build that platform), so the first run compiles Emacs from source (~30 min). The script pins the nix-emacs-ci revision so later runs reuse it. Reaching any cache at all also needs your user in trusted-users, or the daemon silently ignores the substituter.

Incidental fix

Compiling under 27.2 surfaced a pre-existing warning (present on every version, from 2025-04):

phpstan.el:65: the function `tramp-dissect-file-name' might not be defined at runtime

Both declare-function forms quoted the function name and arglist — which disables the declaration — and one named the file "tamp" instead of "tramp". Fixed; the compile is now warning-free on both 27.2 and current master Emacs.

Verification

Every commit compiles cleanly on Emacs 27.2 on its own. eask compile and the local Flycheck end-to-end (unmodified + editor-mode buffers) both pass on system Emacs with the MELPA Stable dependencies.

zonuexe added 6 commits July 17, 2026 22:46
The declared floor was inconsistent -- 25.1 in phpstan.el and
flycheck-phpstan.el, 26.1 in flymake-phpstan.el and phpstan-hover.el,
"Emacs 26+" in the README, and 24.3 in Eask -- and none of it was true.
CI has not covered anything below 27.2 for a while, and `php-mode' and
`flycheck' both require Emacs 27.1 themselves, so a 26.x user could never
have resolved the dependencies in the first place.

Say 27.1 in every place.
Eask still declared 24.3, out of step with the 27.1 the package headers
now ask for.  Align it.

The package archive is left as MELPA: pinning to MELPA Stable belongs in
the local 27.x check, not in CI, where the stable php-mode release lags
behind Emacs master and breaks the snapshot job.  See the Eask.27 file.
Both `declare-function' calls quoted the function name and the argument
list, which is wrong -- the symbol and the arglist are passed unquoted --
so neither declaration registered, and the byte compiler warned:

    the function `tramp-dissect-file-name' might not be defined at runtime

One of them also named the file "tamp" instead of "tramp".  Found while
compiling under Emacs 27.2; the warning was present on every version.
CI does not cover Emacs 27, but Package-Requires now declares it as the
floor, so there has to be a way to check it by hand.

nix-emacs-ci does not expose Emacs 27 on aarch64-darwin (it fails to build
old Emacs on that platform), only on x86_64-darwin, so on Apple Silicon
this goes through Rosetta -- which needs `extra-platforms = x86_64-darwin`
in nix.conf.  The prebuilt binaries are also not cached for x86_64-darwin,
so the first run builds Emacs from source; the nix-emacs-ci revision is
pinned so that later runs reuse it instead of rebuilding.
MELPA's php-mode and flycheck track Emacs master -- flycheck HEAD requires
Emacs 28.1 and will not install on 27 -- which is why the 27.2 CI job was
failing and got dropped.  MELPA Stable's releases still support 27
(flycheck 36.0, php-mode 1.27.0).

Eask reads `Eask.<major>' in preference to `Eask' on a matching Emacs, so
`Eask.27' redirects only Emacs 27 to MELPA Stable while every other
version keeps using MELPA through the main `Eask'.  This lets the 27 check
run in CI (next commit) and locally (.github/run-emacs-27-2.sh) without a
per-job archive override.

It is a copy of `Eask' differing only in the `source' line; its header
says so, since the two have to stay in sync.
27.1 is the declared floor, so cover it in CI again.  It was dropped
because MELPA's flycheck HEAD requires Emacs 28.1 and would not install on
27; the previous commit's Eask.27 pulls 27's dependencies from MELPA
Stable instead, which supports it.

Ubuntu only: one platform is enough to catch a 27-specific break, and it
keeps the matrix small.
@zonuexe
zonuexe force-pushed the chore/require-emacs-27 branch from b1757ed to 44f8306 Compare July 17, 2026 15:25
@zonuexe
zonuexe merged commit 4f2723c into master Jul 17, 2026
9 checks passed
@zonuexe
zonuexe deleted the chore/require-emacs-27 branch July 17, 2026 15: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.

1 participant