Skip to content

Problems with transitive modules using Deps #2214

@cursive-ghost

Description

@cursive-ghost

Reported by @kennyjwilli in Slack:

I have a single IntelliJ project with multiple modules. Module A depends on library B via a :local/root dependency. Cursive automatically creates/imports library B as a dependent IntelliJ Module.

There are various problems:

  1. I cannot select aliases for project syncing for library B. Normally you can do this by opening the Clojure Deps panel, expanding the project you're interested in, and checking the alias boxes you need. Because Cursive automatically imported library B, it does not appear as a top level item in the Clojure Deps panel and therefore does not have the aliases checkbox. I tried adding library B by doing File > New module from existing sources and selecting library B's deps.edn. This presents the "Import Module from Deps" popup. When I select "OK", I get a message that says "The project is already registered."
  2. The only way to refresh project B is to refresh project A, which transitively refreshes B. This does not automatically happen when B's deps.edn is updated.
  3. In library B, all the deps in the :test alias are never refreshed and therefore all marked as "cannot be resolved". Refreshing A does not cause the changes in B's :test alias to get updated.
  4. When starting a REPL with B as the context module, loading a test file from B into the REPL always causes the error: "Cannot load .clj file into the active REPL. It is not in scope for the module used to start the REPL."

One possible solution would be if project A were automatically updated when project B's deps.edn is modified, as long as the aliases of project B are also updated.

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