Skip to content

RUST-1934 Publish internal macros as their own crate #1109

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 6 commits into from
May 22, 2024

Conversation

abr-egn
Copy link
Contributor

@abr-egn abr-egn commented May 21, 2024

RUST-1934

Rust requires that macros be in a crate distinct from where they're used, and cargo doesn't allow crates with internal sub-crates to be published, so published as its own crate it shall be :(

My aim here is for this to be as invisible as possible; the mongodb-internal-macros crate will always have the same version number as the main mongodb crate, and will be published/signed/attested by the same scripts, so unless something goes wrong we won't ever have to think about it.

@abr-egn abr-egn requested a review from kevinAlbs May 21, 2024 18:24
@@ -74,45 +74,53 @@ struct Args {
}

fn main() {
let zero = std::env::current_exe().unwrap();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is unrelated but I got annoyed at having to prepend "../.." to every path.

Copy link
Contributor

@kevinAlbs kevinAlbs left a comment

Choose a reason for hiding this comment

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

LGTM. Noted a possible comment.

@abr-egn abr-egn merged commit d3cc97e into mongodb:main May 22, 2024
9 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants