Skip to content

[meta] Feedback from migrating to 2.0 #906

Open

Description

@k88hudson-cfa

I recently looked at migrating some existing code and had some thoughts about the migration (https://github.com/cdcent/cfa-evd-2025-interventions/pull/8)

Higher priority stuff:

  • Split Property/IndexableProperty #909 impl_property! no longer works with f64 since it requires Hash, Eq, which is particularly a problem for structs that contain f64 (e.g., times for things)
  • Make IxaError compatible with anyhow #908 IxaError isn't compatible with anyhow because it doesn't implement Send/Sync
  • IxaError is, in practice, used quite a bit with the string variant: do we want to just add back support, or encourage people to move to defining their own errors/anyhow/something else? (we decided we will leave it but make it compatible with anyhow)
  • Global property validation error should be less specific #910 Global property validation should probably take a more generic error (with Into etc.)

Other things that I thought are worth mentioning but maybe not immediately fixing

  • accessing newtype property values with .0 is not ideal
  • query_result_iterator + collect() does actually have use cases (particularly in reports) (we decided this was acceptable)

Activity

  1. RobertJacobsonCDC commented on May 18, 2026

    @RobertJacobsonCDC
    Contributor

    We changed the error returned by GlobalProperty::validate to be a Box<dyn Error> in #811:

    The fix is to have GlobalProperty::validate return a Box. This error value is then wrapped in IxaError::IllegalGlobalPropertyValue in ixa code like GlobalPropertiesDataContainer::set_global_property_value that consumes and bubbles up these errors. This PR modifies that variant to hold the Box value and the name of the property as a String.

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