You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Description
Contributes to rapidsai/build-planning#31.
Related to #24.
This proposes the following changes:
* if the file indicated by `dependencies-file` does not exist, emit a
warning
## Notes for Reviewers
### Why add this warning?
While testing rapidsai/cudf#15245, I observed
`rapids-build-backend==0.1.1` failing to update the build dependencies
of wheels.
This showed up with errors like the following:
```text
ERROR: Could not find a version that satisfies the requirement rmm==24.6.* (from versions: 0.0.1)
```
It took me maybe an hour to figure out what was going on.... I wasn't
setting `dependencies-file` in the `[tool.rapids-build-backend]`
configuration.
`cudf` is laid out like this:
```text
cudf/
|___python/
|_____cudf/
|_________pyproject.toml
|_____dask_cudf/
|_________pyproject.toml
```
Not setting `dependencies-file` meant that `rapids-build-backend`
defaulted to `"dependencies.yaml"` (e.g.
`cudf/python/cudf/dependencies.yaml`).
That file doesn't exist, and so it just silently skipped all
`dependencies.yaml`-related stuff via this:
https://github.com/rapidsai/rapids-build-backend/blob/97a19504201f18cfae1864c8be99c1d73cbcc0f9/rapids_build_backend/impls.py#L170-L175
With the warning added in this PR, I would have at least had a hint from
CI logs pointing me at the potential problem.
### ~Why change the default?~
<details><summary>edited: removed (click me)</summary>
`"./dependencies.yaml"` (e.g., `dependencies.yaml` located next to the
wheel's `pyproject.toml`) is not a working default for any RAPIDS
project, as far as I know.
In my experience, most of them are either laid out like `cuml`:
```text
cuml/
|____dependencies.yaml
|____python/
|_____pyproject.toml
```
Or like `rmm`
```text
rmm/
|____dependencies.yaml
|____python/
|_____librmm
|_____pyproject.toml
|_____rmm
|______pyproject.toml
```
See
https://github.com/search?q=%22%5Bproject%5D%22+org%3Arapidsai+path%3Apyproject.toml&type=code.
Changing to `../dependencies.yaml` would at least automatically work for
some projects (like `cuml`) with minimal risk of reaching up outside of
the repo to some other project's `dependencies.yaml` (which would be
more of a risk with, say, `../../dependencies.yaml`.
</details>
### Could we just make this a hard error instead of a warning?
I think we should!
I'd personally support being even stricter at this point in development
and making an existing `dependencies.yaml` file a hard requirement for
running `rapids-build-backend`, meaning:
* no default value for `dependencies-file`
* loud runtime error if the file pointed to by `dependencies-file`
doesn't exist
If we can't think of an existing case that requires running this without
a `dependencies.yaml`, then I think we should implement this stricter
interface. Making something more flexible later is always easier than
making it stricter, and this strictness right now will save some
developer time (e.g. would have saved me some time working on `cudf`
today).
0 commit comments