frostming / frostming/monas

Notion of version in the case of bumping dependencies

Open
#21 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
77
Forks
3
PR merge metrics
No merged PRs in 30d

Description

Consider the following case of a mono repo:
root `pyproject.toml`
```toml
[tool.monas]
packages = ["monorepo-core", "monorepo-utils", "monorepo-framework"]
version = "0.1.1"
python-version = "3.11"
```
Project Structure:
```
.
├── monorepo-core
│   ├── monorepo_core
│   │   └── __init__.py
│   ├── pyproject.toml
│   └── README.md
├── monorepo-framework
│   ├── monorepo_framework
│   │   └── __init__.py
│   ├── pyproject.toml
│   └── README.md
├── monorepo-utils
│   ├── monorepo_utils
│   │   └── __init__.py
│   ├── pyproject.toml
│   └── README.md
├── pyproject.toml
└── setup.py
```
All of these packages are distributable
`monorepo-framework` depends on `monorepo-core` and `monorepo-utils`

The dependency is added to `monorepo-framework` using the commands:
```
$ monas add monorepo-core==0.1.1 --include monorepo-framework
$ monas add monorepo-utils==0.1.1 --include monorepo-framework
```
This explicit version is used to show that if the version of my monorepo is `x.y.z` all its packages should be at version `x.y.z` and they should depend on siblings with `x.y.z`

The project is bumped from `0.1.1` to `0.1.2` and on reviewing `pyproject.toml` of `monorepo-framework` we get something like:
```toml
[project]
# ...
dependencies = [
"monorepo-core==0.1.1",
"monorepo-utils==0.1.1",
]
# ...
```
The dependencies are still stuck on `0.1.1`. on installation in a project or via pip, version `0.1.2` of `monorepo-framework` would pull `0.1.1` of `monorepo-core` and `monorepo-utils`.

On the other hand if I avoid using explicit version like this:
```
$ monas add monorepo-core --include monorepo-framework
$ monas add monorepo-utils --include monorepo-framework
```
I run into a case where installing `monorepo-framework` using `pip install monorepo-framework==0.1.1` I would pull `monorepo-core==0.1.2`, `monorepo-utils==0.1.2` if `0.1.2` is released, going against the intended setup.

I wanted to know if targeting sibling dependency versioning schemes was a target of monas and what could be done to support my use case of keeping all packages and their interdependencies on the same version

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.