Wording tweaks - #205
Conversation
| @@ -292,9 +292,9 @@ fn fragment_main() -> @location(0) vec4f { | |||
|
|
|||
| ### Aggregating entry points | |||
There was a problem hiding this comment.
btw I still think this section should be moved from spec to docs, It is just informative.
There was a problem hiding this comment.
or maybe a non-normative Note? Or do you have a spot in mind in the docs? (can be a separate PR if we don't have a plan yet)
mighdoll
left a comment
There was a problem hiding this comment.
heroic editing! Clarity will improve with these changes.
More edits requested to complete the de-root.
maybe main module rather than entry module?
couple of substantive changes mixed in (e.g. package visible pipeline-relevant items in the module-formerly-known-as-root are also pipeline-visible)
|
|
||
| * **Module**: A unit of WESL or WGSL code with its own top-level scope, stored in a single module source. | ||
| * **Module Source**: The stored text of a module, typically in a WESL or WGSL file. | ||
| * **Entry Module**: The WESL module from which translation starts. Its public declarations form the **shader-host interface** and are not mangled. A single application can have many entry modules. |
There was a problem hiding this comment.
alternate: do you like 'Main Module', like 'main()' in C?
entry is better than root and I'm fine with it, but today I'm kinda liking main.
my worry is that a module containing entry points needn't be the entry module, and talking about entry modules and entry points will require the reader to distinguish the two related but different senses of entry.
I lean main as I write this but I'm aok either way.
k2d222
left a comment
There was a problem hiding this comment.
ready for another round @mighdoll @stefnotch
| * **Entry Module**: The WESL module from which translation starts. Its public declarations form the **shader-host interface** and are not mangled. A single application can have many entry modules. | ||
| * **Module Path**: A `::`-separated path naming a module; equivalently, a declaration path minus its final segment. | ||
| * **Declaration Path**: A `::`-separated path whose final segment names a declared item. | ||
| * **Canonical Path**: A fully qualified module/ declaration path (which does not contain any `super::`). There is exactly one canonical path per module or declaration within a package. |
There was a problem hiding this comment.
yeah I introduced canonical path which is not referenced in the spec. The idea is that we have not term for non-canonical paths since the current spec calls any path canonical, and that's confusing.
| exposes it to the host (see [Visibility](Visibility.md)). | ||
| * **wesl.toml**: The optional configuration file for a package. See [WeslToml](WeslToml.md). | ||
| * **Module Path Resolution**: Mapping between module paths and module source within a package. Choice of mapping is implementation-specific. | ||
| * **Filesystem Resolution**: The default module path resolution. It maps module paths to file paths relative to a **Package Root Directory**. See [Filesystem Resolution][Imports.md#filesystem-resolution]. |
There was a problem hiding this comment.
cHnged to
The standard path resolution for a filesystem storage
| * **wesl.toml**: The optional configuration file for a package. See [WeslToml](WeslToml.md). | ||
| * **Module Path Resolution**: Mapping between module paths and module source within a package. Choice of mapping is implementation-specific. | ||
| * **Filesystem Resolution**: The default module path resolution. It maps module paths to file paths relative to a **Package Root Directory**. See [Filesystem Resolution][Imports.md#filesystem-resolution]. | ||
| * **Package Root Module Path**: The module path consisting only of `package`. Corresponds to `package.wesl` in the package root directory with the filesystem resolution. |
| * **Entry Module**: The WESL module from which translation starts. Its public declarations form the **shader-host interface** and are not mangled. A single application can have many entry modules. | ||
| * **Module Path**: A `::`-separated path naming a module; equivalently, a declaration path minus its final segment. | ||
| * **Declaration Path**: A `::`-separated path whose final segment names a declared item. | ||
| * **Canonical Path**: A fully qualified module/ declaration path (which does not contain any `super::`). There is exactly one canonical path per module or declaration within a package. |
There was a problem hiding this comment.
What would you prefer:
- remove canonical from glossary
- a module path can be relative or canonical, and filesystem resolution first canonicalizes the path
| * **Module Source**: The stored text of a module, typically in a WESL or WGSL file. | ||
| * **Entry Module**: The WESL module from which translation starts. Its public declarations form the **shader-host interface** and are not mangled. A single application can have many entry modules. | ||
| * **Module Path**: A `::`-separated path naming a module; equivalently, a declaration path minus its final segment. | ||
| * **Declaration Path**: A `::`-separated path whose final segment names a declared item. |
There was a problem hiding this comment.
see comment about canonical
| * **Module**: A unit of WESL or WGSL code with its own top-level scope, stored in a single module source. | ||
| * **Module Source**: The stored text of a module, typically in a WESL or WGSL file. | ||
| * **Entry Module**: The WESL module from which translation starts. Its public declarations form the **shader-host interface** and are not mangled. A single application can have many entry modules. | ||
| * **Module Path**: A `::`-separated path naming a module; equivalently, a declaration path minus its final segment. |
There was a problem hiding this comment.
is it only import paths that can have super? not inline paths?
I think remove. I wouldn't tie module path terms to fs resolution. I like canonical, might make things more clear. Reworking the text to use it and hopefully drop one or two of the other definitions seems worthy, but it'd be easier to review in a separate PR. |
they can too! the terminology just needs a way to distinguish the thing you might type in from the thing that's... canonical :-). currently a module path or and a declaration path are canonical, and there's no glossary term for inline path I think. It would be nice to clean up the terms, I think you're onto something. |
k2d222
left a comment
There was a problem hiding this comment.
addressed comments.
| * **Module**: A unit of WESL or WGSL code with its own top-level scope, stored in a single module source. | ||
| * **Module Source**: The stored text of a module, typically in a WESL or WGSL file. | ||
| * **Entry Module**: The WESL module from which translation starts. Its public declarations form the **shader-host interface** and are not mangled. A single application can have many entry modules. | ||
| * **Module Path**: A `::`-separated path naming a module; equivalently, a declaration path minus its final segment. |
| * **Module Source**: The stored text of a module, typically in a WESL or WGSL file. | ||
| * **Entry Module**: The WESL module from which translation starts. Its public declarations form the **shader-host interface** and are not mangled. A single application can have many entry modules. | ||
| * **Module Path**: A `::`-separated path naming a module; equivalently, a declaration path minus its final segment. | ||
| * **Declaration Path**: A `::`-separated path whose final segment names a declared item. |
| * **Entry Module**: The WESL module from which translation starts. Its public declarations form the **shader-host interface** and are not mangled. A single application can have many entry modules. | ||
| * **Module Path**: A `::`-separated path naming a module; equivalently, a declaration path minus its final segment. | ||
| * **Declaration Path**: A `::`-separated path whose final segment names a declared item. | ||
| * **Canonical Path**: A fully qualified module/ declaration path (which does not contain any `super::`). There is exactly one canonical path per module or declaration within a package. |
There was a problem hiding this comment.
I kept it and made module path / declaration path derive from it. There was too much complexity to pack in one definition.
mighdoll
left a comment
There was a problem hiding this comment.
lookin' good! a few minor fixes for you. pretty minor, a couple would be misleading. fix those and lgtm w/o further review.
| * **Module**: A unit of WESL or WGSL code with its own top-level scope, stored in a single module source. | ||
| * **Module Source**: The stored text of a module, typically in a WESL or WGSL file. | ||
| * **Main module**: The WESL module from which translation starts. It defines the Pipeline-visible API. A single application can have many main modules. | ||
| * **Pipeline-visible API**, The set of items which are visible to the host (CPU-side). Pipeline-visible item names are not mangled. |
Per our Discord discussion I clarify the meaning of root module which was confused with package root directory and
package::module path. I also went ahead and tweaked the glossary.