Skip to content

Conversation

dblnz
Copy link
Contributor

@dblnz dblnz commented Jul 25, 2025

To be able to use the tracing functionality as a dependency for a guest, we need to publish the crates.
It would be best if we could only publish one crate: hyperlight-guest-tracing.

This PR re-exports the macros in the hyperlight-guest-tracing crate from hyperlight-guest-tracing-macro crate so the users don't need to have two dependencies.

TODO: Need to publish the crate when releasing.

@dblnz dblnz self-assigned this Jul 25, 2025
@dblnz dblnz added the kind/enhancement For PRs adding features, improving functionality, docs, tests, etc. label Jul 25, 2025
Copy link
Contributor

@simongdavies simongdavies left a comment

Choose a reason for hiding this comment

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

Why is macros optional? What are the circumstances where I would use tracing and not macros?

@dblnz dblnz force-pushed the guest-tracing-crates-improvements branch 2 times, most recently from bf1069b to 365c8ac Compare July 30, 2025 14:58
@dblnz dblnz force-pushed the guest-tracing-crates-improvements branch from 365c8ac to 330dca0 Compare July 30, 2025 15:02
@dblnz dblnz changed the title Add macros feature to hyperlight_guest_tracing to prepare for publishing the crate Re-export macros in hyperlight_guest_tracing Jul 30, 2025
@dblnz dblnz merged commit 06267cd into hyperlight-dev:main Jul 31, 2025
33 checks passed
Copy link
Contributor

@jprendes jprendes left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines -107 to -109
if lit_str.value().is_empty() {
return Err(input.error("trace message must not be empty"));
}
Copy link
Contributor

Choose a reason for hiding this comment

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

question: Where did the "trace message must not be empty" check move to?

@jprendes
Copy link
Contributor

It would be best if we could only publish one crate: hyperlight-guest-tracing.

We would still need to publish both, as hyperlight-guest-tracing depends on hyperlight-guest-tracing-macros and you can't have unpublished dependencies in crates.io

@dblnz dblnz deleted the guest-tracing-crates-improvements branch July 31, 2025 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement For PRs adding features, improving functionality, docs, tests, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants