-
Notifications
You must be signed in to change notification settings - Fork 46
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
Implement support for pre-extra repositories #73
Comments
…ASH ME) (TriBITS TriBITSPub#73) Now we should be ready to start adding support for pre-extra repos and then most of the code should automatically do the right thing.
…ub#73) * Set up first first unit tests for directly calling TRIBITS_PROJECT_DEFINE_EXTRA_REPOSITORIES(). * Allowed the "REPOTYPE" field to be empty and therefore not have a VC type. * Added variable ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_PREPOSTS and tested for POST only.
…ub#73) * Set up first first unit tests for directly calling TRIBITS_PROJECT_DEFINE_EXTRA_REPOSITORIES(). * Allowed the "REPOTYPE" field to be empty and therefore not have a VC type. * Added variable ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_PREPOSTS and tested for POST only.
…ITS TriBITSPub#73) I also changeed the name of: ${PROJECT_NAME}_EXTRAREPOS_DIR_REPOTYPE_REPOURL_PACKSTAT_CATEGORY to: ${PROJECT_NAME}_EXTRAREPOS_DIR_VCTYPE_REPOURL_PACKSTAT_CATEGORY to be consistent. But I maintain backward compatibility with the name ${PROJECT_NAME}_EXTRAREPOS_DIR_REPOTYPE_REPOURL_PACKSTAT_CATEGORY and issue a deprecated warning.
…iBITS TriBITSPub#73) With just a little refactoring I was able to just use ${PROJECT_NAME}_CHECK_EXTRAREPOS_EXIST and simplify some logic. One variable has to be better than two. It is very confusing otherwise.
…riBITSPub#73) * Added proessing of PREPOSTS to TRIBITS_FILTER_OR_ASSERT_EXTRA_REPOS() * Added beginning of unit tests for TRIBITS_GET_AND_PROCESS_EXTRA_REPOSITORIES_LISTS() which also unit tests TRIBITS_FILTER_OR_ASSERT_EXTRA_REPOS(). Added emtpyFile.cmake to read in as ExtraRepositoriesList.cmake file to avoid having to put extra repos definition into file. * Did some minor reformatting.
…(SQUASH ME) (TriBITS TriBITSPub#73)
…(SQUASH ME) (TriBITS TriBITSPub#73)
…(SQUASH ME) (TriBITS TriBITSPub#73) Macros have numerious namespace problems. You should be explicit about what varibles you are modifying in the caller's environment.
Can simplify logic based on if pre or extra repos are specified. Code should be a little faster too because some if logic is gone.
…extra repos (SQUASH ME) (TriBITS TriBITSPub#73)
…(SQUASH ME) (TriBITS TriBITSPub#73)
…_EXTRA_REPOSITORIES() (SQUASAH ME) (TriBITS TriBITSPub#73) This should support handling of pre-extra repos but that is not tested yet. But this shows that post-extra repos are still handled correctly. Next will come unit tests that check this.
…b#73) This will be used for stronger testing of pre-extra repos.
This test shows that PRE extra repos are read in correctly and their packages are placed in the correct order.
…ME) (TriBITS TriBITSPub#73) This is a nice example and test of an add-on extra repo. This will also be used to demonstrate and test PRE extra repos.
… (TriBITS TriBITSPub#73) This pulls in TribitsExampleProject as a PRE extra repo. This was super easy to do!
…ASH ME) (TriBITS TriBITSPub#73) Now we should be ready to start adding support for pre-extra repos and then most of the code should automatically do the right thing.
…ub#73) * Set up first first unit tests for directly calling TRIBITS_PROJECT_DEFINE_EXTRA_REPOSITORIES(). * Allowed the "REPOTYPE" field to be empty and therefore not have a VC type. * Added variable ${PROJECT_NAME}_ALL_EXTRA_REPOSITORIES_PREPOSTS and tested for POST only.
…ITS TriBITSPub#73) I also changeed the name of: ${PROJECT_NAME}_EXTRAREPOS_DIR_REPOTYPE_REPOURL_PACKSTAT_CATEGORY to: ${PROJECT_NAME}_EXTRAREPOS_DIR_VCTYPE_REPOURL_PACKSTAT_CATEGORY to be consistent. But I maintain backward compatibility with the name ${PROJECT_NAME}_EXTRAREPOS_DIR_REPOTYPE_REPOURL_PACKSTAT_CATEGORY and issue a deprecated warning.
…iBITS TriBITSPub#73) With just a little refactoring I was able to just use ${PROJECT_NAME}_CHECK_EXTRAREPOS_EXIST and simplify some logic. One variable has to be better than two. It is very confusing otherwise.
…riBITSPub#73) * Added proessing of PREPOSTS to TRIBITS_FILTER_OR_ASSERT_EXTRA_REPOS() * Added beginning of unit tests for TRIBITS_GET_AND_PROCESS_EXTRA_REPOSITORIES_LISTS() which also unit tests TRIBITS_FILTER_OR_ASSERT_EXTRA_REPOS(). Added emtpyFile.cmake to read in as ExtraRepositoriesList.cmake file to avoid having to put extra repos definition into file. * Did some minor reformatting.
This test shows that PRE extra repos are read in correctly and their packages are placed in the correct order.
…ME) (TriBITS TriBITSPub#73) This is a nice example and test of an add-on extra repo. This will also be used to demonstrate and test PRE extra repos.
… (TriBITS TriBITSPub#73) This pulls in TribitsExampleProject as a PRE extra repo. This was super easy to do!
… (TriBITS TriBITSPub#73) I was also able to remove some uneeded code.
…) (TriBITS TriBITSPub#73) Mostly changed: - "Reading a list of extra packages" to "Reading list of PRE/POST extra packages" - "Reading a list of extra TPLs" to "Reading list of PRE/POST extra TPLs" - "Reading the list of packages" to "Reading list of native packages" - "Reading the list of TPLs" to "Reading list of native TPLs" More helpful and correct.
…pos.py (SQUASH ME) (TriBITS TriBITSPub#73)
… ME) (TriBITS TriBITSPub#73) This test just shows that PRE extra repos specified in the extra-repos file seen to be getting processed correctly. That is, the git operations seem to be getting called correctly and the package in the PRE extra repo seems to be getting added in the correct order.
Okay, I think I have about all of the features for PRE extra repos that we need to support the majority of functionality in TriBITS (see detailed notes below). All of the changes are on a branch Now I am going to try to get MPACT using the ExtraRepositoriesList.cmake file and set up to use the checkin-test.py script. I will track that work in the PHI Kanban ticket 3708. Once I am finished getting MPACT fixed up on a branch, I will:
After that, we need to push the updated MPACT changes to the master MPACT branches. Detailed Notes: Here is my idea for the user interface design:
Internally, TriBITS currently stores the variables:
The rules for how these variables work is described here and here. So it looks like there is a lot of code in TriBITS that directly processes
Before I can decide how to implement this internally, I need to see exactly how To accommodate this implementation, I might consider adding the variables:
Then much of the code that currently loops through and we would change the names of the properties variables from Now, back to studying how So, for the
It think this is as easy as changing from Now the file:
takes in The file:
really just loops over Now for the file:
This file obviously needs more changes. But really, it just needs to read the 2-D array and populate Finally, there is the file:
So there are several places in this file where it is going to need to use
That does not look too bad to me. Now for the plan. How to go about implementing this? 1) Add the new variable Get all of the TriBITS tests working at the end. Here is the plan:
Refactor ToDos:
ToDos:
|
…SPub#73) This is to allow usage in ExtraRepositoriesList.cmake files!
This is big commit. There is a lot of refactorings to TriBITS to support pre-extra repos. This adds support for TriBITS Core. Support for CI Support and the CTest Driver will come later. Also, more documentation is needed. This commit changes the names of a bunch of internal variables but it should not break backward compatibility seen by customer projects or users. Some more specific changes/refactorings/additions include: 1) Replaced PACKSTAT with HASPKGS, REPOTYPE with VCTYPE: The new names are more accurate and less confusing. Now, 'PACKSTAT' is used for the field in the 2D array that provides the HASPKS and PREPOST fields. The term 'REPOTYPE' is not clear. The term 'VCTYPE' is clear and is what this field is used for. To go with this, I also changeed the name of: ${PROJECT_NAME}_EXTRAREPOS_DIR_REPOTYPE_REPOURL_PACKSTAT_CATEGORY to: ${PROJECT_NAME}_EXTRAREPOS_DIR_VCTYPE_REPOURL_PACKSTAT_CATEGORY to be consistent. But I maintain backward compatibility with the name ${PROJECT_NAME}_EXTRAREPOS_DIR_REPOTYPE_REPOURL_PACKSTAT_CATEGORY and issue a deprecated warning. 2) Got rid of <Project>_NO_CHECK_FOR_MISSING_EXTRA_REPOS: With just a little refactoring I was able to just use ${PROJECT_NAME}_CHECK_EXTRAREPOS_EXIST and simplify some logic. One variable has to be better than two. It is very confusing otherwise. 3) Added TRIBITS_PARSE_EXTRAREPO_PACKSTAT() and unit tests: This is not a user function but it makes it nice to unit test. 4) Changed TRIBITS_FILTER_OR_ASSERT_EXTRA_REPOS() from macro to function: Macros have numerious namespace problems. You should be explicit about what varibles you are modifying in the caller's environment. 5) Print PRE/POST when adding extra repos: This is used be used for stronger testing of pre-extra repos and just provides more detail.
…73) This is a nice example and test of an add-on extra repo. This will also be used to demonstrate and test PRE extra repos.
This pulls in TribitsExampleProject as a PRE extra repo. This was super easy to do!
I was also able to remove some uneeded code.
Mostly changed: - "Reading a list of extra packages" to "Reading list of PRE/POST extra packages" - "Reading a list of extra TPLs" to "Reading list of PRE/POST extra TPLs" - "Reading the list of packages" to "Reading list of native packages" - "Reading the list of TPLs" to "Reading list of native TPLs" More helpful and correct.
This pulls in TribitsExampleProject and TribitsExampleProjectAddons as extra repos.
…#73) This test just shows that PRE extra repos specified in the extra-repos file seen to be getting processed correctly. That is, the git operations seem to be getting called correctly and the package in the PRE extra repo seems to be getting added in the correct order.
This is to allow usage in ExtraRepositoriesList.cmake files!
With the branch pre_extra_repos_73 now merged in to 'master' through the merge commits:
This issue is now resolved. MPACT changes have already been made on a branch to take advantage of this and it seems to be working perfectly. |
Closing and deployed. |
More documentation will be needed in the developers guide but this is enough for now.
This is needed to fix the 'make dashboard' target. After the refactoring in TriBITS #73, the 'make dashboard' target was broken. It was only processing the first POST extra repo. This was due to the code not splitting the list of extra repos coming from the 'make dashboard' target correctly. We don't have any direct 'make dashboard' tests but I was able to add tests for the TribitsCTestDriverCore.cmake file that exposed the defect and fix the problem. The fix was a simple split of the lists. I also improved the printout of the ignore of NOPACKAGES repos a little. Build/Test Cases Summary Enabled Packages: TriBITS, CTeuchos, ForTeuchos 0) MPI_RELEASE_DEBUG_SHARED => passed: passed=202,notpassed=0 (3.99 min)
…_DEPRECATED_MSG (TriBITSPub#73) This is the problem with the lower_case_cmake.py tool. If there is non-CMake code in these files, then they will get treated like CMake code and the pattern '<identifier>(' will get lower-cased.
…_DEPRECATED_MSG (TriBITSPub#73) This is the problem with the lower_case_cmake.py tool. If there is non-CMake code in these files, then they will get treated like CMake code and the pattern '<identifier>(' will get lower-cased.
The TriBITS projects SCALE/Exnihilo and MPACT need support for pre-extra repositories. Currently, they are pulling in upstream Trilinos packages using the NativeRepositoriesList.cmake file. That file is a hack and needs to disappear. Instead, projects should just use ExtraRepositoriesList.cmake. Also, pulling in TPLs built as packages (see #63) will require support for pre-extra repositories. This needs to be added to all parts of the TriBITS system that currently supports (post) extra repositories. This includes the basic CMake configure, the
checkin-test.py
script, and the code inTribitsCTestDriverCore.cmake
.The first decision that I have to make is how to handle pre-extra repositories. One approach is to develop completely separate data-structures and list for pre- and post-extra repositories. The other approach is to try to combine them in the
ExtraRepositoriesList.cmake
file and in other parts of the scripts. Note that the repository handling incheckin-test.py
andTribitsCTestDriverCore.cmake
does not care if a git repo is pre or post, it just does git pull, push, etc. It just needs to differentiate them once it passes them to the inner TriBITS CMake configure so that it can define and process the packages in the right order. This will be taken into consideration in the design of the user interfaces and the implementation.The text was updated successfully, but these errors were encountered: