alphapapa / makem.sh

Makefile-like script for linting and testing Emacs Lisp packages
GNU General Public License v3.0
163 stars 13 forks source link

Emacs 28: Sandboxing does not work #34

Closed noctuid closed 2 years ago

noctuid commented 3 years ago

I'm on the latest commit of makem.sh and using lucid Emacs 28 (master as of a few weeks ago) with native compilation. ./makem.sh -vvv --sandbox=./sandbox --install-deps says it's using the sandbox, but it's actually using ~/.emacs.d/elpa. The only thing it puts in the sandbox directory is an init.el. Let me know if there's any other useful information I can provide.

alphapapa commented 3 years ago

Thanks, I think I need to apply the same fix I did here: https://github.com/alphapapa/emacs-sandbox.sh/commit/4195987ee28e9855739cea7137c8501629b40922

alphapapa commented 3 years ago

After further testing, I'm not sure that fix was sufficient there, either. package-user-dir ends up being set correctly, but apparently that happens after early-init calls package-initialize and sets load-path, so then I can't load any installed packages.

alphapapa commented 3 years ago

Looks like just calling package-initialize manually after setting package-user-dir fixes that. And emacs-sandbox.sh was already calling package-initialize, but after it loaded the init file, which is backwards.

alphapapa commented 3 years ago

Ok, I think this fixes it properly in emacs-sandbox.sh: https://github.com/alphapapa/emacs-sandbox.sh/commit/ca92038285bd51d9ac6565f40fa029d10f97d062 So those changes need to be made here, too.

noctuid commented 2 years ago

It looks like this is working correctly in ed096a76cd016782d5390dd48647b6334ff907d1. Is there anything else that needs to be changed?

alphapapa commented 2 years ago

You tell me. :) It seems to work correctly for me as well now. Thanks.