aboutcode-org / aboutcode-org/commoncode

The root of the problem is the root: How to get a root at all times in a codebase (or no root at all)

Đang mở
#25 5 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
4
Fork
23
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

The root problem is this:
1. ScanCode TK demands a single root named Resource in a Codebase
2. ScanCode TK creates a fake "virtual_root" name if there is no common root in several scans (--from-json /VirtualCodebases)
3. ScanCode.io does not have a single root for a project (or rather it has one which might be the "codebase" directory, but never reports it.
4. on Windows there is no single root: each "drive" is its own root.
5. on POSIX, there is a single root, but it has no name: this is name only "/" and it can have files and directories as children
6. ScanCode TK and CommonCode generally ignore or even strip a leading slash therefore making the POSIX root moot
7. When you "--strip-root" in ScanCode TK (leaving aside the possible loss of data attached to a root dir) it is potentially problematic to further read this with --from-json because we have no root anymore.
8. Scanning a subset of paths or a collections of path in ScanCode is problematic because of this need for root
9. The Codebase classes expect some sort order when creating Resources which may not make sense in all cases and may be overly restrictive as we cannot predict this sort order at all times
9. Somethings are not entirely clear:
- what is the different between a Codebase and a root Resource?
- why could a Codebase not be just a collection of paths? And why do we even need a root?

We need to define a clean and well spec way to handle this across all projects

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

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đá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.