unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#48015: 28.0.50; ELPA package compilation fails
@ 2021-04-25 10:38 Michael Albinus
  2021-04-25 16:24 ` Stefan Monnier
  0 siblings, 1 reply; 11+ messages in thread
From: Michael Albinus @ 2021-04-25 10:38 UTC (permalink / raw)
  To: 48015


Scenario:

- emacs -Q /sudo:: # Emacs 27.2 with builtin Tramp
- M-x list-packages
- Mark Tramp 2.5.0.3 with "i"
- Install it with "x"

=> Compilation error

The problem is, that the loaded Tramp version is not compatible with the
Tramp version to be installed.

For Tramp, this problem is mitigated by command `tramp-recompile-elpa'.
But this could happen for any package.


In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.26, cairo version 1.16.0)
 of 2021-03-08 built on gandalf
Repository revision: 11d3af3c7b9dc5a2910807d311168fb82d962d0d
Repository branch: master
Windowing system distributor 'Fedora Project', version 11.0.12010000
System Description: Fedora 33 (Workstation Edition)

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LCMS2 LIBOTF LIBSELINUX LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER
PNG RSVG SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3
ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8

Major mode: Group

Minor modes in effect:
  async-bytecomp-package-mode: t
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  gnus-undo-mode: t
  display-time-mode: t
  shell-dirtrack-mode: t
  delete-selection-mode: t
  icomplete-mode: t
  show-paren-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
~/lisp/dbus hides /usr/local/share/emacs/28.0.50/lisp/net/dbus
/home/albinus/src/tramp/lisp/tramp-sh hides /usr/local/share/emacs/28.0.50/lisp/net/tramp-sh
/home/albinus/src/tramp/lisp/tramp-fuse hides /usr/local/share/emacs/28.0.50/lisp/net/tramp-fuse
/home/albinus/src/tramp/lisp/tramp-ftp hides /usr/local/share/emacs/28.0.50/lisp/net/tramp-ftp
/home/albinus/src/tramp/lisp/tramp hides /usr/local/share/emacs/28.0.50/lisp/net/tramp
/home/albinus/src/tramp/lisp/tramp-cache hides /usr/local/share/emacs/28.0.50/lisp/net/tramp-cache
/home/albinus/src/tramp/lisp/tramp-uu hides /usr/local/share/emacs/28.0.50/lisp/net/tramp-uu
/home/albinus/src/tramp/lisp/tramp-rclone hides /usr/local/share/emacs/28.0.50/lisp/net/tramp-rclone
/home/albinus/src/tramp/lisp/tramp-integration hides /usr/local/share/emacs/28.0.50/lisp/net/tramp-integration
/home/albinus/src/tramp/lisp/tramp-archive hides /usr/local/share/emacs/28.0.50/lisp/net/tramp-archive
/home/albinus/src/tramp/lisp/tramp-adb hides /usr/local/share/emacs/28.0.50/lisp/net/tramp-adb
/home/albinus/src/tramp/lisp/tramp-cmds hides /usr/local/share/emacs/28.0.50/lisp/net/tramp-cmds
/home/albinus/src/tramp/lisp/tramp-compat hides /usr/local/share/emacs/28.0.50/lisp/net/tramp-compat
/home/albinus/src/tramp/lisp/tramp-sudoedit hides /usr/local/share/emacs/28.0.50/lisp/net/tramp-sudoedit
/home/albinus/src/tramp/lisp/tramp-gvfs hides /usr/local/share/emacs/28.0.50/lisp/net/tramp-gvfs
/home/albinus/src/tramp/lisp/tramp-loaddefs hides /usr/local/share/emacs/28.0.50/lisp/net/tramp-loaddefs
/home/albinus/src/tramp/lisp/tramp-crypt hides /usr/local/share/emacs/28.0.50/lisp/net/tramp-crypt
/home/albinus/src/tramp/lisp/tramp-smb hides /usr/local/share/emacs/28.0.50/lisp/net/tramp-smb
/home/albinus/src/tramp/lisp/trampver hides /usr/local/share/emacs/28.0.50/lisp/net/trampver
/home/albinus/src/tramp/lisp/tramp-sshfs hides /usr/local/share/emacs/28.0.50/lisp/net/tramp-sshfs

Features:
(shadow emacsbug tramp-theme em-dirs esh-var esh-mode esh-cmd esh-ext
esh-opt esh-proc esh-io esh-arg esh-module esh-groups esh-util finder
loadhist gdb-mi gud shortdoc ediff-vers rng-cmpct rng-nxml rng-valid
rng-loc rng-uri rng-parse nxml-parse rng-match rng-pttrn nxml-ns
nxml-mode nxml-outln nxml-rap sgml-mode nxml-util nxml-enc xmltok
helm-for-files helm-comint helm-imenu semantic/util-modes semantic/util
semantic semantic/tag semantic/lex semantic/fw mode-local cedet
helm-bookmark helm-external helm-mode helm-elisp helm-files image-dired
dired-x ffap helm-buffers helm-tags helm-locate helm-eval edebug
helm-occur helm-grep helm-regexp helm-net helm-adaptive helm-info
helm-utils helm-types helm-help helm async-bytecomp helm-global-bindings
helm-easymenu helm-source helm-multi-match async helm-lib lsp-html
lsp-icons lsp-completion lsp-mode lsp-protocol tree-widget spinner
markdown-mode lv inline ht f s git-rebase magit-bookmark bookmark
magit-submodule magit-obsolete magit-blame magit-stash magit-reflog
magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote
magit-commit magit-sequence magit-notes magit-worktree magit-tag
magit-merge magit-branch magit-reset magit-files magit-refs magit-status
magit magit-repos magit-apply magit-wip magit-log magit-diff git-commit
log-edit pcvs-util magit-core magit-autorevert magit-margin
magit-transient magit-process with-editor server magit-mode magit-git
magit-section benchmark magit-utils which-func dash skeleton ibuf-macs
find-dired grep ibuf-ext ibuffer ibuffer-loaddefs autorevert tar-mode
arc-mode archive-mode autoload lisp-mnt cus-edit cus-start cus-load
finder-inf transient vc-dir mailalias misearch multi-isearch shr-color
color timezone help-fns radix-tree cl-print nndoc gnus-dup crm
debbugs-gnu add-log debbugs soap-client rng-xsd rng-dt rng-util
xsd-regexp mule-util tramp-cmds vc-mtn vc-src vc-sccs vc-svn vc-cvs
vc-rcs eglot array filenotify jsonrpc ert pp ewoc debug backtrace xref
flymake-proc flymake warnings compile pcase project imenu vc-hg vc-bzr
cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine
cc-vars cc-defs vc-git bug-reference ediff ediff-merg ediff-mult
ediff-wind ediff-diff ediff-help ediff-init ediff-util dired-aux
time-stamp org-element avl-tree generator ol-eww ol-rmail ol-mhe ol-irc
ol-info ol-gnus nnselect gnus-search eieio-opt speedbar ezimage dframe
ol-docview doc-view image-mode exif ol-bibtex bibtex ol-bbdb ol-w3m org
org-macro org-footnote org-pcomplete org-list org-faces org-entities
noutline outline org-version ob-emacs-lisp org-table org-loaddefs
find-func cal-menu calendar cal-loaddefs smerge-mode diff diff-mode
easy-mmode flow-fill mm-archive eww xdg url-queue thingatpt mm-url
url-http url-gw url-auth gnus-gravatar gravatar dns url-cache sort
smiley gnus-cite mail-extr gnus-bcklg cl-extra help-mode gnus-async
gnus-ml disp-table qp pop3 utf-7 nndraft nnmh nnml gnutls network-stream
nsm gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg
gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-cache gnus-sum
shr kinsoku svg dom nnnil smtpmail sendmail gnus-demon nntp gnus-group
gnus-undo gnus-start gnus-dbus dbus xml gnus-cloud nnimap nnmail
mail-source utf7 netrc nnoo gnus-spec gnus-int gnus-range message rmc
puny rfc822 mml mml-sec epa derived epg epg-config mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader gnus-win
gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums
text-property-search mail-utils mm-util mail-prsvr wid-edit edmacro
kmacro face-remap ob-shell ob ob-tangle ol org-src ob-ref ob-lob
ob-table ob-exp ob-comint ob-core ob-eval org-keys org-compat advice
org-macs vc vc-dispatcher cperl-mode rx time tramp-sh docker-tramp
kubernetes-tramp tramp-cache lxc-tramp lxd-tramp tramp tramp-loaddefs
trampver tramp-integration files-x tramp-compat shell pcomplete comint
ansi-color ring parse-time iso8601 time-date ls-lisp format-spec delsel
ido jka-compr icomplete paren dired dired-loaddefs info package
browse-url url url-proxy url-privacy url-expand url-methods url-history
url-cookie url-domsuf url-util mailcap url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json subr-x map url-vars seq byte-opt gv bytecomp
byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core term/tty-colors frame minibuffer cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 2966586 1169094)
 (symbols 48 66989 3)
 (strings 32 413079 71823)
 (string-bytes 1 30527564)
 (vectors 16 124936)
 (vector-slots 8 2237163 306886)
 (floats 8 690 4855)
 (intervals 56 738837 45564)
 (buffers 992 136))





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#48015: 28.0.50; ELPA package compilation fails
  2021-04-25 10:38 bug#48015: 28.0.50; ELPA package compilation fails Michael Albinus
