From 335ef2b84e1c11e4b2186153bfed3347d46f69ec Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Wed, 6 Feb 2019 13:45:23 +0000 Subject: loadelement.py: Switch from roaringbitmap to pyroaring The licence for roaringbitmap was not compatible. pyroaring is a similar project which is MIT licensed and is slightly better on memory too. Signed-off-by: Daniel Silverstone --- buildstream/_loader/loadelement.py | 6 +++--- requirements/requirements.in | 4 +--- requirements/requirements.txt | 4 +--- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/buildstream/_loader/loadelement.py b/buildstream/_loader/loadelement.py index 465d97f2c..17154ee64 100644 --- a/buildstream/_loader/loadelement.py +++ b/buildstream/_loader/loadelement.py @@ -21,7 +21,7 @@ from collections.abc import Mapping from itertools import count -from roaringbitmap import RoaringBitmap, ImmutableRoaringBitmap # pylint: disable=no-name-in-module +from pyroaring import BitMap, FrozenBitMap # pylint: disable=no-name-in-module # BuildStream toplevel imports from .._exceptions import LoadError, LoadErrorReason @@ -123,7 +123,7 @@ class LoadElement(): if self._dep_cache: return - self._dep_cache = RoaringBitmap() + self._dep_cache = BitMap() for dep in self.dependencies: elt = dep.element @@ -137,7 +137,7 @@ class LoadElement(): # And we depend on everything this element depends on self._dep_cache.update(elt._dep_cache) - self._dep_cache = ImmutableRoaringBitmap(self._dep_cache) + self._dep_cache = FrozenBitMap(self._dep_cache) # _extract_depends_from_node(): diff --git a/requirements/requirements.in b/requirements/requirements.in index 9e55084dc..45e7b8075 100644 --- a/requirements/requirements.in +++ b/requirements/requirements.in @@ -13,6 +13,4 @@ psutil # See issues #571 and #790. ruamel.yaml >= 0.15.41, < 0.15.52 setuptools -# (Potentially) short-term need for roaring bitmaps for the -# loader dependency sorting -roaringbitmap +pyroaring diff --git a/requirements/requirements.txt b/requirements/requirements.txt index fa21c48b7..115879ad9 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -13,9 +13,7 @@ psutil==5.4.8 # See issues #571 and #790. ruamel.yaml==0.15.51 setuptools==39.0.1 -# (Potentially) short-term need for roaring bitmaps for the -# loader dependency sorting -roaringbitmap==0.6 +pyroaring==0.2.6 ## The following requirements were added by pip freeze: MarkupSafe==1.1.0 six==1.12.0 -- cgit v1.2.1 From 8f90be91d3da71394065cdc0814710efba9b6736 Mon Sep 17 00:00:00 2001 From: Benjamin Schubert Date: Wed, 6 Feb 2019 17:26:10 +0000 Subject: Update testing images to include c++ compiler --- .gitlab-ci.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c6b7ddcee..1656c4ac5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: buildstream/testsuite-debian:9-5da27168-32c47d1c +image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-debian:9-master-46405991 cache: key: "$CI_JOB_NAME-" @@ -46,23 +46,23 @@ variables: - .coverage-reports tests-debian-9: - image: buildstream/testsuite-debian:9-5da27168-32c47d1c + image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-debian:9-master-46405991 <<: *tests tests-fedora-27: - image: buildstream/testsuite-fedora:27-5da27168-32c47d1c + image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:27-master-46405991 <<: *tests tests-fedora-28: - image: buildstream/testsuite-fedora:28-5da27168-32c47d1c + image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:28-master-46405991 <<: *tests tests-ubuntu-18.04: - image: buildstream/testsuite-ubuntu:18.04-5da27168-32c47d1c + image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-ubuntu:18.04-master-46405991 <<: *tests tests-python-3.7-stretch: - image: buildstream/testsuite-python:3.7-stretch-a60f0c39 + image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-python:3.7-stretch-master-46405991 <<: *tests variables: @@ -73,10 +73,10 @@ tests-python-3.7-stretch: tests-centos-7.6: <<: *tests - image: buildstream/testsuite-centos:7.6-5da27168-32c47d1c + image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-centos:7.6.1810-master-46405991 overnight-fedora-28-aarch64: - image: buildstream/testsuite-fedora:aarch64-28-5da27168-32c47d1c + image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:aarch64-28-master-46405991 tags: - aarch64 <<: *tests @@ -95,7 +95,7 @@ overnight-fedora-28-aarch64: tests-unix: # Use fedora here, to a) run a test on fedora and b) ensure that we # can get rid of ostree - this is not possible with debian-8 - image: buildstream/testsuite-fedora:27-5da27168-32c47d1c + image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:27-master-46405991 <<: *tests variables: BST_FORCE_BACKEND: "unix" @@ -105,7 +105,7 @@ tests-unix: # We remove the Bubblewrap and OSTree packages here so that we catch any # codepaths that try to use them. Removing OSTree causes fuse-libs to # disappear unless we mark it as user-installed. - - dnf mark install fuse-libs + - dnf mark install fuse-libs systemd-udev - dnf erase -y bubblewrap ostree # Since the unix platform is required to run as root, no user change required @@ -113,14 +113,14 @@ tests-unix: tests-fedora-missing-deps: # Ensure that tests behave nicely while missing bwrap and ostree - image: buildstream/testsuite-fedora:28-5da27168-32c47d1c + image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:28-master-46405991 <<: *tests script: # We remove the Bubblewrap and OSTree packages here so that we catch any # codepaths that try to use them. Removing OSTree causes fuse-libs to # disappear unless we mark it as user-installed. - - dnf mark install fuse-libs + - dnf mark install fuse-libs systemd-udev - dnf erase -y bubblewrap ostree - useradd -Um buildstream @@ -132,7 +132,7 @@ tests-fedora-update-deps: # Check if the tests pass after updating requirements to their latest # allowed version. allow_failure: true - image: buildstream/testsuite-fedora:28-5da27168-32c47d1c + image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:28-master-46405991 <<: *tests script: -- cgit v1.2.1