emacs/lisp/emacs-lisp
Andrea Corallo a71f54eff8 Rework eln deletion strategy for new eln-cache folder structure
When recompiling remove the corresponding stale elns found in the
`comp-eln-load-path'.

When removing a package remove the corresponding elns too.

On Windows both of these are performed only when possible, when it's
not the file is renamed as .eln.old and a last attempt to remove this
is performed closing the Emacs session.  When a file being deleted was
loaded by multiple Emacs sessions the last one being closed should
delete it.

	* lisp/emacs-lisp/comp.el (comp-clean-up-stale-eln): New function.
	(comp-delete-or-replace-file): Rename from
	`comp--replace-output-file' and update so it can be used for
	replacing or deleting shared libs safetly.

	* lisp/emacs-lisp/package.el (package--delete-directory): When
	native compiled just call `comp-clean-up-stale-eln' for each
	eln file we want to clean-up.

	* src/alloc.c (cleanup_vector): Call directly the dynlib_close.

	* src/comp.c (syms_of_comp): Update for comp_u->cfile removal.
	Make 'all_loaded_comp_units_h' key-value weak as now the key will
	be the filename.
	(load_comp_unit): Register the compilation unit only when the load
	is fully completed.
	(register_native_comp_unit): Make the key of
	all_loaded_comp_units_h the load filename.
	(eln_load_path_final_clean_up): New function.
	(dispose_comp_unit)
	(finish_delayed_disposal_of_comp_units)
	(dispose_all_remaining_comp_units)
	(clean_package_user_dir_of_old_comp_units): Remove.
	(Fcomp__compile_ctxt_to_file): Update for
	`comp--replace-output-file' -> `comp-delete-or-replace-file'
	rename.

	* src/comp.h (dispose_comp_unit)
	(finish_delayed_disposal_of_comp_units)
	(dispose_all_remaining_comp_units)
	(clean_package_user_dir_of_old_comp_units): Remove.
	(eln_load_path_final_clean_up): Add.
	(struct Lisp_Native_Comp_Unit): Remove cfile field.

	* src/emacs.c (Fkill_emacs): Call 'eln_load_path_final_clean_up'.

	* src/pdumper.c (dump_do_dump_relocation): Do not set comp_u->cfile.