@ 2021-04-25 16:24 ` Stefan Monnier
  2021-04-25 17:25   ` Michael Albinus
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2021-04-25 16:24 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 48015

> - emacs -Q /sudo:: # Emacs 27.2 with builtin Tramp

Since my account doesn't have sudo access here, I just hit `C-g` at the
prompt.  I don't think it makes the difference (Tramp was loaded in any
case), but I mention it for completeness.

> - M-x list-packages
> - Mark Tramp 2.5.0.3 with "i"
> - Install it with "x"

Done.

> => Compilation error

I don't get any error, neither with Debian testing's Emacs-27.1
nor with the `emacs-27` branch.

What error do you get?


        Stefan






^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#48015: 28.0.50; ELPA package compilation fails
  2021-04-25 16:24 ` Stefan Monnier
@ 2021-04-25 17:25   ` Michael Albinus
  2021-04-26 22:16     ` Stefan Monnier
  0 siblings, 1 reply; 11+ messages in thread
From: Michael Albinus @ 2021-04-25 17:25 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 48015

Stefan Monnier <monnier@iro.umontreal.ca> writes:

Hi Stefan,

>> - emacs -Q /sudo:: # Emacs 27.2 with builtin Tramp
>
> Since my account doesn't have sudo access here, I just hit `C-g` at the
> prompt.  I don't think it makes the difference (Tramp was loaded in any
> case), but I mention it for completeness.

Same here. Hitting C-g at the password prompt is not sufficient to
trigger the error for package installation.

Maybe you could use something else? "emacs -Q /ssh::" did the failing
test.

>> => Compilation error
>
> I don't get any error, neither with Debian testing's Emacs-27.1
> nor with the `emacs-27` branch.
>
> What error do you get?

I'm running a recent build of "GNU Emacs 27.2.50 (build 1,
x86_64-pc-linux-gnu, GTK+ Version 3.24.27) of 2021-03-28" on Fedora
33. But I don't believe it matters.

The point seems to be that default-directory is remote, when you call
list-packages, and try to install Tramp 2.5.0.3. Emacs completely blocks then.

I have seen also other error messages during Tramp package compilation,
which I'm not able to reproduce just now. But let's fix the first
problem first.

>         Stefan

Best regards, Michael.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#48015: 28.0.50; ELPA package compilation fails
  2021-04-25 17:25   ` Michael Albinus
@ 2021-04-26 22:16     ` Stefan Monnier
  2021-04-27 12:05       ` Michael Albinus
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2021-04-26 22:16 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 48015

> Same here. Hitting C-g at the password prompt is not sufficient to
> trigger the error for package installation.
>
> Maybe you could use something else? "emacs -Q /ssh::" did the failing
> test.

Indeed, I can reproduce the problem now.  Basically you need
default-directory to be under Tramp's control.

The core problem that I see is the following:

- Emacs's tramp gets loaded
- We go to a Tramp-controlled default-directory
- We call `package--load-files-for-activation`
  - This starts by loading ~/.emacs.d/elpa/tramp-NN.MM/tramp-autoloads.el
    This calls `tramp-register-autoload-file-name-handlers`.
  - At this point, `package--load-files-for-activation` would like to
    continue by (re)loading the new Tramp files, such as `tramp-compat`
    and friends in the same order that they have been loaded
    (i.e. `tramp-compat.el` before `tramp.el`).
  - But before it gets a chance to do that, the file-name handlers
    call `tramp-autoload-file-name-handler` because of `default-directory`,
    which does (load "tramp" 'noerror 'nomessage), which loads the new
    `tramp.el` before we got a change to load the new `tramp-compat.el`,
    which then leads to an error when the new code in `tramp.el` calls
    a new function from `tramp-compat.el` (which happens to be
    `tramp-compat-thread-yield` AFAICT).

At this point, I'm not sure how best to fix the problem.
Maybe replacing (load "tramp" 'noerror 'nomessage) with
(require 'tramp nil t) is all it takes.
Or maybe a better option is to arrange the autoloads such that
`tramp-register-autoload-file-name-handlers` doesn't "unload/unregister" file
handlers that have already been loaded so that the directory that was
already under Tramp's control doesn't re-trigger a call to
`tramp-autoload-file-name-handler`?


        Stefan






^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#48015: 28.0.50; ELPA package compilation fails
  2021-04-26 22:16     ` Stefan Monnier
@ 2021-04-27 12:05       ` Michael Albinus
  2021-04-27 13:47         ` Stefan Monnier
  0 siblings, 1 reply; 11+ messages in thread
From: Michael Albinus @ 2021-04-27 12:05 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 48015

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> The core problem that I see is the following:
>
> - Emacs's tramp gets loaded
> - We go to a Tramp-controlled default-directory
> - We call `package--load-files-for-activation`
>   - This starts by loading ~/.emacs.d/elpa/tramp-NN.MM/tramp-autoloads.el
>     This calls `tramp-register-autoload-file-name-handlers`.
>   - At this point, `package--load-files-for-activation` would like to
>     continue by (re)loading the new Tramp files, such as `tramp-compat`
>     and friends in the same order that they have been loaded
>     (i.e. `tramp-compat.el` before `tramp.el`).
>   - But before it gets a chance to do that, the file-name handlers
>     call `tramp-autoload-file-name-handler` because of `default-directory`,
>     which does (load "tramp" 'noerror 'nomessage), which loads the new
>     `tramp.el` before we got a change to load the new `tramp-compat.el`,
>     which then leads to an error when the new code in `tramp.el` calls
>     a new function from `tramp-compat.el` (which happens to be
>     `tramp-compat-thread-yield` AFAICT).
>
> At this point, I'm not sure how best to fix the problem.
> Maybe replacing (load "tramp" 'noerror 'nomessage) with
> (require 'tramp nil t) is all it takes.
> Or maybe a better option is to arrange the autoloads such that
> `tramp-register-autoload-file-name-handlers` doesn't "unload/unregister" file
> handlers that have already been loaded so that the directory that was
> already under Tramp's control doesn't re-trigger a call to
> `tramp-autoload-file-name-handler`?

What I don't understand: when (load "tramp" 'noerror 'nomessage) is
called, default-directory is already local due to a let-binding.

Anyway, even if the compilation runs through in case of a local
default-directory, the resulting *.elc files have errors. I have quit
Emacs (from the first recipe), and then I have started

emacs -Q -L ~/.emacs.d/elpa/tramp-2.5.0.3/ /ssh::

There are further errors, which are related to a wrong
tramp-compat.el. Only my new command tramp-recompile-elpa fixes this.

>         Stefan

Best regards, Michael.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#48015: 28.0.50; ELPA package compilation fails
  2021-04-27 12:05       ` Michael Albinus
@ 2021-04-27 13:47         ` Stefan Monnier
  2021-04-27 18:58           ` Stefan Monnier
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2021-04-27 13:47 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 48015

>> The core problem that I see is the following:
>>
>> - Emacs's tramp gets loaded
>> - We go to a Tramp-controlled default-directory
>> - We call `package--load-files-for-activation`
>>   - This starts by loading ~/.emacs.d/elpa/tramp-NN.MM/tramp-autoloads.el
>>     This calls `tramp-register-autoload-file-name-handlers`.
>>   - At this point, `package--load-files-for-activation` would like to
>>     continue by (re)loading the new Tramp files, such as `tramp-compat`
>>     and friends in the same order that they have been loaded
>>     (i.e. `tramp-compat.el` before `tramp.el`).
>>   - But before it gets a chance to do that, the file-name handlers
>>     call `tramp-autoload-file-name-handler` because of `default-directory`,
>>     which does (load "tramp" 'noerror 'nomessage), which loads the new
>>     `tramp.el` before we got a change to load the new `tramp-compat.el`,
>>     which then leads to an error when the new code in `tramp.el` calls
>>     a new function from `tramp-compat.el` (which happens to be
>>     `tramp-compat-thread-yield` AFAICT).
>>
>> At this point, I'm not sure how best to fix the problem.
>> Maybe replacing (load "tramp" 'noerror 'nomessage) with
>> (require 'tramp nil t) is all it takes.
>> Or maybe a better option is to arrange the autoloads such that
>> `tramp-register-autoload-file-name-handlers` doesn't "unload/unregister" file
>> handlers that have already been loaded so that the directory that was
>> already under Tramp's control doesn't re-trigger a call to
>> `tramp-autoload-file-name-handler`?
>
> What I don't understand: when (load "tramp" 'noerror 'nomessage) is
> called, default-directory is already local due to a let-binding.

That's fine, this load functions properly.  The problem is elsewhere:
- loading the new `tramp.el` works properly but results in a broken
  setup because it will not load the new `tramp-compat.el`
  because that feature is already provided.  So you end up with a new`
  tramp.el` calling functions it expects to be provided by the new
  `tramp-compat.el`.
- the Tramp default-directory is not active during the load, but it is
  active right before it (it is the trigger that causes the load, actually)
  and it is active right after it (before package.el gets to reload
  `tramp-compat.el`) and that's when the new code from `tramp.el`
  signals an error because of the missing function from the new
  `tramp-compat.el`.

> Anyway, even if the compilation runs through in case of a local
> default-directory, the resulting *.elc files have errors.
>
> I have quit Emacs (from the first recipe), and then I have started
>
>     emacs -Q -L ~/.emacs.d/elpa/tramp-2.5.0.3/ /ssh::
>
> There are further errors, which are related to a wrong
> tramp-compat.el. Only my new command tramp-recompile-elpa fixes this.

I suspect this is the result of the `find-library-name` problem I fixed
yesterday on `master` (which causes `package.el` not to load the new
files to override the old ones before compiling the new files).

You can circumvent it by loading `find-func` before doing the
`package-install`.  I'm not sure how the GNU ELPA package of Tramp can
protect itself from this bug yet (beside `tramp-recompile-elpa`, of
course).

BTW, maybe one option to circumvent both problems is to replace

    (load "tramp" 'noerror 'nomessage)

with

    (load "tramp-compat" 'noerror 'nomessage)
    (load "tramp" 'noerror 'nomessage)

?


-- Stefan






^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#48015: 28.0.50; ELPA package compilation fails
  2021-04-27 13:47         ` Stefan Monnier
@ 2021-04-27 18:58           ` Stefan Monnier
  2021-04-27 19:13             ` Michael Albinus
  2021-04-28 14:22             ` Michael Albinus
  0 siblings, 2 replies; 11+ messages in thread
From: Stefan Monnier @ 2021-04-27 18:58 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 48015

> BTW, maybe one option to circumvent both problems is to replace
>
>     (load "tramp" 'noerror 'nomessage)
>
> with
>
>     (load "tramp-compat" 'noerror 'nomessage)
>     (load "tramp" 'noerror 'nomessage)

Hmm... no I don't think this will make any difference when
default-directory is not under the control of Tramp.

Another approach is to add something like

    ;; Reload `tramp-compat` when we reload `tramp-autoloads`.
    ;;;###autoload (when (featurep 'tramp-compat)
    ;;;###autoload   (load "tramp-compat"'noerror 'nomessage)

This presumes that the only file that really needs to be reloaded is
`tramp-compat`.


    Stefan






^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#48015: 28.0.50; ELPA package compilation fails
  2021-04-27 18:58           ` Stefan Monnier
@ 2021-04-27 19:13             ` Michael Albinus
  2021-04-28 14:22             ` Michael Albinus
  1 sibling, 0 replies; 11+ messages in thread
From: Michael Albinus @ 2021-04-27 19:13 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 48015

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> BTW, maybe one option to circumvent both problems is to replace
>>
>>     (load "tramp" 'noerror 'nomessage)
>>
>> with
>>
>>     (load "tramp-compat" 'noerror 'nomessage)
>>     (load "tramp" 'noerror 'nomessage)
>
> Hmm... no I don't think this will make any difference when
> default-directory is not under the control of Tramp.

Well, I have just pushed this change. It seems to help partly. Emacs
27.2 isn't blocked any longer when installing an incompatible Tramp
version, even when default-directory is remote while installing. It
shows just an error message. And after restarting Emacs,
tramp-recompile-elpa does arrange everything. This is a scenario I could
explain to the users :-)

> Another approach is to add something like
>
>     ;; Reload `tramp-compat` when we reload `tramp-autoloads`.
>     ;;;###autoload (when (featurep 'tramp-compat)
>     ;;;###autoload   (load "tramp-compat"'noerror 'nomessage)
>
> This presumes that the only file that really needs to be reloaded is
> `tramp-compat`.

I'll test this tomorrow. It was a hard day ...

>     Stefan

Best regards, Michael.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#48015: 28.0.50; ELPA package compilation fails
  2021-04-27 18:58           ` Stefan Monnier
  2021-04-27 19:13             ` Michael Albinus
@ 2021-04-28 14:22             ` Michael Albinus
  2021-04-28 15:32               ` Stefan Monnier
  1 sibling, 1 reply; 11+ messages in thread
From: Michael Albinus @ 2021-04-28 14:22 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 48015

Stefan Monnier <monnier@iro.umontreal.ca> writes:

Hi Stefan,

> Hmm... no I don't think this will make any difference when
> default-directory is not under the control of Tramp.
>
> Another approach is to add something like
>
>     ;; Reload `tramp-compat` when we reload `tramp-autoloads`.
>     ;;;###autoload (when (featurep 'tramp-compat)
>     ;;;###autoload   (load "tramp-compat"'noerror 'nomessage)
>
> This presumes that the only file that really needs to be reloaded is
> `tramp-compat`.

This is as good (or bad) like the other proposal. Installing a Tramp
package finishes, and it compiles everything. However, the *.elc files
show still the compatibility problems.

Restarting Emacs, and running tramp-recompile-elpa, fixes this.

>     Stefan

Best regards, Michael.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#48015: 28.0.50; ELPA package compilation fails
  2021-04-28 14:22             ` Michael Albinus
@ 2021-04-28 15:32               ` Stefan Monnier
  2021-04-28 17:48                 ` Michael Albinus
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2021-04-28 15:32 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 48015

Michael Albinus [2021-04-28 16:22:49] wrote:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> Hmm... no I don't think this will make any difference when
>> default-directory is not under the control of Tramp.
>>
>> Another approach is to add something like
>>
>>     ;; Reload `tramp-compat` when we reload `tramp-autoloads`.
>>     ;;;###autoload (when (featurep 'tramp-compat)
>>     ;;;###autoload   (load "tramp-compat"'noerror 'nomessage)
>>
>> This presumes that the only file that really needs to be reloaded is
>> `tramp-compat`.
>
> This is as good (or bad) like the other proposal. Installing a Tramp
> package finishes, and it compiles everything. However, the *.elc files
> show still the compatibility problems.

Even if you `M-x load-library RET find-func RET` before `package-install`?


        Stefan






^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#48015: 28.0.50; ELPA package compilation fails
  2021-04-28 15:32               ` Stefan Monnier
@ 2021-04-28 17:48                 ` Michael Albinus
  0 siblings, 0 replies; 11+ messages in thread
From: Michael Albinus @ 2021-04-28 17:48 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 48015

Stefan Monnier <monnier@iro.umontreal.ca> writes:

Hi Stefan,

>> This is as good (or bad) like the other proposal. Installing a Tramp
>> package finishes, and it compiles everything. However, the *.elc files
>> show still the compatibility problems.
>
> Even if you `M-x load-library RET find-func RET` before `package-install`?

I've started

--8<---------------cut here---------------start------------->8---
[albinus@gandalf emacs]$ ~/src/emacs-27/src/emacs -l package -l find-func -f list-packages
--8<---------------cut here---------------end--------------->8---

From there, I've installed the Tramp package. Same situation:
compilation w/o problem, but resulting *.elc have compatibility problems.

>         Stefan

Best regards, Michael.





^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-04-28 17:48 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-25 10:38 bug#48015: 28.0.50; ELPA package compilation fails Michael Albinus
2021-04-25 16:24 ` Stefan Monnier
2021-04-25 17:25   ` Michael Albinus
2021-04-26 22:16     ` Stefan Monnier
2021-04-27 12:05       ` Michael Albinus
2021-04-27 13:47         ` Stefan Monnier
2021-04-27 18:58           ` Stefan Monnier
2021-04-27 19:13             ` Michael Albinus
2021-04-28 14:22             ` Michael Albinus
2021-04-28 15:32               ` Stefan Monnier
2021-04-28 17:48                 ` Michael Albinus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).