Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve install environment #1129

Merged
merged 3 commits into from
Sep 19, 2024
Merged

Preserve install environment #1129

merged 3 commits into from
Sep 19, 2024

Commits on Sep 17, 2024

  1. Refactor Package::runtime_environment

    Both recipes and packages have the `install.environment` property, so
    refactor `runtime_environment()` out of the `Package` trait into its own
    trait, then require both `Recipe` and `Package` implement it.
    
    Signed-off-by: J Robert Ray <jrray@jrray.org>
    jrray committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    523943e View commit details
    Browse the repository at this point in the history

Commits on Sep 18, 2024

  1. Create newtype EnvOpList for Vec<EnvOp>

    In order to implement foreign traits for this type.
    
    Signed-off-by: J Robert Ray <jrray@jrray.org>
    jrray committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    0efd339 View commit details
    Browse the repository at this point in the history
  2. Refactor various is_default() methods into IsDefault trait

    Fixes #1081. The bug causing #1081 was in `InstallSpec::is_default` as the
    logic was not updated when the `environment` field was added to the struct
    way back at https://github.com/spkenv/spk/blob/f4899ce1e4ac0634ee95608e322a86a358096d4d/src/api/install_spec.rs#L31
    
    As a guard against this kind of bug in the future, an `IsDefault` trait was
    created and a derive macro created to derive the `is_default` method
    semi-automatically. All existing `is_default` methods have been changed to
    use the trait instead.
    
    Signed-off-by: J Robert Ray <jrray@jrray.org>
    jrray committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    ae9258a View commit details
    Browse the repository at this point in the history