-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Documenter.jl
committed
May 10, 2024
1 parent
b00176d
commit 0b9c0af
Showing
9 changed files
with
13 additions
and
13 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Conflicts and overrides · ArgParse.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><div class="docs-package-name"><span class="docs-autofit">ArgParse.jl</span></div><form class="docs-search" action="../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><span class="tocitem">Manual</span><ul><li><a class="tocitem" href="../parse_args/">The <code>parse_args</code> function</a></li><li><a class="tocitem" href="../settings/">Settings</a></li><li><a class="tocitem" href="../arg_table/">Argument table</a></li><li><a class="tocitem" href="../import/">Importing settings</a></li><li class="is-active"><a class="tocitem" href>Conflicts and overrides</a></li><li><a class="tocitem" href="../custom/">Parsing to custom types</a></li><li><a class="tocitem" href="../details/">Parsing details</a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">Manual</a></li><li class="is-active"><a href>Conflicts and overrides</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Conflicts and overrides</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/carlobaldassi/ArgParse.jl/blob/master/docs/src/conflicts.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Conflicts-and-overrides"><a class="docs-heading-anchor" href="#Conflicts-and-overrides">Conflicts and overrides</a><a id="Conflicts-and-overrides-1"></a><a class="docs-heading-anchor-permalink" href="#Conflicts-and-overrides" title="Permalink"></a></h1><p>Conflicts between arguments, be them options, positional arguments or commands, can arise for a variety of reasons:</p><ul><li>Two options have the same name (either long or short)</li><li>Two arguments have the same destination key, but different types (e.g. one is <code>Any</code> and the other <code>String</code>)</li><li>Two arguments have the same destination key, but incompatible actions (e.g. one does <code>:store_arg</code> and the other <code>:append_arg</code>)</li><li>Two positional arguments have the same metavar (and are therefore indistinguishable in the usage and help screens and in error messages)</li><li>An argument's destination key is the same as a command name</li><li>Two commands with the same name are given, but one has a long-option form (e.g. <code>test</code> and <code>--test</code>)</li><li>A command alias is equal to another command's name or alias</li></ul><p>When the general setting <code>error_on_conflict</code> is <code>true</code>, or any time the specific <code>force_override</code> table entry setting is <code>false</code>, any of the above conditions leads to an error.</p><p>On the other hand, setting <code>error_on_conflict</code> to <code>false</code>, or <code>force_override</code> to <code>true</code>, will try to force the resolution of most of the conflicts in favor of the newest added entry. The general rules are the following:</p><ul><li>In case of duplicate options, all conflicting forms of the older options are removed; if all forms of an option are removed, the option is deleted entirely</li><li>In case of duplicate destination key and incompatible types or actions, the older argument is deleted</li><li>In case of duplicate positional arguments metavars, the older argument is deleted</li><li>A command can override an argument with the same destination key</li><li>However, an argument can never override a command; neither can a command override another command when added with <code>@add_arg_table!</code> (compatible commands are merged by <a href="../import/#ArgParse.import_settings!"><code>import_settings!</code></a> though)</li><li>Conflicting command aliases are removed</li></ul></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../import/">« Importing settings</a><a class="docs-footer-nextpage" href="../custom/">Parsing to custom types »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Friday 10 May 2024 11:55">Friday 10 May 2024</span>. Using Julia version 1.10.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> | ||
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Conflicts and overrides · ArgParse.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><div class="docs-package-name"><span class="docs-autofit">ArgParse.jl</span></div><form class="docs-search" action="../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><span class="tocitem">Manual</span><ul><li><a class="tocitem" href="../parse_args/">The <code>parse_args</code> function</a></li><li><a class="tocitem" href="../settings/">Settings</a></li><li><a class="tocitem" href="../arg_table/">Argument table</a></li><li><a class="tocitem" href="../import/">Importing settings</a></li><li class="is-active"><a class="tocitem" href>Conflicts and overrides</a></li><li><a class="tocitem" href="../custom/">Parsing to custom types</a></li><li><a class="tocitem" href="../details/">Parsing details</a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">Manual</a></li><li class="is-active"><a href>Conflicts and overrides</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Conflicts and overrides</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/carlobaldassi/ArgParse.jl/blob/master/docs/src/conflicts.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Conflicts-and-overrides"><a class="docs-heading-anchor" href="#Conflicts-and-overrides">Conflicts and overrides</a><a id="Conflicts-and-overrides-1"></a><a class="docs-heading-anchor-permalink" href="#Conflicts-and-overrides" title="Permalink"></a></h1><p>Conflicts between arguments, be them options, positional arguments or commands, can arise for a variety of reasons:</p><ul><li>Two options have the same name (either long or short)</li><li>Two arguments have the same destination key, but different types (e.g. one is <code>Any</code> and the other <code>String</code>)</li><li>Two arguments have the same destination key, but incompatible actions (e.g. one does <code>:store_arg</code> and the other <code>:append_arg</code>)</li><li>Two positional arguments have the same metavar (and are therefore indistinguishable in the usage and help screens and in error messages)</li><li>An argument's destination key is the same as a command name</li><li>Two commands with the same name are given, but one has a long-option form (e.g. <code>test</code> and <code>--test</code>)</li><li>A command alias is equal to another command's name or alias</li></ul><p>When the general setting <code>error_on_conflict</code> is <code>true</code>, or any time the specific <code>force_override</code> table entry setting is <code>false</code>, any of the above conditions leads to an error.</p><p>On the other hand, setting <code>error_on_conflict</code> to <code>false</code>, or <code>force_override</code> to <code>true</code>, will try to force the resolution of most of the conflicts in favor of the newest added entry. The general rules are the following:</p><ul><li>In case of duplicate options, all conflicting forms of the older options are removed; if all forms of an option are removed, the option is deleted entirely</li><li>In case of duplicate destination key and incompatible types or actions, the older argument is deleted</li><li>In case of duplicate positional arguments metavars, the older argument is deleted</li><li>A command can override an argument with the same destination key</li><li>However, an argument can never override a command; neither can a command override another command when added with <code>@add_arg_table!</code> (compatible commands are merged by <a href="../import/#ArgParse.import_settings!"><code>import_settings!</code></a> though)</li><li>Conflicting command aliases are removed</li></ul></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../import/">« Importing settings</a><a class="docs-footer-nextpage" href="../custom/">Parsing to custom types »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Friday 10 May 2024 12:03">Friday 10 May 2024</span>. Using Julia version 1.10.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.