Revise Packaging.md#173
Conversation
|
no time or interest to finish this, but it's already an improvement to the exitsing file. OK to merge? |
mighdoll
left a comment
There was a problem hiding this comment.
It'll be good to get this in! sorry for forgetting about it and glad you're pushing it forward. lmk if you want help on any of the minor edits, I can make more specific text proposals if needed.
|
|
||
| (TODO: unification with param const?) | ||
|
|
||
| If two packages in the dependency tree are [semver-compatible](https://semver.org/), npm or Cargo will likely unify them, meaning it will include only one version of the package in its output (often the highest semver-compatible version available). |
There was a problem hiding this comment.
I think we might say that users are doing this unification. i.e. users of npm and cargo may unify them.
There was a problem hiding this comment.
Oh, I see, the point is that package managers will sometimes unify by default. I think that's the default for npm, though the rules are overridable and expectations vary on whether indirect dependencies are unified. (AFAIR by default pnpm doesn't unify indirect dependencies, but npm might still do that)
There was a problem hiding this comment.
lemme know if the current revision clarifies.
| * Add the `_wgsl` suffix to the name: `mypackage_wgsl`. | ||
| * Use snake_case (underscores to separate words): `my_great_package_wgsl`. | ||
| * If your package is part of a larger project, or produced by a company, you can prefix it with that name: `mycompany_mypackage_wgsl`. | ||
| * For [wesl-js] specifically, you can use the common naming convention `@mycompany/mypackage_wgsl` |
There was a problem hiding this comment.
we might add a note here that package names with @ and - and / are sanitized for use in WESL:
"@scope/my-package" => import scope__my_package::...
There was a problem hiding this comment.
I don't know the exact sanitization rules in -js, so I added vague footnote
apply revisions
It's time to un-draft Packaging.md