uniform sat solving/resolution accross features to form one consistent environment #1817
-
As a developer I want to define shared base dependencies in one feature, and reference it in one or more other environments; I would expect that solving for the dependencies is performed in a holistic/combined way so that even combining feature a + b in environment foo works. However, I realized - see the example, that this assumption is not valid. option 1: 2 packages are combined into one environment via featuresThis fails - why? [dependencies]
python = "3.11"
pip = ">=24.2"
[environments]
step-one = {features = ["fooa", ], solve-group = "xx"}
step-two = {features = [ "foob", "fooa", ], solve-group = "xx"}
[feature.fooa.pypi-dependencies]
dbt-core = ">=1.8.5,<1.9"
[feature.foob.dependencies]
jupyterlab = "~=4.2.4"
[project]
name = "foo"
version = "1.0.0"
description = "bar"
authors = [
"baz"
]
platforms = ["linux-64","osx-arm64"]
channels = ["conda-forge"]
error log:
option 2 - minimal change same environment
This works! The following (observe only the minimal change moving the dependency up to the same feature -- works just fine [dependencies]
python = "3.11"
pip = ">=24.2"
[environments]
step-one = {features = ["fooa", ], solve-group = "xx"}
step-two = {features = [ "foob", "fooa", ], solve-group = "xx"}
[feature.fooa.pypi-dependencies]
dbt-core = ">=1.8.5,<1.9"
jupyterlab = "~=4.2.4"
[feature.foob.dependencies]
[project]
name = "foo"
version = "1.0.0"
description = "bar"
authors = [
"baz"
]
platforms = ["linux-64","osx-arm64"]
channels = ["conda-forge"]
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Observation - even moving one package to the default dependencies - does not fix the issue. How can this be? The default one is included in solving the feature/environment by default? And why does it work if they sit both in the same environment [dependencies]
python = "3.11"
pip = ">=24.2"
[pypi-dependencies]
dbt-core = ">=1.8.5,<1.9"
[environments]
step-one = {features = ["fooa", ], solve-group = "xx"}
step-two = {features = [ "fooa", "foob", ], solve-group = "xy"}
[feature.fooa.pypi-dependencies]
[feature.foob.dependencies]
jupyterlab = "~=4.2.4"
[project]
name = "foo"
version = "1.0.0"
description = "bar"
authors = [
"baz"
]
platforms = ["linux-64","osx-arm64"]
channels = ["conda-forge"]
|
Beta Was this translation helpful? Give feedback.
-
The problem lays with the For your example, you had Putting both dependencies in I hope this explains it. |
Beta Was this translation helpful? Give feedback.
You can help yourself and the community by putting the packages you require from
pypi
onconda-forge
which will avoid this problem.