The root of the problem is the root: How to get a root at all times in a codebase (or no root at all)
還沒有人認領這個 Issue。
評估
研究方向
未指定原始檔案或測試。先檢視 Codebase 類別,以及 ScanCode TK --from-json 和 --strip-root 的行為,包括 virtual_root 的處理方式和路徑排序。完成的定義是有一份經過共識並記錄在案的規格,解決 POSIX、Windows、子集和跨專案使用情境下的根語意。
由索引模型根據 Issue 內容生成。
描述
The root problem is this:
- ScanCode TK demands a single root named Resource in a Codebase
- ScanCode TK creates a fake "virtual_root" name if there is no common root in several scans (--from-json /VirtualCodebases)
- 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.
- on Windows there is no single root: each "drive" is its own root.
- 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
- ScanCode TK and CommonCode generally ignore or even strip a leading slash therefore making the POSIX root moot
- 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.
- Scanning a subset of paths or a collections of path in ScanCode is problematic because of this need for root
- 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
- 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
- 主要語言
- Python
- 星號
- 4
- 分支
- 25
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
aboutcode-org/commoncode 的其他 Issue
-
Consider that Resource.parent can be None when removing resources from the codebase可能已有人在做 @Mirochill 於 177 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 62/100
aboutcode-org/commoncode#84 ·
-
Click 8.5.0: omitted boolean flags incorrectly trigger conflicting_options validation可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉
難度 3/5 1-2 天 新手友好度 66/100
aboutcode-org/commoncode#112 ·
-
難度 4/5 3-5 天 新手友好度 35/100
aboutcode-org/commoncode#102 · 1 則留言 ·
-
難度 4/5 3-5 天 新手友好度 45/100
aboutcode-org/commoncode#101 · 1 則留言 ·
-
mass-scan: Create library to collect a whole project version from Software Heritage可能重新可做 @chinyeungli 於 264 天前認領,目前沒有進行中的 PR。 未關閉
aboutcode-org/commoncode#77 · 7 則留言 · 已指派 1 人 ·
查看 aboutcode-org/commoncode 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 76/100
GoogleCloudPlatform/professional-services-data-validator#1899 ·
維護者通常 4 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
mohanraj00/entelos#200 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 68/100
-
sweep
難度 2/5 1-3 小時 新手友好度 85/100
bketelsen/truenas-mcp#77 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 86/100
sandbox-quantum/switch#2163 ·
維護者通常 1 天內回覆