Skip to content

Make Coordinates optional for D01, D02, D03.#47

Merged
hydra merged 1 commit into
masterfrom
optional-coordinates
Jun 30, 2025
Merged

Make Coordinates optional for D01, D02, D03.#47
hydra merged 1 commit into
masterfrom
optional-coordinates

Conversation

@hydra
Copy link
Copy Markdown
Contributor

@hydra hydra commented Jun 30, 2025

Since Operation specifies an Option<CoordinateOffset> it is inconsistent to allow both of these states:

a) Operation::Interpolate { _, Some(CoordinateOffset { x: None, y: None })}
b) Operation::Interpolate { _, None },

  • If a viewer encounters the first state, it should generate a warning.
  • A parser should never generate the first state (a) to begin with and generate (b) instead.

To be consistent, it's now invalid for both Coordinate and CoordinateOffset to have neither X nor Y. Instead, None should be used for the Coordinate or CoordinateOffset instance itself.

  • this answers the long-standing 'should we catch this' question, the answer is YES.

Since `Operation` specifies an `Option<CoordinateOffset>` it is inconsistent to allow both of these states:

a) `Operation::Interpolate { _, Some(CoordinateOffset { x: None, y: None })}`
b) `Operation::Interpolate { _, None },

* If a viewer encounters the first state, it should generate a warning.
* A parser should never generate the first state (a) to begin with and generate (b) instead.

To be consistent, it's now invalid for both Coordinate and CoordinateOffset to have neither X nor Y.  Instead, `None` should be used for the `Coordinate` or `CoordinateOffset` instance itself.

* this answers the long-standing 'should we catch this' question, the answer is YES.
@hydra hydra merged commit d66f0d1 into master Jun 30, 2025
4 checks passed
@hydra hydra deleted the optional-coordinates branch June 30, 2025 08:25
@hydra
Copy link
Copy Markdown
Contributor Author

hydra commented Jun 30, 2025

this PR removes the last outstanding TODO comments in the codebase. 🎉

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

Successfully merging this pull request may close these issues.

1 participant