You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seams that the new command library changes the behavior of WithDefault (previous called just Default before #4403). From what I can tell it changes it in two ways:
(1) Using WithDefault interfere with discovering if that option was specified on the command line. For example I noticed these changes in the core/commands/add.go (in commit 4909c5a56d256e0b999d11b065227b94576609ce):
- cmdkit.IntOption(cidVersionOptionName, "Cid version. Non-zero value will change default of 'raw-leaves' to true. (experimental)").WithDefault(0),+ cmdkit.IntOption(cidVersionOptionName, "CID version. Defaults to 0 unless an option that depends on CIDv1 is passed. (experimental)"),
(2) I noticed that when WithDefault is used a value is always passed with the API when before I am fairly sure it was not.
I am not 100% sure but it appears that using WIthDefault sets a value client side rather when doing the intended purpose of this function and setting an alternative default server side.
It seams that the new command library changes the behavior of
WithDefault
(previous called justDefault
before #4403). From what I can tell it changes it in two ways:(1) Using WithDefault interfere with discovering if that option was specified on the command line. For example I noticed these changes in the core/commands/add.go (in commit 4909c5a56d256e0b999d11b065227b94576609ce):
(2) I noticed that when WithDefault is used a value is always passed with the API when before I am fairly sure it was not.
I am not 100% sure but it appears that using WIthDefault sets a value client side rather when doing the intended purpose of this function and setting an alternative default server side.
Related: #4911
CC @keks @Stebalien
The text was updated successfully, but these errors were encountered: