Skip to content
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

[Regression] Renaming defrecord results in renaming alias instead of the name #1756

Closed
Kaspazza opened this issue Jan 15, 2024 · 1 comment
Closed
Labels
bug Something isn't working editor Related to clojure-lsp on a text editor

Comments

@Kaspazza
Copy link

Describe the bug
When I run lsp-rename on defrecord, the places where defrecord is references are replaced in the alias part of the name instead of the changed name.
E.g.
a. We have defrecord Files
b. We have it references somewhere as namespace-a/Files

Run lsp-rename on defrecord Files to FilesC
It changes defrecord name (a.) in that place to FilesC
It changes the reference (b.) from namespace-a/Files to -> FilesCace-a/Files
^ so it replaced the beginning of the reference, instead of the part after the alias.

To Reproduce
Steps to reproduce the behavior:

  1. Go to FilesConf
  2. run lsp-rename to FilesConfig
  3. Go to where it's referenced
  4. It will be renamed at that point from (core-conf-files/->FilesConf) to (->FilesConfigiles/->FilesConf)

Expected behavior
At point 4. It should be renamed from (core-conf-files/->FilesConf) to (core-conf-files/->FilesConfig)
Changing only what's after the alias.

User details (please complete the following information):

  • OS: MacOS M2
  • Editor emacs doom
  • Version: 2024.01.15-12.02.49-nightly mac aarch
    (It was working at version 2022.06.22)
@Kaspazza Kaspazza added bug Something isn't working editor Related to clojure-lsp on a text editor labels Jan 15, 2024
@ericdallo
Copy link
Member

Minimal repro:

(ns foo)

(defrecord MyRecord [])

(ns bar
  (:require [foo :as f]))

(f/MyRecord)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working editor Related to clojure-lsp on a text editor
Projects
Status: Done
Development

No branches or pull requests

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy