boot-clj / boot-clj/boot

boot show -u prints :exclusions as a vector of vectors

Open
#635 2 comments 0 reactions 0 assignees View on GitHub
Bug
Dominant language
Clojure
Stars
1.7k
Forks
178
PR merge metrics
No merged PRs in 30d

Description

#### Description

When running `boot show -u`, it prints dependencies with exclusions like this:
```
[com.cemerick/piggieback "0.2.2" :scope "test" :exclusions [[com.google.guava/guava]]]
[com.datomic/datomic-free "0.9.5561.50" :scope "test" :exclusions [[com.google.guava/guava]]]
```
In this output, the `:exclusions` are incorrectly printed as a vector of vectors, where it should really be a vector of symbols.

If the above is copied into `build.boot`, it results in errors like this one (when running `boot pom`):
```
...
clojure.core/seq core.clj: 137
...
boot.pom/pom-xml/iter/fn/fn/iter/fn pom.clj: 103
boot.pom/pom-xml/iter/fn/fn/iter/fn/fn pom.clj: 103
boot.util/extract-ids util.clj: 331
clojure.core/juxt/fn core.clj: 2574
clojure.core/namespace core.clj: 1594
java.lang.ClassCastException: clojure.lang.PersistentVector cannot be cast to clojure.lang.Named
clojure.lang.ExceptionInfo: clojure.lang.PersistentVector cannot be cast to clojure.lang.Named
file: "/var/folders/lv/1_kzb2t55gsbc2r0bcvm418r0000gn/T/boot.user4408150776635283384.clj"
line: 45
```

#### Expected behavior

The expected behavior would be to print dependencies with exclusions such that the exclusions are a vector of symbols:
```
[com.cemerick/piggieback "0.2.2" :scope "test" :exclusions [com.google.guava/guava]]
[com.datomic/datomic-free "0.9.5561.50" :scope "test" :exclusions [com.google.guava/guava]]
```

#### Steps to reproduce

1. Add an outdated dependency with an exclusion to the dependencies in `build.boot`.
2. Run `boot show -u`.

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with an outdated dependency in build.boot by running boot show -u, then inspect the pom.clj and util.clj:331 paths shown in the stack trace. Compare the generated exclusion form with the expected output, and verify that copying it into build.boot allows boot pom to complete without the ClassCastException.

Written by the indexing model from the issue text.

Assessment

Domain
build-system, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.