Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Details
Description
This is a Draft PR showing one approach for how we might reduce code duplication.
A build-config.sh file is created at the repo root which will build the config specified by config path as an argument. The script will then copy into the config any files present in template_config which are not currently present in the config being built. This means that the configs can now be thought of as file level diffs only the files which are different from the template_package are required for the config to be built.
Example usage:
Note that the -d argument is forwarded to the build-image.sh script.
Using this approach over 60 duplicate files were able to be deleted. If this approach is used, then future updates to the build system will be limited to the template_package and ./build-config.sh scripts instead of requiring duplication to other configs.
NOTE: I have not investigated how this approach would work with system releases or automated docker builds further work is needed there before this could be merged. There are also a handlful of file changes in drivers.launch.py which are not part of this PR but I accidently merged from another branch. They can be cleaned up during an actual review.
Related Issue
Motivation and Context
How Has This Been Tested?
Types of changes
Checklist:
CARMA Contributing Guide