How do I see what dependencies my project has resolved?

← Getting Started · Ref: Q14

Use `ek9 -Dp -v` to see your resolved dependencies:

  ek9 -Dp -v app.ek9

The `-Dp` flag resolves all dependencies and `-v` (verbose) displays the results. The output shows two sections:

1. Applied: dependencies that passed validation and will be used

   Each shown as `moduleName-version`

2. Not Applied: dependencies that were rejected, with reasons

   Each shown as `moduleName-version(REASON)`

Rejection reasons:

  MANUAL           you explicitly excluded it via excludeDeps
  RATIONALISATION  a higher compatible version was selected instead
  SAME_VERSION     duplicate entry, already included
  OPTIMISED        parent dependency was rejected, so this is orphaned

The resolver also detects and reports:
- Circular dependencies (build fails)
- Semantic version breaches (different MAJOR versions, build fails)

Important: `-Dp` is not read-only. It cleans all build artifacts first, then re-resolves from scratch. Think of it as a fresh dependency lock, not just a query.

There is currently no read-only equivalent of Maven's `mvn dependency:tree` or npm's `npm ls`. The `-Dp -v` operation always performs the full clean-resolve cycle.

Related questions:
- How do I manage dependencies? (Q7)
- How do I exclude transitive dependencies? (Q11)
- What is the difference between a package and a module? (Q13)

See Q7 for managing dependencies. See Q15 for semantic versioning.

Example

defines module qa.getting.started.list.resolved.deps

  defines package

    version as Version: 1.0.0-0
    description as String = "Example showing dependency resolution output"
    license <- "MIT"
    publicAccess <- true

    tags <- [
      "example"
    ]

    applyStandardIncludes <- true

    deps <- {
      "ekopen.network.support.utils": "1.6.1-9",
      "ekopen.net.handy.tools": "3.2.1-0"
    }

    excludeDeps <- {
      "ekopen.some.unwanted.pack": "ekopen.network.support.utils"
    }

  defines program
    ListResolvedDeps()
      stdout <- Stdout()

      stdout.println("Run: ek9 -Dp -v thisFile.ek9")
      stdout.println("To see applied and rejected dependencies")
Other ways to ask this
  • How do I list my resolved dependencies?
  • Is there a dependency tree command in EK9?
  • How do I check which dependency versions were selected?
  • How do I see rejected or excluded dependencies?
  • What is the EK9 equivalent of mvn dependency:tree or npm ls?
  • I use cargo tree to see dependencies, how do I do this in EK9?

Coming from another language?

Java: `mvn dependency:tree` (read-only). npm: `npm ls` (read-only). Rust: `cargo tree` (read-only). Go: `go list -m all` (read-only). pip: `pip list` or `pip freeze`. EK9: `ek9 -Dp -v` combines resolution with display but is not read-only — it cleans and re-resolves.

Keywords: beginner, verbose, start, resolved, list, npm, accepted, rejected, cargo, pip, mvn, intro, maven, first, circular, migrate, dependencies, version, rationalization, tree