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

Adding require command fails for requires without alias #1791

Closed
blnote opened this issue Mar 15, 2024 · 1 comment
Closed

Adding require command fails for requires without alias #1791

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

Comments

@blnote
Copy link
Contributor

blnote commented Mar 15, 2024

Describe the bug
the code action to add a namespace results in error when it is an unqualified namespace (like tmp, user).

To Reproduce
Steps to reproduce the behavior:

  1. create namespace
(ns tmp)
(def f inc)
  1. execute code action to require from another namespace, eg for line (tmp/f 2)

Expected behavior
no error

This seems to occur only after the recent code change supporting js-requires PR

culprit seems to be a change in the add-require-suggestion function of add_missing_libspec.clj that transforms chosen-ns to a symbol (line 608). No error occurs when removing this line, but probably it was needed for the new functionality. I don't have the time to look into this in detail right now.

@blnote blnote added bug Something isn't working editor Related to clojure-lsp on a text editor labels Mar 15, 2024
@ericdallo ericdallo changed the title adding require for unqualified namespaces does result in error Adding require command fails for requires without alias Mar 16, 2024
@ericdallo
Copy link
Member

ericdallo commented Mar 16, 2024

This happens for any code action without alias like:

Add require '[foo.bar]'

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