Skip to content

docs: fix references in public docs - #2937

Open
JosephLenton wants to merge 1 commit into
apache:mainfrom
JosephLenton:fix-doc-links
Open

docs: fix references in public docs#2937
JosephLenton wants to merge 1 commit into
apache:mainfrom
JosephLenton:fix-doc-links

Conversation

@JosephLenton

@JosephLenton JosephLenton commented Jul 31, 2026

Copy link
Copy Markdown

Which issue does this PR close?

What changes are included in this PR?

  • Links to external sites are made clickable. This is changing from https://example.com to <https://example.com>.
  • References to internal APIs are removed. The comment is the same, but the doc link is gone.
  • Trailing triple slash opening a code snippet, but never closing it, are removed.

Are these changes tested?

These changes were QA'd by running cargo doc --no-deps.

AI Disclosure

I got Claude to do most of the changes in this PR.

@JosephLenton
JosephLenton marked this pull request as ready for review July 31, 2026 22:02

@dannycjones dannycjones left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for this change, @JosephLenton! I think it's important that we maintain good hygiene on the docs.

I think there's a few things highlighted by the lints where we're better addressing the root cause. For example: types that we thought were public but actually aren't, and need exporting.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think there's something wrong with JoinHandle here. Maybe we should be exporting it rather than removing the references?

What do you think, @CTTY?

Comment on lines -367 to 371
/// Returns [`highest_field_id`].
/// Returns the `highest_field_id`.
#[inline]
pub fn highest_field_id(&self) -> i32 {
self.highest_field_id
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nitpick: I'd rather we describe what this method is returning, rather than referring to internal struct details. It's the reason really why the lint is failing in the first place. In the future, we might not even store this field and instead compute it on-demand.

i.e.

/// Returns the highest field ID assigned in this schema.
#[inline]
pub fn highest_field_id(&self) -> i32 {
    self.highest_field_id
}

The reason for this field is so we can quickly discover the highest field ID, and then start allocating new ones during schema evolution.


impl SnapshotLog {
/// Returns the last updated timestamp as a DateTime<Utc> with millisecond precision
/// Returns the last updated timestamp as a `DateTime<Utc>` with millisecond precision

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is one we can and should link to!

/// the value to
/// [`UpdateSchemaAction::add_column`].
/// optionally combined with the builder's `parent` and `doc` setters via
/// [`AddColumn::builder`], then pass the value to `UpdateSchemaAction::add_column`.

@dannycjones dannycjones Aug 3, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is another place that I think we've got an issue with - we should likely be exporting UpdateSchemaAction properly.

We shouldn't allow library consumers to construct UpdateSchemaAction, but we should export the type so that it's documented and usable (such as storing it in their own struct, should they wish to do so).

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I can see on the docs there are many types made, which aren't publicly shown: https://docs.rs/iceberg/latest/iceberg/transaction/struct.Transaction.html

My own opinion is everything named a public API should also be public. I'll make FastAppendAction, ExpireSnapshotsAction, ReplaceSortOrderAction, UpdateLocationAction, UpdatePropertiesAction, UpdateSchemaAction, UpdateStatisticsAction, and UpgradeFormatVersionAction, all public as well (these are all public items referenced from the Transaction object).

Their constructors are a mix of public and crate constructors. For now @dannycjones should I make them all pub(crate)? This would be the smallest change to the API (given they weren't public before).

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.

Fix current docs build issues

2 participants