Skip to content

Commit d937201

Browse files
authored
Merge branch 'develop2' into ar/graph-context-build-only-binary-missmatch-issue
2 parents acb52a1 + a1e0d30 commit d937201

File tree

172 files changed

+1975
-1097
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+1975
-1097
lines changed

.ci/docker/conan-tests

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ENV PY37=3.7.9 \
1717
CMAKE_3_19=/usr/share/cmake-3.19.7/bin/cmake \
1818
CMAKE_3_23=/usr/share/cmake-3.23.5/bin/cmake \
1919
CMAKE_3_27=/usr/share/cmake-3.27.9/bin/cmake \
20-
CMAKE_4_0=/usr/share/cmake-4.0.0-rc3/bin/cmake \
20+
CMAKE_4_2=/usr/share/cmake-4.2.1/bin/cmake \
2121
GCC_9=/usr/bin/gcc-9 \
2222
GXX_9=/usr/bin/g++-9 \
2323
GCC_11=/usr/bin/gcc-11 \
@@ -27,7 +27,7 @@ ENV PY37=3.7.9 \
2727
BAZEL_6=6.5.0 \
2828
BAZEL_7=7.6.2 \
2929
BAZEL_8=8.4.2 \
30-
EMSDK=4.0.10
30+
EMSDK=4.0.22
3131

3232
RUN apt-get update && \
3333
apt-get install -y --no-install-recommends \
@@ -123,15 +123,15 @@ RUN wget https://github.com/Kitware/CMake/releases/download/v3.15.7/cmake-3.15.7
123123
tar -xvzf cmake-3.23.5-Linux-x86_64.tar.gz && mv cmake-3.23.5-linux-x86_64/ /usr/share/cmake-3.23.5 && \
124124
wget https://github.com/Kitware/CMake/releases/download/v3.27.9/cmake-3.27.9-Linux-x86_64.tar.gz && \
125125
tar -xvzf cmake-3.27.9-Linux-x86_64.tar.gz && mv cmake-3.27.9-linux-x86_64/ /usr/share/cmake-3.27.9 && \
126-
wget https://cmake.org/files/v4.0/cmake-4.0.0-rc3-linux-x86_64.tar.gz && \
127-
tar -xvzf cmake-4.0.0-rc3-linux-x86_64.tar.gz && mv cmake-4.0.0-rc3-linux-x86_64/ /usr/share/cmake-4.0.0-rc3 && \
126+
wget https://cmake.org/files/v4.2/cmake-4.2.1-linux-x86_64.tar.gz && \
127+
tar -xvzf cmake-4.2.1-linux-x86_64.tar.gz && mv cmake-4.2.1-linux-x86_64/ /usr/share/cmake-4.2.1 && \
128128
update-alternatives --install /usr/bin/cmake cmake $CMAKE_3_15 10 && \
129129
update-alternatives --install /usr/bin/cmake cmake $CMAKE_3_16 20 && \
130130
update-alternatives --install /usr/bin/cmake cmake $CMAKE_3_17 30 && \
131131
update-alternatives --install /usr/bin/cmake cmake $CMAKE_3_19 40 && \
132132
update-alternatives --install /usr/bin/cmake cmake $CMAKE_3_23 50 && \
133133
update-alternatives --install /usr/bin/cmake cmake $CMAKE_3_27 60 && \
134-
update-alternatives --install /usr/bin/cmake cmake $CMAKE_4_0 70 && \
134+
update-alternatives --install /usr/bin/cmake cmake $CMAKE_4_2 70 && \
135135
# set CMake 3.15 as default
136136
update-alternatives --set cmake $CMAKE_3_15
137137

@@ -175,6 +175,7 @@ RUN cd /tmp && \
175175
wget https://github.com/emscripten-core/emsdk/archive/refs/tags/${EMSDK}.tar.gz && \
176176
tar xzf ${EMSDK}.tar.gz --directory /usr/share && \
177177
cd /usr/share/emsdk-${EMSDK} && \
178+
pyenv local 3.12 && \
178179
./emsdk update && \
179180
./emsdk install latest && \
180181
./emsdk activate latest --permanent && \

