Skip to content

Commit

Permalink
Updates the versions of the following dependencies:
Browse files Browse the repository at this point in the history
  - bazel_skylib
  - google_bazel_common
  - com_google_absl
  - libarchive
  - com_google_googletest

And moves the Python version configuration to test_utils.sh to ensure a consistent Python version is used for testing.

PiperOrigin-RevId: 513359077
  • Loading branch information
aaronnash authored and Copybara-Service committed Mar 1, 2023
1 parent 1d1e718 commit dc5b8bb
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 46 deletions.
6 changes: 3 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ fhir_go_dependencies()
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "google_bazel_common",
sha256 = "18f266d921db1daa2ee9837343938e37fa21e0a8b6a0e43a67eda4c30f62b812",
strip_prefix = "bazel-common-eb5c7e5d6d2c724fe410792c8be9f59130437e4a",
urls = ["https://github.com/google/bazel-common/archive/eb5c7e5d6d2c724fe410792c8be9f59130437e4a.zip"],
sha256 = "e30e092e50c47a38994334dbe42386675cf519a5e86b973e45034323bbdb70a3",
strip_prefix = "bazel-common-a9e1d8efd54cbf27249695b23775b75ca65bb59d",
urls = ["https://github.com/google/bazel-common/archive/a9e1d8efd54cbf27249695b23775b75ca65bb59d.zip"],
)

# Needed for the jarjar_library rule.
Expand Down
96 changes: 66 additions & 30 deletions bazel/buildfiles/libarchive_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/* config.h. Generated from build/cmake/config.h.in by cmake configure */
#define __LIBARCHIVE_CONFIG_H_INCLUDED 1

/*
* Ensure we have C99-style int64_t, etc, all defined.
Expand All @@ -35,14 +36,14 @@
/* #undef HAVE_UNSIGNED___INT64 */

/* The sizes of various standard integer types. */
#define SIZE_OF_SHORT 2
#define SIZE_OF_INT 4
#define SIZE_OF_LONG 8
#define SIZE_OF_LONG_LONG 8
#define SIZE_OF_UNSIGNED_SHORT 2
#define SIZE_OF_UNSIGNED 4
#define SIZE_OF_UNSIGNED_LONG 8
#define SIZE_OF_UNSIGNED_LONG_LONG 8
#define SIZEOF_SHORT 2
#define SIZEOF_INT 4
#define SIZEOF_LONG 8
#define SIZEOF_LONG_LONG 8
#define SIZEOF_UNSIGNED_SHORT 2
#define SIZEOF_UNSIGNED 4
#define SIZEOF_UNSIGNED_LONG 8
#define SIZEOF_UNSIGNED_LONG_LONG 8

/*
* If we lack int64_t, define it to the first of __int64, int, long, and long
Expand All @@ -53,17 +54,17 @@ typedef __int64 int64_t;
#define HAVE_INT64_T
#endif

#if !defined(HAVE_INT64_T) && SIZE_OF_INT == 8
#if !defined(HAVE_INT64_T) && SIZEOF_INT == 8
typedef int int64_t;
#define HAVE_INT64_T
#endif

#if !defined(HAVE_INT64_T) && SIZE_OF_LONG == 8
#if !defined(HAVE_INT64_T) && SIZEOF_LONG == 8
typedef long int64_t;
#define HAVE_INT64_T
#endif

#if !defined(HAVE_INT64_T) && SIZE_OF_LONG_LONG == 8
#if !defined(HAVE_INT64_T) && SIZEOF_LONG_LONG == 8
typedef long long int64_t;
#define HAVE_INT64_T
#endif
Expand All @@ -75,12 +76,12 @@ typedef long long int64_t;
/*
* Similarly for int32_t
*/
#if !defined(HAVE_INT32_T) && SIZE_OF_INT == 4
#if !defined(HAVE_INT32_T) && SIZEOF_INT == 4
typedef int int32_t;
#define HAVE_INT32_T
#endif

#if !defined(HAVE_INT32_T) && SIZE_OF_LONG == 4
#if !defined(HAVE_INT32_T) && SIZEOF_LONG == 4
typedef long int32_t;
#define HAVE_INT32_T
#endif
Expand All @@ -92,12 +93,12 @@ typedef long int32_t;
/*
* Similarly for int16_t
*/
#if !defined(HAVE_INT16_T) && SIZE_OF_INT == 2
#if !defined(HAVE_INT16_T) && SIZEOF_INT == 2
typedef int int16_t;
#define HAVE_INT16_T
#endif

