Skip to content

Migrate to uv build system - #1770

Closed
andrew000 wants to merge 1 commit into
aiogram:dev-3.xfrom
andrew000:hatch-to-uv_build
Closed

andrew000 wants to merge 1 commit into
aiogram:dev-3.xfrom
andrew000:hatch-to-uv_build

Conversation

@andrew000

Copy link
Copy Markdown
Contributor

Description

Migrate to uv build system

Also:

  • Replace Makefile with Justfile
  • Bump deps

@github-actions github-actions Bot added the 3.x Issue or PR for stable 3.x version label Feb 11, 2026
@github-actions

github-actions Bot commented Feb 11, 2026 •

Copy link
Copy Markdown

✔️ Changelog found.

Thank you for adding a description of the changes

@codecov

codecov Bot commented Feb 11, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (49d0784) to head (34528c9).
⚠️ Report is 1 commits behind head on dev-3.x.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           dev-3.x     #1770   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          606       606           
  Lines        14341     14341           
=========================================
  Hits         14341     14341           
Flag Coverage Δ
unittests 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JrooTJunior

Copy link
Copy Markdown
Member
  1. Where can I see a trade-off analysis with a conclusion as to why we need to switch to Justfile? The analysis should include at least the following options: Makefile, Justfile, Taskfile, bash scripts, and possibly a few other known solutions. As the lead developer of this project, I should know why I actually need to install another thing for the same sh... functionality (I use other tools in other projects for the same purposes, but I know why I actually use them).
  2. It is also necessary to add a strong motivation for the reasons for migrating to the new build backend

@andrew000

andrew000 commented Feb 11, 2026 •

Copy link
Copy Markdown
Contributor Author
  1. Where can I see a trade-off analysis with a conclusion as to why we need to switch to Justfile? The analysis should include at least the following options: Makefile, Justfile, Taskfile, bash scripts, and possibly a few other known solutions. As the lead developer of this project, I should know why I actually need to install another thing for the same sh... functionality (I use other tools in other projects for the same purposes, but I know why I actually use them).

    1. It is also necessary to add a strong motivation for the reasons for migrating to the new build backend

Old Makefile was Unix-only and created friction for Windows contributors. Looking at the old file, it used Unix-specific commands like find and rm -rf that don't work on Windows.

Makefile is great on Unix, but terrible on Windows, tab-sensitive syntax is annoying, scary error messages, especially with complex command chains... Just is native cross-platform, has clean syntax, built-in attributes like [unix] to separate recipes running on different OS for example, clear error messages, etc.

Since Aiogram has Windows contributors, Just was the obvious choice. The new Justfile has explicit [windows] and [unix] sections that handle platform differences cleanly.

What about uv_build over hatchling - aiogram already uses uv as project management tool, so why not to use uv's build backend? One tool for everything - deps and building. uv is faster in most operations and saves time in GitHub CI.

It would be cool to gradually rebuild the entire Aiogram ecosystem around uv.

Also

Why not Taskfile

# Taskfile.yml - verbose YAML
tasks:
  lint:
    cmds:
      - uv run ruff format --check --diff {{.package_dir}}
      - uv run ruff check --show-fixes --preview {{.package_dir}} {{.examples_dir}}
      - uv run mypy {{.package_dir}}

# Justfile - cleaner
lint:
    uv run ruff format --check --diff {{ package_dir }}
    uv run ruff check --show-fixes --preview {{ package_dir }} {{ examples_dir }}
    uv run mypy {{ package_dir }}

Why not "bash scripts"

Bash scripts have cross-platform issues - they simply don't work on Windows without WSL/Cygwin.

 - Remove Makefile
 - Add Justfile
 - Bump deps
 - Update .editorconfig
 - Update contributing.rst
 - Add `1770.misc.rst`
 - Reformat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.x Issue or PR for stable 3.x version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants