This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-05-02
Channels
- # announcements (12)
- # babashka (7)
- # babashka-sci-dev (46)
- # beginners (35)
- # biff (1)
- # calva (4)
- # cider (22)
- # clj-kondo (48)
- # clj-on-windows (4)
- # clojure (132)
- # clojure-europe (161)
- # clojure-germany (1)
- # clojure-nl (2)
- # clojure-uk (5)
- # clojurescript (39)
- # conjure (10)
- # core-typed (1)
- # cursive (48)
- # datalevin (6)
- # datascript (12)
- # datomic (9)
- # emacs (5)
- # events (1)
- # figwheel-main (2)
- # honeysql (7)
- # hyperfiddle (35)
- # improve-getting-started (8)
- # introduce-yourself (4)
- # london-clojurians (1)
- # off-topic (20)
- # podcasts-discuss (1)
- # re-frame (45)
- # reitit (5)
- # releases (2)
- # rum (7)
- # shadow-cljs (20)
- # spacemacs (4)
- # tools-build (58)
- # tools-deps (19)
- # xtdb (56)
Hello everyone đ i'm experiencing one linter problem with the extension... it is not recognizing the simbols defined inside the reagent/with-let function, so it underline every repetition of those symbols in the function... i'm in a mac Monterey. I'm using latest versions for clj-kondo, calva and vscode as well Thanks in advance for any help you could give me! something like this:
@fabriciocozzarolo configuration: {:lint-as {reagent.core/with-let clojure.core/let}}
Perhaps this configuration could be automatically exported by reagent - is there anyone who is maintaining it, in this channel?
that is already in the config file of the .clj-kondo folder in the project... is there another place where i should put it?
No, that should be it. Can you post the config in a gist or so? I suspect there is something wrong there
{:lint-as {reagent.core/with-let clojure.core/let
devcards.core/defcard-rg clojure.test/deftest}
:linters
{:unused-namespace {:level :error
:exclude [day8.re-frame.async-flow-fx]}
:unresolved-var {:exclude [honeysql.helpers
honeysql-postgres.helpers
honeysql.core]}
:consistent-alias
{:level :error
:aliases {backend.app.controller-behaviors.login login-behaviour
backend.app.models.common mc
backend.app.views.common views
clojure.string str
framework.components.session.backend session-backend
frontend.components.actions-panel action-panels
frontend.components.autocomplete auto
frontend.components.buttons buttons
frontend.components.icons icons
frontend.components.toggles toggles
frontend.routing.core routing
honeysql.core sql
honeysql.helpers sqlh
malli.core m
malli.error me
malli.util mu
re-frame.core rf
reagent.core r
reagent.dom rdom}}}}
(ns frontend.pages.assignments.components.positions.view
(:require
["@heroicons/react/solid" :as heroicons]
["react-select" :as rs]
["react-select/creatable" :as rsc]
[clojure.string :as str]
[frontend.components.candidate-name-link :as cn]
[frontend.components.dropdown-menu :as dropdown-menu]
[frontend.components.expander-collapser :as ec]
[frontend.components.expertise :as exp-icon]
[frontend.components.icons :as icons]
[frontend.events.delete-modals :as delete-modal-events]
[frontend.events.positions :as positions-events]
[frontend.events.team-assignments :as assignment-events]
[frontend.events.teams :as teams-events]
[frontend.pages.assignments.components.note :as note]
[frontend.pages.assignments.components.positions.events :as events]
[frontend.pages.assignments.components.positions.subs :as subs]
[frontend.pages.assignments.defines :as defines]
[frontend.pages.assignments.subs :as assignment-view-subs]
[frontend.subs.expertises :as expertises-subs]
[frontend.subs.positions :as positions-subs]
[frontend.subs.team-assignments :as assignments-subs]
[malli.core :as m]
[malli.error :as me]
[malli.util :as mu]
[re-frame.core :as rf]
[reagent.core :as r]
[shared.specs.frankie-domain :as fd]
[shared.time :as time]))
Then I can clone it and try it locally tomorrow. Well, not as is, unless it's already open source, but some project which demonstrates the same error
yeah because i dont know if i can share it.... i will try to reproduce in another one and let you know... thank you very much đ
~/Desktop/clojure/Frankie/src/frontend/pages/assignments/components> clj-kondo --lint positions
positions/events.cljs:1:5: error: Namespace name does not match file name: frontend.pages.assignments.components.positions.events
positions/subs.cljs:1:5: error: Namespace name does not match file name: frontend.pages.assignments.components.positions.subs
positions/view.cljs:1:5: error: Namespace name does not match file name: frontend.pages.assignments.components.positions.view
linting took 339ms, errors: 3, warnings: 0
make sure you open the project in the root folder and the config directory is also in the root folder, in .clj-kondo/config.edn
yeah, sounds like wrong project root, maybe check server logs may help: https://clojure-lsp.io/troubleshooting/
what do you mean with how i open the project in calva?:thinking_face: .clj-kondo folder is in the root folder of the project.... nothing changed there since las 3 months
clojure-lsp used by calva uses the project root that vscode sets, which is the project opened root
is there a special way of opening a project in vscode? y always add the project folder from the explorer to the workspace.... where can i see or modify that root folder you're saying vscode sets?
if you code my-project-root
should be enough, just open your project root as a folder
@fabriciocozzarolo, if it works with opening the project root in a window, but not when adding the project folder to the workspace, then we have a bug in Calva, I think.
Yes, the clojure-lsp button shows a menu from which you can show server info, @fabriciocozzarolo. See if the project root differs in the two scenarios.
yep... it worked opening from the console... and the project-root-uri is different in the 2 windows... is there a way to change it or just drop the workspace and open a new one?
i tried removing that project and a calva error appeared, i clicked on the output log but it took me nowhere
Donât you get a menu for selecting which of the projects? What version of Calva is this?
mm no... when is calva supposed to show a menu? i simply removed the project indicated in project-root-uri to see what happened and the lsp server turned off with the error
i found that when i change the folders order in the workspace the project-root-uri key changes to the project i moved to the top in the explorer and automatically restart the lsp server
and when i move this "Frankie" project (my main project) to the top of the explorer all the linter errors disappear....
that behavior wasn't like that before, because i always had at the top a folder with annotations that i use always in all the workspaces i have
Yes, these things have changed in Calva. Now we explicitly tell clojure-lsp where the project root is, where before it was often undefined for some cases. However, when there are multiple folders, we need a way to determine project root. With the REPL we ask the user. The issue here I think is that for clojure-lsp, we just pick the first workspace folder.
Anyway, I think we can only ask clojure-lsp to analyse one project root. In the case of multiple workspace folders that means we should probably ask the user for the project root, like we do for the REPL connection.
I created an issue to track this. https://github.com/BetterThanTomorrow/calva/issues/1706