-
-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ert tests fail if racket-mode is installed #246
Comments
|
Greg Hendershott <[email protected]> writes:
1. How are you running the tests -- via `make test`?
yes
2. What is the Emacs version?
25.1 by default; I ran "EMACSBIN=/usr/bin/emacs24 make test" and get the
same results
|
Hmm. When you say "the package is already installed", do you mean using Emacs' |
Greg Hendershott <[email protected]> writes:
Hmm. When you say "the package is already installed", do you mean using Emacs' `package-install` or something else?
Using package-install, but into a system wide directory
╭─ zancas:~
╰─% ls /usr/share/emacs25/site-lisp/elpa/racket-mode-0.4
channel.rkt racket-common.elc racket-mode.el
cmds.rkt racket-complete.el racket-mode.elc
defn.rkt racket-complete.elc racket-mode-pkg.el
error.rkt racket-custom.el racket-mode-pkg.elc
find-module-path-completions.rkt racket-custom.elc racket-profile.el
fresh-line.rkt racket-edit.el racket-profile.elc
gui.rkt racket-edit.elc racket-repl.el
image.rkt racket-font-lock.el racket-repl.elc
Install.log.gz racket-font-lock.elc racket-tests.el
instrument.rkt racket-imenu.el racket-tests.elc
keywords.rkt racket-imenu.elc racket-unicode-input-method.el
logger.rkt racket-indent.el racket-unicode-input-method.elc
mod.rkt racket-indent.elc racket-util.el
racket-bug-report.el racket-keywords-and-builtins.el racket-util.elc
racket-bug-report.elc racket-keywords-and-builtins.elc run.rkt
racket-collection.el racket-make-doc.el scribble.rkt
racket-collection.elc racket-make-doc.elc try-catch.rkt
racket-common.el racket-mode-autoloads.el util.rkt
|
David Bremner <[email protected]> writes:
Greg Hendershott ***@***.***> writes:
> Hmm. When you say "the package is already installed", do you mean using Emacs' `package-install` or something else?
>
Using package-install, but into a system wide directory
The problems seem to be caused by interactions with geiser. On the
machine where the tests are failing I have (had) also installed geiser
via package.el.
At least for one of the tests, the problem seems to be related to geiser
helpfully starting scheme-mode (now geiser) for rkt files.
(add-to-list 'auto-mode-alist '("\\.rkt\\'" . scheme-mode))
At a guess, the fact that this only manifests as a problem when
racket-mode is also installed probably has something to do with load
order.
If I think of a way to make the racket-mode tests more robust, I'll let
you know.
|
Ah, interesting. I wonder what's a realistic scenario to test. I think most human users would install only one of these two packages -- or maybe, install both, but in their Emacs init file disambiguate mode they want as the default mode for But to back up a step. It occurs to me now, need/ought you run packages' tests, at all? I don't think that happens when people do the "normal" thing of using (For example. I think some packages exclude test-related |
Greg Hendershott <[email protected]> writes:
Ah, interesting. I wonder what's a realistic scenario to test. I
_think_ most human users would install only one of these two packages
-- or maybe, install both, but in their Emacs init file disambiguate
mode they want as the default mode for `.rkt` files?
Both modes attempt to take ownership of .rkt files, but geiser is also
useful for several other scheme variants.
But to back up a step. It occurs to me now, need/ought you run
packages' tests, at all?
Yes, I'm working on packaging racket-mode for Debian and this kind of
integration testing is part of the point. The underlying conflict in
auto-mode-alist is something we'll have to resolve somehow.
I don't think that happens when people do the "normal" thing of using `package-install`?
That's true. I'm not really doing the "normal thing" in that sense.
(For example. I think some packages exclude test-related `.el` files
from what MELPA distributes. Arguably it's wrong that the MELPA recipe
for `racket-mode` is including them.)
I'm not downloading the files from melpa; I don't really know what the
general melpa policy is about test suites.
d
|
Thanks for explaining.
|
Or, maybe the tests that visit a The tests intentionally don't do that as an indirect way of making sure I set the |
Greg Hendershott <[email protected]> writes:
Or, maybe the tests that visit a `.rkt` file should explicitly call `(racket-mode 1)` -- similar to a user visiting the file, then manually doing a <kbd>M-x</kbd> `racket-mode` to set the mode.
The tests intentionally _don't_ do that as an indirect way of making sure I set the `auto-mode-alist` and that it was effective. But, maybe that's "too strong" a test.
I think the underlying issue is that calling "(package-initialize)"
gives up control over the test environment. In a sense this is good,
since we discovered a real world problem, but it makes the tests
inherently unreprodicible. What do you think about setting
'package-load-list' to only load the packages needed for the tests?
d
|
If the package is not installed, the tests pass. However, if the package is already installed,
two tests fail.
Here are the relevant backtraces
The text was updated successfully, but these errors were encountered: