aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Matloob <matloob@golang.org>2021-04-19 15:55:58 -0400
committerMichael Matloob <matloob@golang.org>2021-04-19 20:02:28 +0000
commitfbacf36eac89824d83f29dcdbf7b252e7b1fe034 (patch)
treea5233820e91f2d316f33b94e580327a31265dd61
parentc59e93ff849d2abcf7ff85daad27dcd7b11189fe (diff)
downloadgo-x-proposal-fbacf36eac89824d83f29dcdbf7b252e7b1fe034.tar.xz
design/draft-workspace.md: clarify replace example
Change-Id: I515292cd1182c7a777255511ea4c7dd7559da8b3 Reviewed-on: https://go-review.googlesource.com/c/proposal/+/311609 Trust: Michael Matloob <matloob@golang.org> Run-TryBot: Michael Matloob <matloob@golang.org> Reviewed-by: Michael Matloob <matloob@golang.org>
-rw-r--r--design/draft-workspace.md9
1 files changed, 6 insertions, 3 deletions
diff --git a/design/draft-workspace.md b/design/draft-workspace.md
index 14638ea..ebe2a10 100644
--- a/design/draft-workspace.md
+++ b/design/draft-workspace.md
@@ -193,7 +193,7 @@ Example:
```
replace (
- golang.org/x/tools => ./tools
+ golang.org/x/tools => ../tools
golang.org/x/mod v0.4.1 => example.com/mymod v0.5
)
```
@@ -491,8 +491,11 @@ modules already have many `replace`s in them that are necessary to properly
build them. Not respecting them would break users unnessesarily. `replace`
directives exist in the workspace file to allow for resolving conflicts between
`replace`s in workspace modules. Because all workspace modules exist as
-co-equals in the workspace, there is no other clear and intuitive way to resolve
-`replace` conflicts.
+co-equals in the workspace, there is no clear and intuitive way to resolve
+`replace` conflicts without explicit input from the user. One alternative is
+to add special syntax for overriding replaces to make the overriding behavior
+more explicit, and an additional option is to add an option to add syntax to
+nullify replaces without overriding them.
Working in modules not listed in the workspace file is disallowed to avoid what
could become a common source of confusion: if the `go` command stayed in