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

ref: Use wildcard re-exports where applicable #1526

Merged
merged 2 commits into from
Oct 25, 2022
Merged

Conversation

jan-auer
Copy link
Member

In some cases, we export the entire public API of a module via the containing
parent module. The internal module structure is supposed to be an implementation
detail for code organization but does not matter to the public API. An example
for this is the Event protocol.

In most cases, we use wildcard exports pub use module::* for this. The
relay-general crate did not do this. With modern tooling and code search, it
is now equally easy to locate types. The benefit of using a wildcard export is
that we cannot forget to re-export types that would be then missing from the
public signature.

#skip-changelog

@jan-auer jan-auer requested a review from a team October 13, 2022 08:50
Copy link
Member

@jjbayer jjbayer left a comment

Choose a reason for hiding this comment

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

LGTM!

#[doc(inline)]
pub use relay_common::{
CustomUnit, DurationUnit, FractionUnit, InformationUnit, MetricUnit, ParseMetricUnitError,
UnixTimestamp,
Copy link
Member

Choose a reason for hiding this comment

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

Was there a reason this was not under #[doc(inline)] before?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think so, looks like an oversight.

Copy link
Contributor

@olksdr olksdr left a comment

Choose a reason for hiding this comment

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

:shipit:

@jan-auer jan-auer enabled auto-merge (squash) October 13, 2022 09:17
* master:
  release: 0.8.15
  fix(py): Respect the renormalize flag (#1548)
  (fix)e2e: Use report self hosted issues env variable (#1539)
  meta(vscode): Enable all features in Rust-Analyzer (#1542)
  release: 0.8.14
  build(craft): Fix manylinux artifact name (#1547)
  feat(quotas): New data category for indexed transactions (#1535)
  test(auth): Unflake re_auth_failure (#1531)
  replays: add warning log for parse errors (#1534)
  fix(server): Retain valid cached project states on error (#1426)
  feat(protocol): Implement response context schema (#1529)
  feat(replays): emit org_id on recording kafka messages (#1528)
  feat: Add .NET/Portable-PDB specific protocol fields (#1518)
  feat(quotas): Enforce rate limits on metrics buckets (#1515)
  ref(pii): Consider all token as sensitive [INGEST-1550] (#1527)
  release: 22.10.0
@jan-auer jan-auer merged commit c482049 into master Oct 25, 2022
@jan-auer jan-auer deleted the ref/wildcard-reexport branch October 25, 2022 19:08
jan-auer added a commit that referenced this pull request Oct 25, 2022
* master:
  fix(gha): Skip Sentry integration tests on library release builds (#1550)
  ref: Use wildcard re-exports where applicable (#1526)
  ci(gha): Skip Sentry integration tests on library release builds (#1549)
  release: 0.8.15
  fix(py): Respect the renormalize flag (#1548)
  (fix)e2e: Use report self hosted issues env variable (#1539)
  meta(vscode): Enable all features in Rust-Analyzer (#1542)
  release: 0.8.14
  build(craft): Fix manylinux artifact name (#1547)
jan-auer added a commit that referenced this pull request Oct 27, 2022
* master:
  feat(quotas): Separate processing and indexing quotas (#1537)
  feat(replays): Adjust replay parser to be less strict and allow for larger segment-ids (#1551)
  fix(gha): Skip Sentry integration tests on library release builds (#1550)
  ref: Use wildcard re-exports where applicable (#1526)
  ci(gha): Skip Sentry integration tests on library release builds (#1549)
  release: 0.8.15
  fix(py): Respect the renormalize flag (#1548)
  (fix)e2e: Use report self hosted issues env variable (#1539)
  meta(vscode): Enable all features in Rust-Analyzer (#1542)
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.

3 participants