Skip to content

Commit

Permalink
[workspace] Deprecate the petsc external (#19890)
Browse files Browse the repository at this point in the history
We anticipate no longer using this soon, so it's time to start the
clock for its removal.
  • Loading branch information
jwnimmer-tri authored Jul 31, 2023
1 parent ab489de commit eb31832
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion multibody/fem/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ drake_cc_library(
],
deps = [
"//common:unused",
"@petsc",
"@petsc//:petsc_nowarn",
],
)

Expand Down
2 changes: 2 additions & 0 deletions tools/workspace/default.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ def add_default_repositories(excludes = [], mirrors = DEFAULT_MIRRORS):
if "osqp_internal" not in excludes:
osqp_internal_repository(name = "osqp_internal", mirrors = mirrors)
if "petsc" not in excludes:
# The @petsc external is deprecated in Drake's WORKSPACE and will be
# removed on or after 2023-11-01.
petsc_repository(name = "petsc", mirrors = mirrors)
if "picosha2" not in excludes:
picosha2_repository(name = "picosha2", mirrors = mirrors)
Expand Down
8 changes: 8 additions & 0 deletions tools/workspace/petsc/package.BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,14 @@ cc_library(
"@drake//tools/workspace/petsc:stubs",
],
visibility = ["//visibility:public"],
deprecation = "The @petsc external is deprecated in Drake's WORKSPACE and will be removed on or after 2023-11-01.", # noqa
)

# An alias that avoids the deprecation warning (for Drake's internal use only).
cc_library(
name = "petsc_nowarn",
deps = [":petsc"],
visibility = ["//visibility:public"],
)

genrule(
Expand Down
3 changes: 3 additions & 0 deletions tools/workspace/petsc/repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ load("@drake//tools/workspace:github.bzl", "github_archive")
def petsc_repository(
name,
mirrors = None):
"""The @petsc external is deprecated in Drake's WORKSPACE and will be
removed on or after 2023-11-01.
"""
github_archive(
name = name,
repository = "petsc/petsc",
Expand Down

0 comments on commit eb31832

Please sign in to comment.