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

Repeated documentation #388

Closed
chand1012 opened this issue Jun 9, 2022 · 4 comments
Closed

Repeated documentation #388

chand1012 opened this issue Jun 9, 2022 · 4 comments

Comments

@chand1012
Copy link

I'm trying to get my (relatively complicated) project documented using our inline documentation, but I keep getting duplicated documentation throughout. I'm using all default settings, except for I'm using the "pages" generation pattern so that each of my solidity files have a separate markdown file. Here is an example of a simple file.

pragma solidity ^0.8.13;

// SPDX-License-Identifier: GPL-3.0-only

/// @notice used for withdrawals in the vault.
interface IWithdrawer {
	/// @notice called when a user wants to withdraw some AVAX from the vault.
	function receiveWithdrawalAVAX() external payable;
}

And here is the output.

# Solidity API

## IWithdrawer

used for withdrawals in the vault.

### receiveWithdrawalAVAX

```solidity
function receiveWithdrawalAVAX() external payable
```

called when a user wants to withdraw some AVAX from the vault.

## IWithdrawer

### receiveWithdrawalAVAX

```solidity
function receiveWithdrawalAVAX() external payable
```

## IWithdrawer

### receiveWithdrawalAVAX

```solidity
function receiveWithdrawalAVAX() external payable
```

For reference, here is my config within my hardhat.config.js file.

image

@frangio
Copy link
Contributor

frangio commented Jun 23, 2022

Sorry I'm just getting around to this.

I can't reproduce the issue locally with the information you share. If I have a file with the interface it generates docs without duplicates. Can you share a repository where I could reproduce it?

@TomiOhl
Copy link

TomiOhl commented Aug 12, 2022

This is a tricky issue. I currently ran into it for the second time.
First I got it with the hardhat sample project (that I got by creating a new project from terminal). I only modified the Greeter contract slightly. I got rid of it by making a copy of that file - that didn't have the issue for some reason - and deleting the old one.
Now I had it in agoraxyz/guild-gated-contracts. Tried removing the parameters from hardhat config, restarting VSC, deleting npm cache, reinstalling the package etc but nothing helped.
Then I noticed that one of the output files contains a dev tag that I've already deleted an hour ago... I deleted the artifacts and the cache folder created by hardhat and both issues are solved now, including the double documentation.

@adamiak
Copy link

adamiak commented Aug 24, 2022

I can confirm exactly the same issue (repeated documentation in the same file, although the second copy contains older changes). Removing artifacts and cache folders solves it temporarily (until they appear again).

@frangio
Copy link
Contributor

frangio commented Sep 22, 2022

This should be fixed on the latest version!

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

No branches or pull requests

4 participants