#if !defined(HAVE_INT16_T) && SIZE_OF_SHORT == 2
#if !defined(HAVE_INT16_T) && SIZEOF_SHORT == 2
typedef short int16_t;
#define HAVE_INT16_T
#endif
Expand All @@ -114,17 +115,17 @@ typedef unsigned __int64 uint64_t;
#define HAVE_UINT64_T
#endif

#if !defined(HAVE_UINT64_T) && SIZE_OF_UNSIGNED == 8
#if !defined(HAVE_UINT64_T) && SIZEOF_UNSIGNED == 8
typedef unsigned uint64_t;
#define HAVE_UINT64_T
#endif

#if !defined(HAVE_UINT64_T) && SIZE_OF_UNSIGNED_LONG == 8
#if !defined(HAVE_UINT64_T) && SIZEOF_UNSIGNED_LONG == 8
typedef unsigned long uint64_t;
#define HAVE_UINT64_T
#endif

#if !defined(HAVE_UINT64_T) && SIZE_OF_UNSIGNED_LONG_LONG == 8
#if !defined(HAVE_UINT64_T) && SIZEOF_UNSIGNED_LONG_LONG == 8
typedef unsigned long long uint64_t;
#define HAVE_UINT64_T
#endif
Expand All @@ -136,12 +137,12 @@ typedef unsigned long long uint64_t;
/*
* Similarly for uint32_t
*/
#if !defined(HAVE_UINT32_T) && SIZE_OF_UNSIGNED == 4
#if !defined(HAVE_UINT32_T) && SIZEOF_UNSIGNED == 4
typedef unsigned uint32_t;
#define HAVE_UINT32_T
#endif

#if !defined(HAVE_UINT32_T) && SIZE_OF_UNSIGNED_LONG == 4
#if !defined(HAVE_UINT32_T) && SIZEOF_UNSIGNED_LONG == 4
typedef unsigned long uint32_t;
#define HAVE_UINT32_T
#endif
Expand All @@ -153,12 +154,12 @@ typedef unsigned long uint32_t;
/*
* Similarly for uint16_t
*/
#if !defined(HAVE_UINT16_T) && SIZE_OF_UNSIGNED == 2
#if !defined(HAVE_UINT16_T) && SIZEOF_UNSIGNED == 2
typedef unsigned uint16_t;
#define HAVE_UINT16_T
#endif

#if !defined(HAVE_UINT16_T) && SIZE_OF_UNSIGNED_SHORT == 2
#if !defined(HAVE_UINT16_T) && SIZEOF_UNSIGNED_SHORT == 2
typedef unsigned short uint16_t;
#define HAVE_UINT16_T
#endif
Expand Down Expand Up @@ -327,13 +328,13 @@ typedef uint64_t uintmax_t;
#define ARCHIVE_XATTR_LINUX 1

/* Version number of bsdcpio */
#define BSDCPIO_VERSION_STRING "3.3.3"
#define BSDCPIO_VERSION_STRING "3.6.1"

/* Version number of bsdtar */
#define BSDTAR_VERSION_STRING "3.3.3"
#define BSDTAR_VERSION_STRING "3.6.1"

/* Version number of bsdcat */
#define BSDCAT_VERSION_STRING "3.3.3"
#define BSDCAT_VERSION_STRING "3.6.1"

/* Define to 1 if you have the `acl_create_entry' function. */
/* #undef HAVE_ACL_CREATE_ENTRY */
Expand Down Expand Up @@ -384,7 +385,7 @@ typedef uint64_t uintmax_t;
/* #undef HAVE_BSDXML_H */

/* Define to 1 if you have the <bzlib.h> header file. */
/* #define HAVE_BZLIB_H 1 */
/* #undef HAVE_BZLIB_H */

/* Define to 1 if you have the `chflags' function. */
/* #undef HAVE_CHFLAGS */
Expand Down Expand Up @@ -690,7 +691,13 @@ typedef uint64_t uintmax_t;
/* #undef HAVE_LIBBSDXML */

/* Define to 1 if you have the `bz2' library (-lbz2). */
/* #define HAVE_LIBBZ2 1 */
/* #undef HAVE_LIBBZ2 */

/* Define to 1 if you have the `b2' library (-lb2). */
/* #undef HAVE_LIBB2 */

/* Define to 1 if you have the <blake2.h> header file. */
/* #undef HAVE_BLAKE2_H */

/* Define to 1 if you have the `charset' library (-lcharset). */
/* #undef HAVE_LIBCHARSET */
Expand All @@ -716,6 +723,9 @@ typedef uint64_t uintmax_t;
/* Define to 1 if you have the `lzo2' library (-llzo2). */
/* #undef HAVE_LIBLZO2 */

/* Define to 1 if you have the `mbedcrypto' library (-lmbedcrypto). */
/* #undef HAVE_LIBMBEDCRYPTO */

/* Define to 1 if you have the `nettle' library (-lnettle). */
/* #undef HAVE_LIBNETTLE */

Expand All @@ -740,23 +750,38 @@ typedef uint64_t uintmax_t;
/* Define to 1 if you have the `zstd' library (-lzstd). */
/* #undef HAVE_LIBZSTD */

/* Define to 1 if you have the `zstd' library (-lzstd) with compression
support. */
/* #undef HAVE_LIBZSTD_COMPRESSOR */

/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1

/* Define to 1 if you have the `link' function. */
#define HAVE_LINK 1

/* Define to 1 if you have the `linkat' function. */
#define HAVE_LINKAT 1

/* Define to 1 if you have the <linux/fiemap.h> header file. */
#ifndef MALDOCA_WASM
#define HAVE_LINUX_FIEMAP_H 1
#endif

/* Define to 1 if you have the <linux/fs.h> header file. */
#ifndef MALDOCA_WASM
#define HAVE_LINUX_FS_H 1
#endif

/* Define to 1 if you have the <linux/magic.h> header file. */
#ifndef MALDOCA_WASM
#define HAVE_LINUX_MAGIC_H 1
#endif

/* Define to 1 if you have the <linux/types.h> header file. */
#ifndef MALDOCA_WASM
#define HAVE_LINUX_TYPES_H 1
#endif

/* Define to 1 if you have the `listea' function. */
/* #undef HAVE_LISTEA */
Expand Down Expand Up @@ -892,7 +917,9 @@ typedef uint64_t uintmax_t;
#define HAVE_POLL_H 1

/* Define to 1 if you have the `posix_spawnp' function. */
#ifndef MALDOCA_WASM
#define HAVE_POSIX_SPAWNP 1
#endif

/* Define to 1 if you have the <process.h> header file. */
/* #undef HAVE_PROCESS_H */
Expand Down Expand Up @@ -961,6 +988,9 @@ typedef uint64_t uintmax_t;
/* Define to 1 if you have the `strchr' function. */
#define HAVE_STRCHR 1

/* Define to 1 if you have the `strnlen' function. */
#define HAVE_STRNLEN 1

/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1

Expand Down Expand Up @@ -1116,6 +1146,9 @@ typedef uint64_t uintmax_t;
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1

/* Define to 1 if you have the `unlinkat' function. */
#define HAVE_UNLINKAT 1

/* Define to 1 if you have the `unsetenv' function. */
#define HAVE_UNSETENV 1

Expand Down Expand Up @@ -1209,6 +1242,9 @@ typedef uint64_t uintmax_t;
/* Define to 1 if you have the `_get_timezone' function. */
/* #undef HAVE__GET_TIMEZONE */

/* Define to 1 if you have the `_gmtime64_s' function. */
/* #undef HAVE__GMTIME64_S */

/* Define to 1 if you have the `_localtime64_s' function. */
/* #undef HAVE__LOCALTIME64_S */

Expand All @@ -1219,10 +1255,10 @@ typedef uint64_t uintmax_t;
#define ICONV_CONST

/* Version number of libarchive as a single integer */
#define LIBARCHIVE_VERSION_NUMBER "3003003"
#define LIBARCHIVE_VERSION_NUMBER "3006001"

/* Version number of libarchive */
#define LIBARCHIVE_VERSION_STRING "3.3.3"
#define LIBARCHIVE_VERSION_STRING "3.6.1"

/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
slash. */
Expand Down Expand Up @@ -1276,7 +1312,7 @@ typedef uint64_t uintmax_t;
#endif /* SAFE_TO_DEFINE_EXTENSIONS */

/* Version number of package */
#define VERSION "3.3.3"
#define VERSION "3.6.1"

/* Number of bits in a file offset, on hosts where this is settable. */
/* #undef _FILE_OFFSET_BITS */
Expand Down
23 changes: 11 additions & 12 deletions bazel/dependencies.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ def fhirproto_dependencies(core_lib = False):

http_archive(
name = "com_google_absl",
sha256 = "5ec35586b685eea11f198bb6e75f870e37fde62d15b95a3897c37b2d0bbd9017",
strip_prefix = "abseil-cpp-143a27800eb35f4568b9be51647726281916aac9",
urls = ["https://github.com/abseil/abseil-cpp/archive/143a27800eb35f4568b9be51647726281916aac9.zip"],
sha256 = "61d0af0262a0131bb8917fcb883e5e831ee5ad1535433f2f13f85906d1607f81",
strip_prefix = "abseil-cpp-20230125.1",
urls = ["https://github.com/abseil/abseil-cpp/archive/refs/tags/20230125.1.zip"],
)

http_archive(
Expand Down Expand Up @@ -68,8 +68,8 @@ def fhirproto_dependencies(core_lib = False):

http_archive(
name = "bazel_skylib",
sha256 = "1dde365491125a3db70731e25658dfdd3bc5dbdfd11b840b3e987ecf043c7ca0",
urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/0.9.0/bazel_skylib-0.9.0.tar.gz"],
sha256 = "b8a1527901774180afc798aeb28c4634bdccf19c4d98e7bdd1ce79d1fe9aaad7",
urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/1.4.1/bazel-skylib-1.4.1.tar.gz"],
)

http_archive(
Expand Down Expand Up @@ -116,10 +116,10 @@ def fhirproto_dependencies(core_lib = False):
http_archive(
name = "libarchive",
build_file = main_fhir_location + "//bazel/buildfiles:libarchive.BUILD",
sha256 = "ee1e749213c108cb60d53147f18c31a73d6717d7e3d2481c157e1b34c881ea39",
strip_prefix = "libarchive-3.4.3",
sha256 = "c676146577d989189940f1959d9e3980d28513d74eedfbc6b7f15ea45fe54ee2",
strip_prefix = "libarchive-3.6.1",
urls = [
"https://github.com/libarchive/libarchive/releases/download/v3.4.3/libarchive-3.4.3.tar.gz",
"https://github.com/libarchive/libarchive/releases/download/v3.6.1/libarchive-3.6.1.tar.gz",
],
)

Expand All @@ -145,11 +145,10 @@ def fhirproto_dependencies(core_lib = False):

http_archive(
name = "com_google_googletest",
sha256 = "9dc9157a9a1551ec7a7e43daea9a694a0bb5fb8bec81235d8a1e6ef64c716dcb",
strip_prefix = "googletest-release-1.10.0",
sha256 = "ad7fdba11ea011c1d925b3289cf4af2c66a352e18d4c7264392fead75e919363",
strip_prefix = "googletest-1.13.0",
urls = [
"https://mirror.bazel.build/github.com/google/googletest/archive/release-1.10.0.tar.gz",
"https://github.com/google/googletest/archive/release-1.10.0.tar.gz",
"https://github.com/google/googletest/archive/refs/tags/v1.13.0.tar.gz",
],
)

Expand Down
7 changes: 6 additions & 1 deletion bazel/test_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.

readonly PYTHON_VERSION='3.7.3'
readonly PIP_VERSION='~=21.0.0'
readonly SETUPTOOLS_VERSION='~=56.0.0'

function run_bazel_in_venv {
python3 -m venv venv
eval "$(pyenv init -)"
pyenv install --skip-existing "${PYTHON_VERSION}"
pyenv shell "${PYTHON_VERSION}"

python -m venv venv
source venv/bin/activate
pip install pip"${PIP_VERSION}"
pip install setuptools"${SETUPTOOLS_VERSION}"
Expand Down

0 comments on commit dc5b8bb

Please sign in to comment.