2020-09-06 18:17:00 +02:00
..
advice.el
autoload.el Merge remote-tracking branch 'savannah/master' into HEAD 2020-08-13 12:22:07 +02:00
avl-tree.el
backquote.el
backtrace.el
benchmark.el Revert last change in benchmark.el 2020-06-21 19:01:40 +01:00
bindat.el Add new tests to bindat-tests.el 2020-04-29 09:52:34 +02:00
byte-opt.el Clean up and improve compilation of arithmetic (bug#42597) 2020-08-07 10:00:45 +02:00
byte-run.el Merge remote-tracking branch 'savannah/master' into HEAD 2020-08-09 15:03:23 +02:00
bytecomp.el Merge remote-tracking branch 'savannah/master' into HEAD 2020-08-29 11:33:37 +02:00
cconv.el
chart.el Remove some compat code from chart.el 2020-08-18 23:19:09 +02:00
check-declare.el ; Maintainer header updates 2020-07-31 09:09:39 -07:00
checkdoc.el Remove Emacs 23 compat code from checkdoc.el 2020-08-12 15:45:52 +02:00
cl-extra.el Make cl-concatenate an alias of seq-concatenate 2020-03-23 18:58:21 -04:00
cl-generic.el Improve Edebug symbols for inlined secondary methods (Bug#42671) 2020-08-02 22:07:27 +02:00
cl-indent.el Remove redundant :groups args missed in last commit 2020-05-03 16:21:51 +02:00
cl-lib.el Preserve setf semantics in 'substring', 'cons', 'logand' expanders 2020-08-25 17:59:05 +02:00
cl-macs.el Avoid duplicate Edebug symbols when using ‘cl-flet’ (Bug#41989) 2020-08-02 17:39:24 +02:00
cl-preloaded.el
cl-print.el
cl-seq.el
comp.el Rework eln deletion strategy for new eln-cache folder structure 2020-09-06 18:17:00 +02:00
copyright.el
crm.el Remove many items obsolete since Emacs 23.1 2020-08-14 13:07:26 +02:00
cursor-sensor.el * lisp/emacs-lisp/cursor-sensor.el (cursor-sensor--detect): Change last fix 2020-02-24 09:55:09 -05:00
debug.el * lisp/emacs-lisp/debug.el (debug): Merge the non-interactive cases 2020-01-31 16:09:42 +02:00
derived.el Make Emacs 20 compat code in derived.el obsolete 2020-08-14 13:07:26 +02:00
disass.el Rework `comp-c-func-name' arguments 2020-07-02 22:39:39 +02:00
easy-mmode.el Minor mode doc string clarification 2020-08-21 17:15:22 +02:00
easymenu.el Remove many items obsolete since Emacs 23.1 2020-08-14 13:07:26 +02:00
edebug.el Avoid some uses of obsolete function interactive-p 2020-08-24 04:27:27 +02:00
eieio-base.el New eieio-persistent-make-instance generic function 2020-08-28 08:20:28 -07:00
eieio-compat.el
eieio-core.el Un-deprecate oset and oset-default 2020-06-06 17:24:00 +01:00
eieio-custom.el
eieio-datadebug.el
eieio-opt.el
eieio-speedbar.el
eieio.el Un-deprecate oset and oset-default 2020-06-06 17:24:00 +01:00
eldoc.el Fix ElDoc's eldoc-documentation-enthusiast strategy 2020-09-03 23:20:55 +01:00
elint.el
elp.el ; Fix some typos and doc issues (bug#40695) 2020-04-18 17:10:02 +02:00
ert-x.el
ert.el Fix ert ability to peek inside structures when comparing unequal values 2020-08-18 16:06:35 +02:00
ewoc.el
faceup.el
find-func.el Merge remote-tracking branch 'savannah/master' into HEAD 2020-08-19 16:11:00 +02:00
float-sup.el Use lexical-binding in float-sup.el and add tests 2020-04-29 09:25:02 +02:00
generator.el Band-aid for edebugging generator bodies (Bug#40434). 2020-06-14 20:01:28 +02:00
generic.el
gv.el Preserve setf semantics in 'substring', 'cons', 'logand' expanders 2020-08-25 17:59:05 +02:00
helper.el
hierarchy.el Add the new library hierarchy.el 2020-08-09 14:48:22 +02:00
inline.el
let-alist.el
lisp-mnt.el
lisp-mode.el Change how #:uninterned symbols are font-locked in Lisp mode 2020-08-24 14:34:42 +02:00
lisp.el Fix (end-of-defun N) for N >= 2 2020-08-11 16:02:11 +02:00
macroexp.el
map-ynp.el
map.el * lisp/emacs-lisp/map.el: Add keyword-only pattern abbreviation 2020-02-04 12:30:31 -05:00
nadvice.el ; Fix license statements. 2020-08-27 02:53:25 +02:00
package-x.el
package.el Rework eln deletion strategy for new eln-cache folder structure 2020-09-06 18:17:00 +02:00
pcase.el * lisp/emacs-lisp/pcase.el (pcase--fgrep): Look inside vectors 2020-05-11 09:53:37 -04:00
pp.el
radix-tree.el
re-builder.el Fix void-variable n-reb in re-builder (Bug#40409) 2020-04-04 20:06:54 -04:00
regexp-opt.el Remove the optional KEEP-ORDER argument to regexp-opt 2020-02-13 20:43:42 +01:00
regi.el
ring.el
rmc.el
rx.el Merge from origin/emacs-27 2020-08-18 07:51:05 -07:00
seq.el ; Bump seq version to 2.22 2020-08-29 00:42:36 +02:00
shadow.el Remove many items obsolete since Emacs 23.2 and 23.3 2020-08-24 04:09:47 +02:00
smie.el * lisp/emacs-lisp/package.elm lisp/emacs-lisp/smie.el: Fix indent 2020-05-29 15:01:58 -04:00
subr-x.el gnus-shorten-url: Improve and avoid args-out-of-range error 2020-04-13 12:12:00 +02:00
syntax.el Allow back-references in syntax-propertize-rules. 2020-05-19 20:50:14 +02:00
tabulated-list.el
tcover-ses.el
testcover.el
text-property-search.el Fix NOT-CURRENT behaviour in text-property-search-backward 2020-07-17 18:44:49 +02:00
thunk.el
timer-list.el Support sorting timer-list-mode by column (Bug#40854) 2020-05-12 19:10:20 +02:00
timer.el Simplify run-at-time 2020-03-08 00:25:38 -08:00
tq.el
trace.el Clarify semantics of trace-function CONTEXT argument 2020-04-25 09:55:37 -04:00
unsafep.el
warnings.el Show log suppression buttons in display-warning buffer 2020-09-04 06:28:21 +02:00