Issue importing a scancode.io JSON results into VirtualCodebase
還沒有人認領這個 Issue。
評估
研究方向
從 commoncode/resource.py 約第 671 行開始,追蹤 scancode.io JSON 資源如何載入 VirtualCodebase。使用名為 example.zip 和 example.zip-extract 的資源重現 walk() 的情況,然後確認匯入的子項保留這些完整的檔案名稱,且走訪會繼續超過 virtual_root。
由索引模型根據 Issue 內容生成。
描述
We're encountering the issue where we cannot walk a VirtualCodebase created from a scancode.io scan (prior to v31.0.0). When the scan is loaded into VirtualCodebase, and we call walk(), only the virtual_root is returned. This is due to the scancode.io Resource names not containing the extensions. The full filename is required for a VirtualCodebase to work since we keep the filenames of the children of each Resource (https://github.com/nexB/commoncode/blob/main/src/commoncode/resource.py#L671). If the filename isn't the complete filename, then the Resource will never find the child Resource when walking.
For example, in the problematic scan, the two resources at the root have the paths example.zip and example.zip-extract, but their names are both example. When loaded into a VirtualCodebase, the virtual_root has two children, but their names are both example, when it should be example.zip and example.zip-extract. Since virtual_root/example does not exist in resources_by_path of the VirtualCodebase, then we cannot continue the walk.
- 主要語言
- 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 天內回覆