You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(Provenance): Add DirectoryProvenance as a LocalProvenance
In contrast to the previously added `RemoteProvenance` stands the
`LocalProvenance`, which has no remote source, but instead references
a local input of some kind.
The `DirectoryProvenance` references a local project directory,
which is lacking supported (remote) version control.
It is defined by its local directory path only.
Since ORT needs further refactoring until `DirectoryProvenance` can
be fully utilized, it the new class can not be used right now.
However the presence of a new `KnownProvenance` class, results in
`when` conditional cases not being exhaustive anymore.
To circumvent this issue, the following changes were made:
1. Whereever possible `RemoteProvenance` is used as parameter type
instead of `KnownProvenance`.
2. When necessary `KnownProvenance`s are cast to `RemoteProvenance`.
3. If `Provenance` is expected, `DirectoryProvenance` is handled
like `UnknownProvenance`.
The excaption being `hash` and `storageKey`, which both default to
an empty string. However, since the rest of the code does not handle
`DirectoryProvenance`, this should not become an issue.
See [1] for more context on the new Provenance Hierarchy.
[1]: oss-review-toolkit#8803 (comment)
Signed-off-by: Jens Keim <[email protected]>
0 commit comments