GoogleCloudPlatform / GoogleCloudPlatform/cloud-opensource-java

Should ClassPathBuilder.resolve filter out irrelevant artifactproblems?

Đang mở
#1,215 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
p3 Tech Debt
Ngôn ngữ chính
Java
Star
163
Fork
80
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Should ClassPathBuilder.resolve filter out irrelevant artifactproblems?

https://github.com/GoogleCloudPlatform/cloud-opensource-java/pull/1210/files#r378853356

As of now, it passes the whole artifactproblems from dependencygraphbuilder to the caller. But some of the artifacts are not selected for the resolved class path. Should it filter out such artifactproblems?

```
public ClassPathResult resolve(List artifacts) {
DependencyGraphResult graphResult = DependencyGraphBuilder....

return classPathResult
}
```

```
class ClassPathResult {
private final ImmutableList classPath;

private final ImmutableListMultimap dependencyPaths;

private final ImmutableList artifactProblems;
```

# Options

## Pass all artifact problems to the caller

current implementation. The caller of `resolve` may stop processing even when the artifact problems are only for artifacts that are not selected for `classPath`

## Pass only artifact problems that is related to `classPath`

This sounds reasonable.

## Throw an exception if there is an artifact problem

Because the caller needs the artifact problems to show the error anyway, this makes the caller's code unnecessarily complex.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.