Skip to content

Commit

Permalink
[pipeline] Fix broken intra-doc link of YDBError -> Display
Browse files Browse the repository at this point in the history
**Change**
* Pipeline job `pages` started failing because of the error shown below
  ```
  Found invalid urls in struct.Context.html:
	  Fragment #impl-Display at struct.YDBError.html does not exist!
  ```
* This error is from execution of `cargo deadlinks` command
* This error is due to the fact that implementation of trait `fmt::Display` for `YDBError` was not found at fragment `impl-Display` of `struct.YDBError.html`
* This error started occuring with the `rust version 1.64.0 (a55dd71d5 2022-09-19)` and not before. The previous version as seen in pipeline jobs previous to this failure is `1.63.0 (4b91a6ea7 2022-08-08)`
* When attempted to generate the docs locally it was found that the documentation for `Display` with the new rust version (1.64.0) was seen at fragment `impl-Display-for-YDBError`
* Changing the fragment part in rustdoc solved the issue
* The following pull request seems to have introduced this change to rustdoc rust-lang/rust#98939 (rustdoc: Add more semantic information to impl IDs #98939) and this is the issue on github related to this change -> rust-lang/rust#92052 (rustdoc: Semantically disambiguate impls and associated impl items rather than using numeric suffixes #92052)

**Misc**
* @jsikri94 found another issue where the intra-doc link format was broken. This change also fixed the issue.
  * Previous to this change following line was seen in docs : `ci_t! and cip_t! cip_t!: crate::cip_t! ci_t!: crate::ci_t!`
  * After this change it is replaced by : `ci_t! and cip_t!`
  * The fix was to include an empty line between the intra link and its definition. As it was absent both the lines were being combined into one as seen above in the first sub-point. With the empty line the line seen in docs is fixed and is seen as shown by the second sub-point above.
  • Loading branch information
zylog1O1 committed Sep 29, 2022
1 parent 910b73f commit 686227c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/context_api/call_in.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ impl Context {
/// - [C SimpleAPI documentation](https://docs.yottadb.com/MultiLangProgGuide/cprogram.html#ydb-ci-tab-open-ydb-ci-tab-open-t)
/// - [Call-in interface](https://docs.yottadb.com/ProgrammersGuide/extrout.html#call-in-interface)
/// - [`ci_t!`] and [`cip_t!`]
///
/// [`cip_t!`]: crate::cip_t!
/// [`ci_t!`]: crate::ci_t!
///
Expand Down
2 changes: 1 addition & 1 deletion src/context_api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ impl Context {
/// - [ZMessage codes](https://docs.yottadb.com/MessageRecovery/errormsgref.html#zmessage-codes)
/// - The [C documentation](https://docs.yottadb.com/MultiLangProgGuide/cprogram.html#ydb-message-ydb-message-t)
///
/// [`impl Display`]: YDBError#impl-Display
/// [`impl Display`]: YDBError#impl-Display-for-YDBError
///
/// # Example
/// Look up the error message for an undefined local variable:
Expand Down

0 comments on commit 686227c

Please sign in to comment.