Replies: 1 comment 3 replies
-
In the JavaScript ecosystem they are also called scripts, aren't they? At least |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey 👋
I've recently been working on a VS Code extension for PDM and I noticed something: I'm not a fan of the naming of
tool.pdm.scripts
.Thus I open a conversation about renaming it to
tool.pdm.tasks
, feel free to tell me what you think, whether your agree or disagree!Proposal: Rename
tool.pdm.scripts
totool.pdm.tasks
Summary
PDM supports setting "scripts" in
pyproject.toml
file, which are available to run development tasks.However, the name "scripts" can cause confusion with the
project.script
, used for packaging.Furthermore, PDM "scripts" can be commands, shell scripts, python functions or a combination of them, which is more like a task than a script.
I propose to rename
tool.pdm.scripts
totool.pdm.tasks
, which is more consistent with the concept of task in other tools, such as VSCode tasks, or Poe the poet tasks.Pros and Cons
Pros
Cons
Ecosystem impact
Tools reading directly from
pyproject.toml
tool.pdm.scripts
that are not updated may stop working.Apart from this VS Code extension, I'm not aware of tools using it directly.
Retrocompatibility
This change could be made in a retrocompatible way, to make it easier on user.
PDM could support both naming for a little while, so users can migrate their projects and users with different versions of PDM on the same project won't have issues.
I can take the responsibility to update PDM and its documentation to support the change.
Deprecation plan
pyproject.toml
file for N versions.pyproject.toml
file.pyproject.toml
file, it will be renamed to "tool.pdm.tasks" and a warning will be shown.pyproject.toml
file, and "tool.pdm.tasks" is also found, a warning (error?) will be shown.Beta Was this translation helpful? Give feedback.
All reactions