Skip to content

Commit

Permalink
Do not break API but use deprecation warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Jose Luis Rivero <jrivero@osrfoundation.org>
  • Loading branch information
j-rivero committed Jul 29, 2024
1 parent b1e42cf commit b367013
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ros_buildfarm/scripts/ci/build_task_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
from ros_buildfarm.argument import add_argument_install_packages
from ros_buildfarm.argument import add_argument_os_code_name
from ros_buildfarm.argument import add_argument_os_name
from ros_buildfarm.argument import add_argument_require_gpu_support
from ros_buildfarm.argument import add_argument_ros_version
from ros_buildfarm.argument import add_argument_rosdistro_name
from ros_buildfarm.argument import add_argument_run_abichecker
Expand Down Expand Up @@ -60,6 +61,7 @@ def main(argv=sys.argv[1:]):
add_argument_install_packages(parser)
add_argument_ros_version(parser)
add_argument_run_abichecker(parser)
add_argument_require_gpu_support(parser)
add_argument_testing(parser)
parser.add_argument(
'--workspace-root', nargs='+',
Expand All @@ -70,6 +72,12 @@ def main(argv=sys.argv[1:]):
for k, v in remainder_args.items():
setattr(args, k, v)

if args.require_gpu_support:
print(
'WARNING: using the --require-gpu-support argument is deprecated.'
'Can be removed without changing functionality.',
file=sys.stderr)

apt_cache = Cache()

debian_pkg_names = set(['build-essential'])
Expand Down
8 changes: 8 additions & 0 deletions ros_buildfarm/scripts/devel/build_and_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from ros_buildfarm.argument import add_argument_build_tool
from ros_buildfarm.argument import add_argument_build_tool_args
from ros_buildfarm.argument import add_argument_build_tool_test_args
from ros_buildfarm.argument import add_argument_require_gpu_support
from ros_buildfarm.argument import add_argument_ros_version
from ros_buildfarm.argument import extract_multiple_remainders
from ros_buildfarm.common import Scope
Expand Down Expand Up @@ -57,12 +58,19 @@ def main(argv=sys.argv[1:]):
action='store_true',
help='The flag if the workspace should be cleaned after the '
'invocation')
add_argument_require_gpu_support(parser)

remainder_args = extract_multiple_remainders(argv, (a1, a2))
args = parser.parse_args(argv)
for k, v in remainder_args.items():
setattr(args, k, v)

if args.require_gpu_support:
print(
'WARNING: using the --require-gpu-support argument is deprecated.'
'Can be removed without changing functionality.',
file=sys.stderr)

ensure_workspace_exists(args.workspace_root)

if args.clean_before:
Expand Down

0 comments on commit b367013

Please sign in to comment.