aboutcode-org / aboutcode-org/scancode-toolkit
Add timestamp to licenses and rules to indicate the last change date
- 主要言語
- Python
- スター
- 2.6k
- フォーク
- 791
- 平均マージ
- 1日 12時間
- マージ済み PR(30日)
- 5
説明
## Short Description
Include a timestamp in the licenses and rules as when they were last changed, or when they are added, for possible scan optimization and to aid with debugging.
## Possible Labels
- new feature
## Select Category
- [X] Enhancement
- [ ] Add License/Copyright
- [ ] Scan Feature
- [ ] Packaging
- [ ] Documentation
- [ ] Expand Support
- [X] Other
## **Describe the Update**
It would be good to add a timestamp to the licenses and rules to see when they have been updated/changed. Currently this is not the case, meaning that when looking at old scan results and following the link the links could possibly be out of sync.
Having time stamps have a few practical uses:
* it is easier for debugging if you know which version of a rule someone is looking at (and you can ignore it or say "please update to the latest rule set and try again")
* it makes it easier to skip scans for files in **_specific_** cases and reusing cached results, for example when there is a 100% match. If the rule has changed in any way, then you probably want to rescan.
* it increases reproducibility for scan results. I could see a use for this, for example in legal proceedings (being able to reproduce scan results from an opponent), or academic research (open data sets for conference papers). Of course you could use hashes of files, or Git tags but this might be easier when reasoning about the rules.
I already discussed this with Philippe a bit and he somewhat disagrees with me:
```
be aware of a few things:
1. rules do not live their life in abstraction of other rules, licenses and the backing code.
2. with the exception of adding notes, changing relevance or tagging with required phrases, we treat rules text as immutable. new text means new rule. rule are not deleted ever, only tagged as deprecated
and we do not change the license expression detected by a rule ever
```
I disagree with his disagreement. The exceptions that are mentioned (notes, relevance, required phrases) can be quite significant, because rules to not live their life in abstraction of other rules, licenses and the backing code 🤡
Adding a time stamp and adding it to the scan result would be relatively little effort.
## **How This Feature will help you/your organization**
MOAR SPEED!
## **Possible Solution/Implementation Details**
Add a timestamp (UTC seconds since 1970 so it is easy to compare with the current ruleset?) and include it in the scan result.
コントリビューションガイド
評価
この issue はまだ評価されていません。