ww build: discard exact null outputs
This commit is contained in:
19
docs/spec.md
19
docs/spec.md
@@ -319,6 +319,19 @@ ImportPath = ident { "." ident } .
|
||||
build therefore reuses unchanged semantic actions while refreshing the
|
||||
caller-visible output with the current invocation's mode. Assembly-only
|
||||
builds publish no executable or archive.
|
||||
- On the Unix target, exact `-o /dev/null` is a build-output discard request,
|
||||
not an ordinary output filename. Package loading, import validation, graph
|
||||
construction, compilation, assembly, archiving, command linking, failure,
|
||||
and persistent invalidation proceed normally; only installation of a
|
||||
caller-visible command, archive, interface, default basename, or adjacent
|
||||
scratch tree is omitted. One such request may select any number of command
|
||||
and non-command packages, and an empty recursive match is successful after
|
||||
its normal warning. `-S` likewise needs no caller workdir merely to retain
|
||||
discarded assembly. Raw-file and directory roots use the same rule. A
|
||||
non-exact spelling is an ordinary output and keeps all established fan-out,
|
||||
rejection, permission, scratch, and publication behavior. Output discard is
|
||||
request metadata; it does not change package, import, graph, action,
|
||||
artifact, symbol, `.wwi`, or persistence identity.
|
||||
- Only names marked `export` (§5) are visible across module boundaries.
|
||||
|
||||
Import paths remain unquoted and dotted. Grouped imports, quoted import paths,
|
||||
@@ -662,7 +675,11 @@ directory. An output ending in `/` or naming an existing directory receives
|
||||
that basename and may have missing parent directories created. One
|
||||
non-directory output may name only one package. Multiple packages whose
|
||||
visible import leaves would produce the same test-binary name reject before
|
||||
tools or output creation; exact `/dev/null` is the discard exception. Declared
|
||||
tools or output creation; exact `/dev/null` is the discard exception. It keeps
|
||||
the ordinary private link and, unless `-c` is present, the ordinary execution,
|
||||
but installs no retained copy. The raw single-file compatibility route uses
|
||||
the same private-output rule and never treats `/dev/null` as an explicit
|
||||
artifact or adjacent-scratch stem. Declared
|
||||
package names, test variants, source filenames, physical directories, output
|
||||
paths, and retained binary names remain presentation or loader metadata and do
|
||||
not become canonical package or action identity.
|
||||
|
||||
Reference in New Issue
Block a user