Skip to content

Any mode requiring cider-common produces error Symbol's variable is void: xref-etags-location #3071

@sktoiva

Description

@sktoiva

Expected behavior

Opening a .clj file succeeds without errors.

Actual behavior

Opening a .clj file that enables any mode that requires cider-common produces error Symbol's variable is void: xref-etags-location

Steps to reproduce the problem

Using emacs version greater than 25.1 should reproduce the problem by producing a warning. Using emacs version greater than 28 should produce an error.

Enabling for example clj-refactor-mode produces the error.

Further notes

cider-common.el requires etags here: https://github.com/clojure-emacs/cider/blob/master/cider-common.el#L31

That's required only for function find-tag-marker-ring (https://github.com/clojure-emacs/cider/blob/master/cider-common.el#L154).

That's obsolete since emacs 25.1 , but emacs 28 removed it completely.

The correct way should be, to my knowledge, to first (require 'xref) and then use xref-push-marker-stack instead of find-tag-marker-ring.

Here's a similar issue in haskell-mode: haskell/haskell-mode#459

Environment & Version information

CIDER version information

1.2.0snapshot

Emacs version

GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin20.6.0, NS appkit-2022.60 Version 11.5.2 (Build 20G95)) of 2021-08-27

Operating system

macOS Big Sur 11.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions