all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#24509: 25.1.50; backquotes cause testcover to report 1value errors
@ 2016-09-22 15:52 Gemini Lasswell
  2017-10-08 23:48 ` Gemini Lasswell
  0 siblings, 1 reply; 2+ messages in thread
From: Gemini Lasswell @ 2016-09-22 15:52 UTC (permalink / raw)
  To: 24509

[-- Attachment #1: Type: text/plain, Size: 1238 bytes --]

Backquote syntax can cause testcover to report "Value of form marked with ‘1value’ does vary” errors. Here is some code with two different variations of the problem:

(defmacro my-lambda (&rest body)
  `(lambda () ,@body))

(defun my-example ()
  (let ((lambda-1 (my-lambda (message "lambda-1")))
	(lambda-2 (my-lambda (message "lambda-2"))))
    (funcall lambda-1)
    (funcall lambda-2)))

(defmacro my-print-symbol (name)
  `(message "the symbol is %s" ',name))

(defun my-example-2 ()
  (my-print-symbol foo)
  (my-print-symbol bar))

To reproduce the bug:
1. save the above code into a file
2. emacs -Q
3. M-x eval-expression RET (require ‘testcover) RET
4. M-x testcover-start RET filename RET

To make the attached stack trace:
5. M-x toggle-debug-on-error RET
6. M-x eval-expression RET (my-example-2) RET

In my opinion testcover should not be claiming that it is an error if its 1value determination is incorrect. There is no error in the code being tested, there is just a shortcoming in the heuristics that testcover is using to figure out what color splotch to put on the line. But if a form has returned a second value, that code has had adequate coverage and no splotch is necessary.


[-- Attachment #2: testcover-backtrace.txt --]
[-- Type: text/plain, Size: 1692 bytes --]

Debugger entered--Lisp error: (error "Value of form marked with ‘1value’ does vary: (message the symbol is %s (quote bar))")
  signal(error ("Value of form marked with ‘1value’ does vary: (message the symbol is %s (quote bar))"))
  error("Value of form marked with `1value' does vary: %s" (message "the symbol is %s" (quote bar)))
  testcover-1value(2 (message "the symbol is %s" (quote bar)))
  (lambda nil (testcover-1value 2 (list (quote message) "the symbol is %s" (list (quote quote) (testcover-after 1 name)))))()
  testcover-enter(my-print-symbol (lambda nil (testcover-1value 2 (list (quote message) "the symbol is %s" (list (quote quote) (testcover-after 1 name))))))
  (lambda (name) (testcover-enter (quote my-print-symbol) (function (lambda nil (testcover-1value 2 (list (quote message) "the symbol is %s" (list (quote quote) (testcover-after 1 name))))))))(bar)
  (my-print-symbol bar)
  (testcover-after 3 (my-print-symbol bar))
  (lambda nil (testcover-after 1 (my-print-symbol foo)) (testcover-after 3 (my-print-symbol bar)))()
  testcover-enter(my-example-2 (lambda nil (testcover-after 1 (my-print-symbol foo)) (testcover-after 3 (my-print-symbol bar))))
  my-example-2()
  eval((my-example-2) nil)
  eval-expression((my-example-2) nil)
  funcall-interactively(eval-expression (my-example-2) nil)
  call-interactively(eval-expression record nil)
  command-execute(eval-expression record)
  execute-extended-command(nil "eval-expression" "eval-expression")
  funcall-interactively(execute-extended-command nil "eval-expression" "eval-expression")
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)

[-- Attachment #3: Type: text/plain, Size: 3128 bytes --]




In GNU Emacs 25.1.50.4 (x86_64-apple-darwin15.6.0, NS appkit-1404.47 Version 10.11.6 (Build 15G1004))
of 2016-09-19 built on malolo.local
Windowing system distributor 'Apple', version 10.3.1404
Recent messages:
You can run the command ‘eval-expression’ with M-:
testcover
Edebug: my-lambda
Edebug: my-example
Eager macro-expansion failure: (error "Value of form marked with ‘1value’ does vary: (lambda nil (message lambda-2))")
Edebug: my-print-symbol
Edebug: my-example-2
Eager macro-expansion failure: (error "Value of form marked with ‘1value’ does vary: (message the symbol is %s (quote bar))")
You can run the command ‘testcover-start’ with M-x tes-s RET
Eager macro-expansion failure: (error "Value of form marked with ‘1value’ does vary: (message the symbol is %s (quote bar))")

Configured using:
'configure --with-ns'

Configured features:
JPEG RSVG IMAGEMAGICK NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS
NS

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-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
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message subr-x puny seq byte-opt gv
bytecomp byte-compile cl-extra help-mode cconv dired dired-loaddefs
format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config
gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils testcover edebug easymenu
cl-loaddefs pcase cl-lib time-date mule-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win
ucs-normalize term/common-win tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core term/tty-colors frame 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 charscript case-table epa-hook
jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote kqueue cocoa ns multi-tty
make-network-process emacs)

Memory information:
((conses 16 208822 9083)
(symbols 48 20772 0)
(miscs 40 54 207)
(strings 32 19256 5265)
(string-bytes 1 616985)
(vectors 16 35113)
(vector-slots 8 671287 4994)
(floats 8 179 99)
(intervals 56 227 22)
(buffers 976 12))

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

* bug#24509: 25.1.50; backquotes cause testcover to report 1value errors
  2016-09-22 15:52 bug#24509: 25.1.50; backquotes cause testcover to report 1value errors Gemini Lasswell
@ 2017-10-08 23:48 ` Gemini Lasswell
  0 siblings, 0 replies; 2+ messages in thread
From: Gemini Lasswell @ 2017-10-08 23:48 UTC (permalink / raw)
  To: 24509-done

Fixed in master, by the patch applied for bug#25316.





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

end of thread, other threads:[~2017-10-08 23:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-22 15:52 bug#24509: 25.1.50; backquotes cause testcover to report 1value errors Gemini Lasswell
2017-10-08 23:48 ` Gemini Lasswell

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.