Skip to content

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

Open
@pombredanne

Description

@pombredanne

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
  10. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions