Skip to content

pr use package definitions in install test - #1050

Open
matsl wants to merge 2 commits into
masterfrom
pr_use_package_definitions_in_install_test
Open

pr use package definitions in install test#1050
matsl wants to merge 2 commits into
masterfrom
pr_use_package_definitions_in_install_test

Conversation

@matsl

@matsl matsl commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

What

Refactor install-test to only run under docker. Further let package install be
package manager dependent and let configuration use the same,
use-package declaration, for all tests.

  • Makefile (install-melpa-snapshots install-melpa-releases): Use
    melpas new releases and snapshots archives. For all install test
    targets add debug parameter and mount man/use-package for use by the
    install-test.sh script.
    (install-local): Remove target.

  • install-test/MANIFEST: Add elpaca-early-init and
    melpa-snapshot-emacs. Remove melpa-emacs and local-emacs. Rename
    local-install-test.sh to install-test.sh.

  • install-test/elpaca-early-init: Early init required by elpaca.

  • install-test/elpa-devel-emacs:
    install-test/elpa-emacs:
    install-test/elpaca-emacs:
    install-test/melpa-releases-emacs:
    install-test/melpa-snapshots-emacs:
    install-test/straight-emacs:
    install-test/tarball-emacs: Remove use-package declaration and only
    keep package manager aware install.

  • install-test/melpa-emacs:
    install-test/local-emacs: Delete these old removed install tests.

  • install-test/install-test.sh: Rename from
    local-install-test.sh. Add debug option.

  • MANIFEST: Add man/use-package.

  • man/use-package: New file, use-package declaration in man folder for
    use in documentation and in install tests.

Why

Running in docker isolates the install test from the local machine.
That makes it closer to a user install and avoids creating problems
on the local machine as well.

The current solution also reuses the same use-package declaration
for all tests from one file.

@matsl
matsl marked this pull request as draft September 4, 2026 22:49
@matsl
matsl force-pushed the pr_use_package_definitions_in_install_test branch from 76e1e61 to b1ad3e5 Compare September 5, 2026 14:06
@matsl
matsl marked this pull request as ready for review September 5, 2026 14:08
@matsl
matsl requested a review from rswgnu September 5, 2026 14:08

@rswgnu rswgnu left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I am confused by all of the repetitive use-package calls. I think installation test should be run two different ways per package manager: 1. Raw installation without any use package; 2. Testing installation after running the reference use-package we provide, which should not have to be replicated.

Let's discuss all this when you have time. Just put something on the calendar and I'll likely be able to make it.

-- Bob

@matsl

matsl commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator Author

I am confused by all of the repetitive used package calls.

What repetitive calls? You mean that Emacs is started twice? The use-package definition is set in the user init.el file. Emacs is then started twice. First time does the install. The second time verifies that it still works. We had a regression at one time where Hyperbole worked in the session it was installed but not on the next run.

I think installation test should be run two different ways per package manager: 1. Raw installation without any use package; 2. Testing installation after running the reference use-package we provide, which should not have to be replicated.

What do you mean by replicated?

The idea with the current install test is two fold:

  1. Verify that the package at elpa, melpa etc can be installed.
  2. Verify that the install instructions we give works. I'm thinking that the use-package definition is our new preferred way for users to install Hyperbole so that is why I have dropped the old way to install.

There can be more paths to install a package. So installing first without any use-package definition is an option. Many users will likely do that. I'm not sure the extra complexity in the test is worth it though. ensure:t in our use-package definition installs the package if it is not there. So will essentially be the same as an install followed by a configuration.

@matsl
matsl requested a review from rswgnu September 5, 2026 21:02
@matsl
matsl force-pushed the pr_use_package_definitions_in_install_test branch from b1ad3e5 to 99658ba Compare September 13, 2026 20:49
Further let package install be package manager dependent and let
configuration use the same, use-package declaration, for all tests.

* Makefile (install-melpa-snapshots install-melpa-releases): Use
melpas new releases and snapshots archives. For all install test
targets add debug parameter and mount man/use-package for use by the
install-test.sh script.
(install-local): Remove target.

* install-test/MANIFEST: Add elpaca-early-init and
melpa-snapshot-emacs. Remove melpa-emacs and local-emacs. Rename
local-install-test.sh to install-test.sh.

* install-test/elpaca-early-init: Early init required by elpaca.

* install-test/elpa-devel-emacs:
* install-test/elpa-emacs:
* install-test/elpaca-emacs:
* install-test/melpa-releases-emacs:
* install-test/melpa-snapshots-emacs:
* install-test/straight-emacs:
* install-test/tarball-emacs: Remove use-package declaration and only
keep package manager aware install.

* install-test/melpa-emacs:
* install-test/local-emacs: Delete these old removed install tests.

* install-test/install-test.sh: Renamed from
local-install-test.sh. Add debug option

* MANIFEST: Add man/use-package.

* man/use-package: New file, use-package declaration in man folder for
use in documentation and in install tests.
@matsl
matsl force-pushed the pr_use_package_definitions_in_install_test branch from 99658ba to de4af9c Compare September 13, 2026 20:58

@rswgnu rswgnu left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

A few minor fixes suggested but approved for when you make those, you can just merge.

Comment thread install-test/MANIFEST Outdated
Comment thread MANIFEST
@@ -21,6 +21,7 @@ ChangeLog - Summary of changes in recent GNU Hyperbole releases
* --- DOCUMENTATION ---
man/hy-package.el - Hyperbole package.el installation and configuration instructions

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Doesn't your additional 'use-package' file replace the configuration in man/hy-package.el; if so, update the description on that one.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, that is correct. My plan is to update the documentation to use the "new" use-package file but to do that in another PR. Not doing to much in each PR and partly unrelated. So man/hy-package.el is still used by the documentation so I leave it untouched here to be fixed later.

I would also want to discuss how the use-package declaration looks like and would want to do that before we update the docs.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@rswgnu OK?

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