Repo convention and SwiftPM library name for least surprises

Hi folks, I'm curious what the 2024 guidance is on creating SPM libraries that will result in the least surprises for my customers. There are three constants I'm interested in the convention for:

  • The package location
  • The package name
  • The product name (what the user imports)

A scan of this list shows me that we aren't consistently applying cases for the package location. Some are pascal, some kebab, some snake. Does it matter?

I stumbled across this PR, which I interpret to mean that the package name should be kebab-case. Is that correct?

Finally, I think it's mostly accepted (please correct me if I'm wrong) that we import PascalCase things, so the product name for a library should always be PascalCase. Is that correct?

Thanks for reading,
Lou

1 Like

I punched up my findings here: Notes on SPM naming conventions

2 Likes