← Back to issue list

Refactor platform validation

View original Github issue

Metadata

Project
rockcraft
Number
#502
Type
issue
State
open
Author
mr-cal
Labels
Created
2024-03-08 21:48:05+00:00
Updated
2025-08-15 15:12:47+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

### What needs to get done `platform` validation occurs in `rockcraft.models.BuildPlanner` and `rockcraft.models.Project`. This can be combined in `rockcraft.models.Project`. Scope of work: - [ ] move and rework validation code - [ ] adjust unit tests - [ ] adjust types in both models and satisfy the type checkers ### Source It feels that we handle this by defining a platform model separately and let pydantic do the heavylifting of hierarchically validating `platforms` as a list of platform models, isn't that possible? It would reduce the complexity of this validator. _Originally posted by @cmatsuoka in https://github.com/canonical/snapcraft/pull/4630#discussion_r1517943384_ ### Why it needs to get done Code debt

Evaluation history

No evaluation history available.