How do I finalize this collection package?

I made a package here:

https://github.com/CTMacUser/EmbeddedIntegerCollection.git

I'm wondering two things:

  1. For the MutableCollection support, I wrote my own read-write single-element subscript operator. I just let the library's code synthesize the multi-element version. Since the type doesn't use heap storage, I have no idea if that actually works. (Remember, it's not just Slices, but slices of slices that need to work too.) And no idea how to fix it if it doesn't work.
  2. How do I "finalize" the package's description so other people can use the package? Potential clients include another package I'm writing now. (I wrote that one's initial code first, then realize I could generalize it, and so moved that core code to this package.)
  1. The range-based subscript has a default implementation that writes back to the collection element-wise – you can see the implementation here: swift/stdlib/public/core/WriteBackMutableSlice.swift at main · swiftlang/swift · GitHub

  2. The package is already ready to use – you can add it as a dependency to another package or an Xcode project by using the same GitHub URL that's in your post. Without any releases, you'll need to specify a branch or a specific commit to depend on, which can limit some of the uses of your package, so I'd recommend creating an initial 0.0.1 release on GitHub.

1 Like