Better data type for Linkage Errors and Artifact Problems?
@elharo says:
I still think we're missing an abstraction here. We have problems of which there are several subtypes including missing artifacts and linkage errors. The linkage errors we don't have a class for. Instead we're storing them as an entry in the multimap.
https://github.com/GoogleCloudPlatform/cloud-opensource-java/pull/1135/files/a2dc1f7d9cd2ff0950b2c4d01e5b80c2018d52f5#r367607402
As of now
- Linkage errors are represented as
Multimap<SymbolProblem, ClassFile>Many-to-many relationship between SymbolProblem and ClassFile. - Artifact Problems are represented as
ArtifactProblemExample: non-resolvable artifacts in a dependency tree, when constructing a class path.
I'm beginning to think a lot of the confusion is because we expose a lot of implementation detail in our APIs. E.g. all these multimaps and listmultimaps and the like. I suspect we need clearer, more domain specific types. In fact, I think we can reduce all of this to two basic types: a dependency graph and an annotated classpath that links entries back to the maven dependency graph.