run: reject .ww directories as named sources
This commit is contained in:
29
docs/spec.md
29
docs/spec.md
@@ -370,10 +370,31 @@ ImportPath = ident { "." ident } .
|
||||
no new package, dotted-import, graph, action, symbol, artifact, `.wwi`,
|
||||
publication, or persistence identity. Raw `ww test`, `ww test -c`, and
|
||||
`ww test -S` already use the same directory classification and are unchanged.
|
||||
`ww run` retains its separate named-operand front door. Multiple operands,
|
||||
recursive and logical requests, regular and non-regular source targets, and
|
||||
dangling symlinks are not changed. Build workdir format remains 18, test
|
||||
workdir format remains 19, and semantic storage format remains 3.
|
||||
`ww run` retains its separate named-operand front door, with its
|
||||
`.ww`-spelled directory rule specified next. Multiple operands, recursive
|
||||
and logical requests, regular and non-regular source targets, and dangling
|
||||
symlinks are not changed. Build workdir format remains 18, test workdir
|
||||
format remains 19, and semantic storage format remains 3.
|
||||
- For `ww run`, an existing selected target whose exact requested spelling
|
||||
ends `.ww` is a named-source request when symlink-following `stat` reports a
|
||||
directory. The command rejects it before shared resolution, directory
|
||||
enumeration, source/import loading, graph/action construction, private run
|
||||
scratch, producers, or runtime. A requested suffix `_test.ww` has the earlier
|
||||
exact diagnostic
|
||||
`ww: cannot run *_test.ww files (OPERAND)\n`; every other such directory has
|
||||
exact diagnostic `OPERAND is a directory, should be a WW file\n`. Both forms
|
||||
return status 1 with empty stdout and reproduce the requested operand bytes
|
||||
unchanged. The rule follows a terminal symlink, includes `.hidden.ww` and
|
||||
`_hidden.ww` directory spellings, and precedes any malformed package or
|
||||
missing import inside the directory. A trailing separator does not end
|
||||
`.ww`; ordinary non-`.ww` directories, dotted logical requests, regular and
|
||||
missing operands, multiple named operands, and non-directory non-regular
|
||||
targets retain their established routes. The rejected spelling and followed
|
||||
target are diagnostic metadata only and create no package/import identity,
|
||||
graph/action, symbol, artifact, `.wwi`, publication, transaction,
|
||||
persistence, process, or filesystem owner. Build and all test forms retain
|
||||
their distinct stat-first directory behavior. Build workdir format remains
|
||||
18, test workdir format remains 19, and semantic storage format remains 3.
|
||||
- `import acme.codec;` loads the canonical package `acme.codec`. If that
|
||||
package declares `package wire;`, the importing file sees its exported names
|
||||
as `wire.Name`; `codec.Name` is not an additional binding. An explicit alias
|
||||
|
||||
Reference in New Issue
Block a user