Describe the bug
ExprProfile exposes a small but useful API for "default" profile construction:
ExprRevision::CURRENT — a pub const pointing at the current default revision (today: V2026_02).
ExprProfile::current() — a constructor that builds a profile at ExprRevision::CURRENT with no extensions and no host context. Documented as "Shortcut for ExprProfile::new(ExprRevision::CURRENT)."
ExprProfile::latest() — a constructor that builds a profile at the latest revision with every known extension enabled. Documented as "Intentionally unstable across crate versions."
ModelProfile does not expose any of these, but it should.
Expected Behaviour
ModelProfile should mirror the API shape of ExprProfile:
impl SpecificationRevision {
pub const CURRENT: SpecificationRevision = SpecificationRevision::V2023_09;
}
impl ModelProfile {
/// Shortcut for `ModelProfile::new(SpecificationRevision::CURRENT)`.
pub fn current() -> Self {
Self::new(SpecificationRevision::CURRENT)
}
/// Build a profile with the latest revision and every known
/// model extension enabled.
///
/// **Intentionally unstable across crate versions.** As new
/// extensions are added to `ModelExtension::ALL` and new revisions
/// land at `SpecificationRevision::CURRENT`, the set of enabled
/// features grows. For behavior that is stable across crate
/// versions, construct an explicit profile via
/// `ModelProfile::new(...)` instead.
pub fn latest() -> Self {
let mut p = Self::new(SpecificationRevision::CURRENT);
// populate with all known ModelExtension variants
...
p
}
}
This would let callers write ModelProfile::current() for "the standard default" or ModelProfile::latest() for "everything turned on", matching the established pattern from openjd-expr. The hardcoded V2023_09 literal would live in exactly one place: SpecificationRevision::CURRENT.
Current Behaviour
ModelProfile only offers ModelProfile::new(revision), which requires the caller to name a specific revision.
Describe the bug
ExprProfileexposes a small but useful API for "default" profile construction:ExprRevision::CURRENT— apub constpointing at the current default revision (today:V2026_02).ExprProfile::current()— a constructor that builds a profile atExprRevision::CURRENTwith no extensions and no host context. Documented as "Shortcut forExprProfile::new(ExprRevision::CURRENT)."ExprProfile::latest()— a constructor that builds a profile at the latest revision with every known extension enabled. Documented as "Intentionally unstable across crate versions."ModelProfiledoes not expose any of these, but it should.Expected Behaviour
ModelProfileshould mirror the API shape ofExprProfile:This would let callers write
ModelProfile::current()for "the standard default" orModelProfile::latest()for "everything turned on", matching the established pattern fromopenjd-expr. The hardcodedV2023_09literal would live in exactly one place:SpecificationRevision::CURRENT.Current Behaviour
ModelProfileonly offersModelProfile::new(revision), which requires the caller to name a specific revision.