Breaking Changes (Version 20250301)§

Several breaking changes were made as of Makex version 20250301.

These changes are accumulated under a new syntax version (2025). Old makex files are syntax version 2024.

These changes improve Makex, and pave the way for more functionality.

Locators Syntax Change§

Proposal: link.

The syntax for makex locators is reversed.

The previous syntax was {path}:{task_name}. The new syntax is {task_name}[:{path}].

This has implications:

  • The command line:

    • Task names must precede a path; reversing the original syntax.

    • Local Tasks no longer use a : prefix.

  • The task requires list:

    • Any strings in a task’s requires list must be references to Tasks.

    • Local Tasks must have their colon stripped.

    • Remote Tasks must have their name and path reversed.

  • Any execute functions referencing Tasks.

    • Task names must precede a path; reversing the original syntax.

Some examples of how task locators change follows (from -> to) :

"//path/to/task:task_name" -> "task_name://path/to/task"

":task_name" -> "task_name"

"path/to/task:task_name" -> "task_name:path/to/task"

Paths not permitted in the task requirements list§

Proposal: link.

Paths are no longer permitted in the task requirements list.

These paths must be moved to the task inputs list or mapping.

An example of the required changes are below:

Before:

task(
    name="example",
    requires=[
        "path/to/file", # path
        ":some_task", # task
        "path/to/task:task", # task
        glob(...), # path list
    ],
)

After (moving all paths to the inputs argument):

task(
    name="example",
    requires=[  
        "some_task",
        "task:path/to/task",
    ],
    # moved files to inputs argument:
    inputs=[
        "path/to/file",
        glob(...),
    ]
)

Mitigation§

If you don’t want to or can’t migrate specific files yet; add makex(syntax="2024") to the top of the file. This opt-out shall be removed soon. Warnings will be emitted for each file at this version.

To attempt to add this statement to files automatically, run:

makex fix --edit version_2024 path/to/Makexfile

Warning

This will modify the Makex file in place.

See the makex fix command.

To revert the syntax program wide, set the environment variable MAKEX_SYNTAX=2024.

Automatic fixes§

To attempt to automatically evolve and fix a makex file, run:

makex fix --edit version_2025 path/to/Makexfile

Warning

This will modify the Makex file in place.

The issues mentioned in implications will be fixed. If something could not be fixed, an error will be raised.

Files explicitly marked with makex(syntax="2024") will be fixed, and the call will be removed.

NOTE: This automatic fix shall only fix the simplest of cases. Any special expressions in the task requires list may cause an error.

See the makex fix command.