Fork me on GitHub
#calva
<
2020-12-07
>
practicalli-johnny19:12:20

I'd like to jack-in to a Clojure project using the user-wide configuration for Clojure CLI tools. I created a calva.replConnectSequences configuration in settings.json but in the terminal Task - Calva Jack-in output it says WARNING: Specified aliases are undeclared: [:inspect/portal-clj] Did I miss a step to tell Calva about my ~/.clojure/deps.edn aliases?

"calva.replConnectSequences": [
        {
            "name": "Inspect Portal",
            "projectType": "Clojure CLI",
            "cljsType": "none",
            "menuSelections": {
                "cljAliases": [
                    "env/dev",
                    "inspect/portal-clj"
                ]
            }
        }
    ],

practicalli-johnny19:12:28

Hmm, I think Calva replConnectSequences doesn't like Clojure CLI tools aliases that use kebab case. Is that right? I added the inspect/portal-clj alias to the project deps.edn and the alias still reported as undeclared. Using the alias name :inspect/portal in the project deps.edn file works without issue.

practicalli-johnny19:12:23

Yes, it seems a calva.replConnectSequences configuration in settings.json file does not like aliases in kebab case, like :inspect-portal or :inspect/portal-clj I removed the portal alias from the project deps.edn file and removed the dash in the name of the alias in the ~/.clojure/deps.edn file and the Inspect Portal sequence I created found the aliase.

pez20:12:38

The warning does not come from Calva though…

bringe20:12:29

Hmm.. I cannot reproduce. I tried your scenario as close as I could from what you said. The warning is coming from here in tools.deps: https://github.com/clojure/tools.deps.alpha/blob/b496c199388c5945f328c5d6aaf166a5cc4764d2/src/main/clojure/clojure/tools/deps/alpha/script/make_classpath2.clj#L55

bringe20:12:24

There may be some difference in your system and mine, maybe a difference cli/tools.deps version or something.