-
Notifications
You must be signed in to change notification settings - Fork 15
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
Refactor to remove portions of code that are not used by Chocolatey (CU-ENGTASKS-616) #20
Conversation
cccc170
to
14b5fa6
Compare
I thought this was ready, but I did a spot check of the license files, and all of the expired ones were created with SHA1 (even though they claim to be not SHA1 😂 ). I'll add in the code used to create the files and add some notes to add them to the project in the next few days. |
@gep13 this should be ready for review now. The only issue I've encountered is that I can't launch GUI with my custom build of Chocolatey.lib. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a comment in line that I think we need to address, either to remove it, or add the other numbers. Happy to discuss.
Remove the projects and libraries that are not used anymore.
Remove the license types that Chocolatey doesn't use. This includes Floating and Subscription licenses. Removes validating with a server (subscription). Also removes the license reassertion that's caused issues in the past.
Update to use the new Chocolatey.Cake.Recipe version. Suppress creation of SolutionVersion.cs Update Readme with current information about running tests.
Update tests to split out generation and validation. Created xml files to verify aspects of generation and validation. Updated readme with instructions to generate test license files.
Add a script that will build every project that depend on Rhino.Licensing.
We use the int for the database, this ensures we don't accidentally change that mapping.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@corbob thanks for getting all this pulled together! This will hopefully make the maintenance of this much easier going forward! |
Description Of Changes
Remove code that is not being used in Chocolatey components
Motivation and Context
A line of code removed is a line of code debugged. As well as the need to ensure that we're testing the code as much as possible. Chocolatey can't test the code for sections we don't use.
Testing
This is how I have tested it... This is based upon my development layout where all git repositories are cloned into
C:/code_local
The below scripts don't care about that part, but they do care that every repository is within a single folder.Clone all of the repositories:
This PowerShell script will do a shallow clone of every repository required save for the Rhino.Licensing repository (you must be authenticated to GitLab through https):
Clean Repositories
If you already have all of the repositories cloned down, as long as you're in the master/develop branch you can use this script to clean them all:
BEWARE: This script will delete any files not tracked by the repository, as well as all modified files tracked by the repository.
Build all of the things
In an administrative PowerShell terminal, run the script
./BuildAll.ps1
. This will take upwards of an hour, and will build all components that depend on Rhino.Licensing providing their Chocolatey packages inC:\CodeDrops
Testing all the things
Now comes the actual testing of the things. The testing that I have undertaken up to this point is to build all the things mentioned above. I have also copied all of the packages from
C:\CodeDrops
to a Test Kitchen environment where I have ran the CCM Test kitchen against it with all of the tests.I have also run
choco install chocolateygui chocolateygui-licensed
on that environment and ensured that GUI installs as expected. I am unable to launch GUI with a large message box regarding--allow-unofficial
, but I believe that's related to the custom Chocolatey.Lib.Change Types Made
Related Issue
Fixes #18
Change Checklist