-
Notifications
You must be signed in to change notification settings - Fork 72
Add Submodule Version Check to cmake Configuration #750
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
base: main
Are you sure you want to change the base?
Conversation
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.
I can't help but feel like there ought to be programmatic ways of getting the expected submodule versions that don't require us to have a tracking file committed.
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.
It seems we'd need to update the workflow to always use the script for updating submodules with the changes. I guess the goal is applied the "latest_submodules.py" across all CRT/SDKs? If that's the case we’ll need clear guidance on the new updating submodules workflow.
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.
fix&ship
" • or rerun CMake with commit checks disabled: -DENFORCE_SUBMODULE_VERSIONS=OFF") | ||
endif() | ||
|
||
function(check_submodule_commit name rel_path cmake_sym) |
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.
nit: cmake_sym
is not used, can be removed
Add a check during CMake's configuration phase that determines whether the local submodules are at least the version/commit expected by aws-crt-cpp or later.
This check is done by determining the submodule commits aws-crt-cpp expects and then comparing that commit to the one that is currently actually checked out by submodules in the crt/ folder.
It will fail cmake configuration if it detects a commit that is currently in a submodule folder is older than the one expected. This check can be turned off with -DENFORCE_SUBMODULE_VERSIONS=OFF
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.