GoogleCloudPlatform / GoogleCloudPlatform/cloud-opensource-java

Should ClassPathBuilder.resolve filter out irrelevant artifactproblems?

未關閉
#1,215 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
p3 Tech Debt
主要語言
Java
星號
163
分支
80
PR 合併指標
30 天內沒有已合併 PR

描述

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.

貢獻指南

開啟貢獻指南

研究方向

從 ClassPathBuilder.resolve 開始,追蹤 DependencyGraphBuilder 如何產生 artifactProblems,以及 ClassPathResult 如何將它們公開給呼叫端。比較 issue 中的三個選項,然後將完成定義為:一致地決定哪些問題屬於已解析的類別路徑,並使行為符合該決定。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
java
領域
tooling
Issue 類型
功能
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。