-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert spdx structs to versioned pkgs #146
Conversation
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
@swinslow @ianling @RishabhBhatnagar wanted to get some feedback on this before i go through the rest and make changes to all the callers. |
Thanks for the PR and a quick refactor to show us your views on how we can modularise versions of the spdx model. I have one concern about this approach. Any changes made in v2_1's file will have to be replicated across v2_2's files as well. Even a structural change will affect both the directories. In general, representing information related to code wrt file-location is not a good idea as extracting and using that data will depend purely on import location and resolution. |
Thanks for taking a look @RishabhBhatnagar !
What are scenarios that you're thinking about with changes? Ah yes, when I was doing this - i was thinking about it in a way of how containerd handles different images and versions. They have an intermediate representation that all versions can be converted to. All functions and helpers would operate on this intermediate representation. That data representation can also be exported to either 2.1/2.2/2.3 structs. This would mean that the Let me know if i'm misunderstanding! |
Looked into this a bit with generics, it currently still doesn't support common field usage - and still unsure if it will be supported in the future.. The release notes currently state:
|
Part 1 of #152, ready for testing and review! |
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
Hi @lumjjb, thanks for all the work here! I've run the tests and it looks like things are passing. Given the scope of this I'd like to go through it just a bit more before merging, just to make sure I understand what is changing. I'll try to do that in the next couple of days. If I don't get to it and if others want to add a +1 here, then I'll go ahead and merge soon thereafter. |
Hi @lumjjb, I've had a chance now to go through the PR. This is excellent! Thanks for all the hard work here. I'm on board with the changes you've proposed. Because of the extent of the impact on users, I'm going to leave this open for a few more days for folks to weigh in on. If there are no objections before next Wednesday (Aug. 3), I'll go ahead and merge this as-is. Thanks again! |
Seeing no complaints, I'm merging this. :) Thanks again @lumjjb! |
This PR converts the structs into their own versioned packages. This organizes them so that they can be used in a more golang idiomatic way. Future work will include creating a common struct representation on the backend that will allow ease of interoperability between versions.
A diff can be done fairly easily (and can be used as a mechanism for creating new versions).
Signed-off-by: Brandon Lum lumjjb@gmail.com