Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notion of version in the case of bumping dependencies #21

Open
HuM4NoiD opened this issue Oct 27, 2023 · 0 comments
Open

Notion of version in the case of bumping dependencies #21

HuM4NoiD opened this issue Oct 27, 2023 · 0 comments

Comments

@HuM4NoiD
Copy link
Contributor

Consider the following case of a mono repo:
root pyproject.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:

[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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant