Skip to content

Saved task files don't list or check the capabilities their steps need #2818

Done

Description

@jgregoriorincon

Problem

A project, map file, layer file, model or web tool lists in requires each capability that an older RustGIS would lose or misread, and a reader refuses one it doesn't know (docs/maintaining.md, "Saved files and settings"). A task saved on its own does neither: task.save writes the .rgistask file with no requires, and task.import checks none. Models inside a task's steps aren't checked either. docs/maintaining.md records this ("Task, presentation and notebook readers, and models inside a task's steps, don't check requires yet").

So a task step that uses a newer key can run in an older RustGIS without that key, saying nothing. For example, a labels.placement step that sets a position and a weight (#2803) runs there with the position and without the weight; the same holds for a guide. A step that sets only the new key is refused there ("position is required…"), so the loss is silent only when the step also sets a key the older reader knows.

The same task inside a project is covered: the project's requires takes in its tasks' steps (COMMAND_CAPABILITIES in crates/engine/src/project_capabilities.rs).

Proposal

  • task.save writes requires with the capabilities the task's steps need, found the way a project finds them for its tasks.
  • task.import refuses a task that requires a capability it doesn't know, naming it, as the project reader does.
  • Models inside a task's steps are checked the same way.
  • Tasks saved before this have no requires and read as before.
  • docs/maintaining.md drops the task and model exception.

Presentation and notebook readers have the same exception; they could follow in the same change or separately.

Found in review of #2810.

Activity

  1. jgregoriorincon commented on Nov 25, 2026

    @jgregoriorincon
    ContributorAuthor

    I'm taking the writer: task.save lists in requires what the task's steps need, through the same walk a project uses for its tasks, models given inline in a step included. #2867 already added the reader. Presentation and notebook readers stay for a separate change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions