oss-review-toolkit / ort

A suite of tools to automate software compliance checks.
https://oss-review-toolkit.org
Apache License 2.0
1.6k stars 309 forks source link

Yarn workspaces: Represent sub-modules as Projects #2162

Closed fviernau closed 6 months ago

fviernau commented 4 years ago

Task: Represent all Yarn worskpace sub-modules by separate Project instances in the AnalyzerResult which would be more consistent with other PackageManagers and maybe overall also better. I'm writing maybe as I'm not sure if the users are interrested in the structure at all assuming it's often times quite fine grained.

Until #2146 there was just an incomplete Yarn workspaces support in place following the approach that only the root project definition file is analyzed. #2146 did not change that approach but made some MVP out of it by adding the construction of a dependency tree so that all dependencies appear properly in the generated reports.

For implementing this ticket, one of the below two givens have to be changed as otherwise it's impossible:

...Making that decision would likely be a good starter for working on this ticket.

Note: It seems that dependency trees may become very large. If the size should turn out to be a problem an option to approach this would be to eliminate redundant subtrees. If such elimination would be done it might become questionable whether exposing submodule structure is reasonable as that would allow exclusion on submodule granularity via e.g. path excludes. If one excludes a subproject containing a deduplicated subtree the effect might not be as desired.

sschuberth commented 1 year ago

@fviernau, is this still an issue with all the workspace-related improvements that we had for Yarn?

sschuberth commented 9 months ago

Task: Represent all Yarn worskpace sub-modules by separate Project instances in the AnalyzerResult

At least for Yarn2 this already seems to be the case, see this expected result:

https://github.com/oss-review-toolkit/ort/blob/46de195fa9a43f0379989ff90e15696d99425ccc/plugins/package-managers/node/src/funTest/assets/projects/synthetic/yarn2-workspaces-expected-output.yml#L2-L44

sschuberth commented 6 months ago

Closed as part of backlog grooming. Feel free to comment if you would like to contribute to this.