Skip to content

feat(stackable-versioned): Re-emit and merge modules in versioned modules #971

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

Merged
merged 9 commits into from
Feb 28, 2025

Conversation

Techassi
Copy link
Member

@Techassi Techassi commented Feb 27, 2025

Part of stackabletech/issues#642

This PR allows users to define modules in the versioned module, which allows composition of imports which then produces easier to consume imports in downstream code.

Example

// In crate/crd/mod.rs

#[versioned(
    version(name = "v1alpha1"),
    version(name = "v1")
)]
mod versioned {
    mod v1alpha1 {
        pub use crate::crd::oidc::v1alpha1::*
        pub use crate::crd::tls::v1alpha1::*
    }

    struct Foo {
        bar: usize,
    }
}

@Techassi Techassi self-assigned this Feb 27, 2025
@Techassi Techassi moved this to Development: In Progress in Stackable Engineering Feb 27, 2025
@Techassi Techassi marked this pull request as ready for review February 28, 2025 12:16
@Techassi Techassi moved this from Development: In Progress to Development: Waiting for Review in Stackable Engineering Feb 28, 2025
@NickLarsenNZ NickLarsenNZ self-requested a review February 28, 2025 12:17
@NickLarsenNZ NickLarsenNZ moved this from Development: Waiting for Review to Development: In Review in Stackable Engineering Feb 28, 2025
NickLarsenNZ
NickLarsenNZ previously approved these changes Feb 28, 2025
Copy link
Member

@NickLarsenNZ NickLarsenNZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I'll leave it up to you if you introduce the error handling now or later (which will technically be a breaking change).

Copy link
Member

@NickLarsenNZ NickLarsenNZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Techassi Techassi added this pull request to the merge queue Feb 28, 2025
@Techassi Techassi moved this from Development: In Review to Development: Done in Stackable Engineering Feb 28, 2025
Merged via the queue into main with commit 207a9f8 Feb 28, 2025
10 checks passed
@Techassi Techassi deleted the feat/stackable-versioned-re-emit-modules branch February 28, 2025 14:04
@lfrancke lfrancke moved this from Development: Done to Done in Stackable Engineering Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants