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

Hardhat compile error with @openzeppelin/hardhat-upgrades #240

Closed
hegelwin opened this issue Jul 22, 2024 · 3 comments
Closed

Hardhat compile error with @openzeppelin/hardhat-upgrades #240

hegelwin opened this issue Jul 22, 2024 · 3 comments
Labels
effort: medium Default level of effort. good first issue Good for newcomers. type: bug Something isn't working. work: complicated Sense-analyze-respond. The relationship between cause and effect requires analysis or expertise.

Comments

@hegelwin
Copy link

What version of PRBMath are you using?

4.0.3

What version of Solidity are you using?

0.8.24

Describe the bug

I can't compile my project after I enable hardhat-upgrades plugin v3.2.0. It points out problems with the documentation:

> v0@1.0.0 compile
> hardhat compile

An unexpected error occurred:

Error: Failed to compile modified contracts for namespaced storage:

DocstringParsingError: Documented parameter "result" not found in the parameter list of the function.
  --> @prb/math/src/ud60x18/Math.sol:50:1:
   |
50 | /// @notice Yields the smallest whole number greater than or equal to x.
   | ^ (Relevant source part starts here and spans across multiple lines).


DocstringParsingError: Documented parameter "result" not found in the parameter list of the function.
  --> @prb/math/src/ud60x18/Math.sol:63:1:
   |
63 | /// @notice Divides two UD60x18 numbers, returning a new UD60x18 number.
   | ^ (Relevant source part starts here and spans across multiple lines).


DocstringParsingError: Documented parameter "result" not found in the parameter list of the function.
   --> @prb/math/src/ud60x18/Math.sol:106:1:
    |
106 | /// @notice Yields the greatest whole number less than or equal to x.
    | ^ (Relevant source part starts here and spans across multiple lines).


DocstringParsingError: Documented parameter "result" not found in the parameter list of the function.
   --> @prb/math/src/ud60x18/Math.sol:114:1:
    |
114 | /// @notice Yields the excess beyond the floor of x using the odd function definition.
    | ^ (Relevant source part starts here and spans across multiple lines).


DocstringParsingError: Documented parameter "result" not found in the parameter list of the function.
  --> @prb/math/src/sd59x18/Math.sol:26:1:
   |
26 | /// @notice Calculates the absolute value of x.
   | ^ (Relevant source part starts here and spans across multiple lines).


DocstringParsingError: Documented parameter "result" not found in the parameter list of the function.
  --> @prb/math/src/sd59x18/Math.sol:47:1:
   |
47 | /// @notice Yields the smallest whole number greater than or equal to x.
   | ^ (Relevant source part starts here and spans across multiple lines).


DocstringParsingError: Documented parameter "result" not found in the parameter list of the function.
  --> @prb/math/src/sd59x18/Math.sol:60:1:
   |
60 | /// @notice Divides two SD59x18 numbers, returning a new SD59x18 number.
   | ^ (Relevant source part starts here and spans across multiple lines).


DocstringParsingError: Documented parameter "result" not found in the parameter list of the function.
   --> @prb/math/src/sd59x18/Math.sol:119:1:
    |
119 | /// @notice Yields the greatest whole number less than or equal to x.
    | ^ (Relevant source part starts here and spans across multiple lines).


DocstringParsingError: Documented parameter "result" not found in the parameter list of the function.
   --> @prb/math/src/sd59x18/Math.sol:132:1:
    |
132 | /// @notice Yields the excess beyond the floor of x for positive numbers and the part of the number to the right.
    | ^ (Relevant source part starts here and spans across multiple lines).


DocstringParsingError: Documented parameter "result" not found in the parameter list of the function.
 --> @prb/math/src/sd59x18/Conversions.sol:8:1:
  |
8 | /// @notice Converts a simple integer to SD59x18 by multiplying it by `UNIT`.
  | ^ (Relevant source part starts here and spans across multiple lines).


DocstringParsingError: Documented parameter "result" not found in the parameter list of the function.
  --> @prb/math/src/ud60x18/Conversions.sol:14:1:
   |
14 | /// @notice Converts a simple integer to UD60x18 by multiplying it by `UNIT`.
   | ^ (Relevant source part starts here and spans across multiple lines).

I'm not sure if this is good behavior on the part of the plugin, but it probably makes sense to fix these problems in the prb math.

@PaulRBerg PaulRBerg added good first issue Good for newcomers. effort: medium Default level of effort. type: bug Something isn't working. work: complicated Sense-analyze-respond. The relationship between cause and effect requires analysis or expertise. labels Jul 22, 2024
@PaulRBerg
Copy link
Owner

Thank you for reporting.

It should be possible to declare the documentation plugin for external libraries. I'm not familiar with Hardhat though, so I don't know how to do that.

Tagging @fvictorio in case he's able to help us here?

@fvictorio
Copy link

Error: Failed to compile modified contracts for namespaced storage:

That error message comes from the hardhat-upgrades plugin itself, so I'd suggest opening an issue there (which I see you already did, so maybe this one can be closed?)

@PaulRBerg
Copy link
Owner

Got it! Thanks @fvictorio. Closing as a duplicate of OpenZeppelin/openzeppelin-upgrades#1049

@PaulRBerg PaulRBerg closed this as not planned Won't fix, can't repro, duplicate, stale Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: medium Default level of effort. good first issue Good for newcomers. type: bug Something isn't working. work: complicated Sense-analyze-respond. The relationship between cause and effect requires analysis or expertise.
Projects
None yet
Development

No branches or pull requests

3 participants