.github/workflows/osx-tests.yml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
~/Applications/CMake/3.19.7
5252
~/Applications/CMake/3.23.5
5353
~/Applications/CMake/3.27.9
54-
~/Applications/CMake/4.0.0-rc3
54+
~/Applications/CMake/4.2.1
5555
~/Applications/bazel/6.5.0
5656
~/Applications/bazel/7.6.2
5757
~/Applications/bazel/8.4.2
@@ -80,7 +80,7 @@ jobs:
8080
if: steps.cache-tools.outputs.cache-hit != 'true'
8181
run: |
8282
set -e
83-
CMAKE_PRECOMP_VERSIONS=("3.19.7" "3.23.5" "3.27.9" "4.0.0-rc3")
83+
CMAKE_PRECOMP_VERSIONS=("3.19.7" "3.23.5" "3.27.9" "4.2.1")
8484
for version in "${CMAKE_PRECOMP_VERSIONS[@]}"; do
8585
echo "Downloading and installing precompiled universal CMake version ${version}..."
8686
wget -q --no-check-certificate https://cmake.org/files/v${version%.*}/cmake-${version}-macos-universal.tar.gz
@@ -134,7 +134,7 @@ jobs:
134134
~/Applications/CMake/3.19.7
135135
~/Applications/CMake/3.23.5
136136
~/Applications/CMake/3.27.9
137-
~/Applications/CMake/4.0.0-rc3
137+
~/Applications/CMake/4.2.1
138138
~/Applications/bazel/6.5.0
139139
~/Applications/bazel/7.6.2
140140
~/Applications/bazel/8.4.2
@@ -147,6 +147,18 @@ jobs:
147147
xcrun --sdk macosx --show-sdk-version
148148
clang --version
149149
150+
# Install system dependencies BEFORE setting up the matrix Python.
151+
# This prevents Emscripten (which requires Python 3.10+) from crashing
152+
# when trying to use Python 3.8 from the matrix.
153+
- name: Install homebrew dependencies
154+
run: |
155+
brew update
156+
brew install xcodegen make libtool zlib autoconf automake ninja emscripten
157+
export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin
158+
emcc --version
159+
cmake --version
160+
bazel --version
161+
150162
- name: Set up Python ${{ matrix.python-version }}
151163
uses: actions/setup-python@v5
152164
with:
@@ -160,15 +172,6 @@ jobs:
160172
pip install -r conans/requirements_dev.txt
161173
pip install meson
162174
163-
- name: Install homebrew dependencies
164-
run: |
165-
brew update
166-
brew install xcodegen make libtool zlib autoconf automake ninja emscripten
167-
export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin
168-
emcc --version
169-
cmake --version
170-
bazel --version
171-
172175
- name: Run tests
173176
uses: ./.github/actions/test-coverage
174177
with:

.github/workflows/win-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ jobs:
162162
C:\tools\cmake\3.19.7
163163
C:\tools\cmake\3.23.5
164164
C:\tools\cmake\3.27.9
165-
C:\tools\cmake\4.0.0-rc3
165+
C:\tools\cmake\4.2.1
166166
C:\tools\bazel\6.5.0
167167
C:\tools\bazel\7.6.2
168168
C:\tools\bazel\8.4.2
@@ -171,7 +171,7 @@ jobs:
171171
- name: Install CMake versions
172172
if: steps.cache-tools.outputs.cache-hit != 'true'
173173
run: |
174-
$CMAKE_BUILD_VERSIONS = "3.15.7", "3.19.7", "3.23.5", "3.27.9", "4.0.0-rc3"
174+
$CMAKE_BUILD_VERSIONS = "3.15.7", "3.19.7", "3.23.5", "3.27.9", "4.2.1"
175175
foreach ($version in $CMAKE_BUILD_VERSIONS) {
176176
Write-Host "Downloading CMake version $version for Windows..."
177177
$destination = "C:\tools\cmake\$version"

conan/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
from conan.internal.model.workspace import Workspace
33
from conan.internal.model.version import Version
44

5-
__version__ = '2.24.0-dev'
5+
__version__ = '2.25.0-dev'
66
conan_version = Version(__version__)

conan/api/conan_api.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,16 @@ def __init__(self, cache_folder=None):
7474
self.upload: UploadAPI = UploadAPI(self, self._api_helpers)
7575
#: Used to download recipes and packages from remotes
7676
self.download: DownloadAPI = DownloadAPI(self)
77-
self.cache = CacheAPI(self, self._api_helpers)
78-
self.lockfile = LockfileAPI(self)
77+
#: Used to interact wit the packages storage cache
78+
self.cache: CacheAPI = CacheAPI(self, self._api_helpers)
79+
#: Used to read and manage lockfile files
80+
self.lockfile: LockfileAPI = LockfileAPI(self)
7981
self.local = LocalAPI(self, self._api_helpers)
80-
self.audit = AuditAPI(self)
82+
#: Used to check vulnerabilities of dependencies
83+
self.audit: AuditAPI = AuditAPI(self)
8184
# Now, lazy loading of editables
8285
self.workspace = WorkspaceAPI(self)
83-
self.report = ReportAPI(self, self._api_helpers)
86+
self.report: ReportAPI = ReportAPI(self, self._api_helpers)
8487

8588
@property
8689
def home_folder(self) -> str:

conan/api/model/list.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ def __bool__(self):
203203

204204
def merge(self, other):
205205
assert isinstance(other, PackagesList)
206+
206207
def recursive_dict_update(d, u): # TODO: repeated from conandata.py
207208
for k, v in u.items():
208209
if isinstance(v, dict):

conan/api/output.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -135,17 +135,17 @@ def set_output_level(cls, level):
135135
@classmethod
136136
def valid_log_levels(cls):
137137
return {"quiet": LEVEL_QUIET, # -vquiet 80
138-
"error": LEVEL_ERROR, # -verror 70
139-
"warning": LEVEL_WARNING, # -vwaring 60
140-
"notice": LEVEL_NOTICE, # -vnotice 50
141-
"status": LEVEL_STATUS, # -vstatus 40
142-
None: LEVEL_VERBOSE, # -v 30
143-
"verbose": LEVEL_VERBOSE, # -vverbose 30
144-
"debug": LEVEL_DEBUG, # -vdebug 20
145-
"v": LEVEL_DEBUG, # -vv 20
146-
"trace": LEVEL_TRACE, # -vtrace 10
147-
"vv": LEVEL_TRACE # -vvv 10
148-
}
138+
"error": LEVEL_ERROR, # -verror 70
139+
"warning": LEVEL_WARNING, # -vwaring 60
140+
"notice": LEVEL_NOTICE, # -vnotice 50
141+
"status": LEVEL_STATUS, # -vstatus 40
142+
None: LEVEL_VERBOSE, # -v 30
143+
"verbose": LEVEL_VERBOSE, # -vverbose 30
144+
"debug": LEVEL_DEBUG, # -vdebug 20
145+
"v": LEVEL_DEBUG, # -vv 20
146+
"trace": LEVEL_TRACE, # -vtrace 10
147+
"vv": LEVEL_TRACE # -vvv 10
148+
}
149149

150150
@classmethod
151151
def define_log_level(cls, v):

conan/api/subapi/cache.py

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222

2323

2424
class CacheAPI:
25+
""" This CacheAPI is used to interact with the packages storage cache
26+
"""
2527

2628
def __init__(self, conan_api, api_helpers):
2729
self._conan_api = conan_api
@@ -74,8 +76,9 @@ def package_path(self, pref: PkgReference):
7476
def check_integrity(self, package_list, return_pkg_list=False):
7577
"""
7678
Check if the recipes and packages are corrupted
77-
:parameter package_list: PackagesList to check
78-
:parameter return_pkg_list: If True, return a PackagesList with corrupted artifacts
79+
80+
:param package_list: PackagesList to check
81+
:param return_pkg_list: If True, return a PackagesList with corrupted artifacts
7982
:return: PackagesList with corrupted artifacts if return_pkg_list is True
8083
:raises: ConanExcepcion if there are corrupted artifacts and return_pkg_list is False
8184
"""
@@ -92,6 +95,7 @@ def clean(self, package_list, source=True, build=True, download=True, temp=True,
9295
"""
9396
Remove non critical folders from the cache, like source, build and download (.tgz store)
9497
folders.
98+
9599
:param package_list: the package lists that should be cleaned
96100
:param source: boolean, remove the "source" folder if True
97101
:param build: boolean, remove the "build" folder if True
@@ -138,7 +142,7 @@ def clean(self, package_list, source=True, build=True, download=True, temp=True,
138142
if download:
139143
rmdir(pref_layout.download_package())
140144

141-
def save(self, package_list, tgz_path, no_source=False):
145+
def save(self, package_list: PackagesList, tgz_path, no_source=False) -> None:
142146
global_conf = self._api_helpers.global_conf
143147
cache = PkgCache(self._conan_api.cache_folder, global_conf)
144148
cache_folder = cache.store # Note, this is not the home, but the actual package cache
@@ -191,7 +195,7 @@ def save(self, package_list, tgz_path, no_source=False):
191195
compresslevel, recursive=True)
192196
remove(pkglist_path)
193197

194-
def restore(self, path):
198+
def restore(self, path) -> PackagesList:
195199
if not os.path.isfile(path):
196200
raise ConanException(f"Restore archive doesn't exist in {path}")
197201

@@ -263,11 +267,14 @@ def restore(self, path):
263267

264268
def get_backup_sources(self, package_list=None, exclude=True, only_upload=True):
265269
"""Get list of backup source files currently present in the cache,
266-
either all of them if no argument, or filtered by those belonging to the references in the package_list
267-
268-
@param package_list: a PackagesList object to filter backup files from (The files should have been downloaded form any of the references in the package_list)
269-
@param exclude: if True, exclude the sources that come from URLs present the core.sources:exclude_urls global conf
270-
@param only_upload: if True, only return the files for packages that are set to be uploaded
270+
either all of them if no argument, or filtered by those belonging to the references
271+
in the package_list
272+
273+
:param package_list: a PackagesList object to filter backup files from (The files should
274+
have been downloaded form any of the references in the package_list)
275+
:param exclude: if True, exclude the sources that come from URLs present the
276+
core.sources:exclude_urls global conf
277+
:param only_upload: if True, only return the files for packages that are set to be uploaded
271278
"""
272279
config = self._api_helpers.global_conf
273280
download_cache_path = config.get("core.sources:download_cache")

0 commit comments

Comments
 (0)