spotifyovercastrssapple-podcasts

How (And When) to Publish a Package

We cover the mechanics of publishing your first Elm package. Best practices for making a great package, and how to learn the API design skills to build great tools.
May 11, 2020
#5

What is an Elm Package?

  • Elm package repository
  • Elm packages enforce SemVer for the public package API
  • The SemVer (Semantic Versioning) Spec
  • Interesting note: the SemVer spec says breaking changes only refers to the public API. But a core contributor clarifies that breaking changes can come from changes to the public contract that you intend users to depend on. See this GitHub thread.
  • list-extra package
  • dict-extra package
  • Minimize dependencies in your package to make it easier for users to manage their dependencies
  • "Vendoring" elm packages (using a local copy instead of doing elm install author/package-name) can be useful in some cases to remove a dependency from your package

Should you publish a package?

  • The Elm package ecosystem has a high signal to noise ratio
  • Elm packages always start at version 1.0.0
  • SemVer has different semantics before 1.0.0 (patch releases can be breaking before 1) - see SemVer spec item 4

Major version zero (0.y.z) is for initial development. Anything MAY change at any time. The public API SHOULD NOT be considered stable.

  • Elm package philosophy is to do an alpha phase before publishing package

Keep yourself honest about solving meaningful problems

  • Start by asking "What problem are you solving? Who are you solving it for?"

  • Scratch your own itch

  • elm-graphql

  • servant-elm (for Haskell servant)

  • Keep yourself honest about solving problems by starting with an examples/ folder

  • Early elm-graphql commits started with examples before anything else

  • Write meaningful test cases with elm-test

  • elm-verify-examples

  • Have a clear vision

  • Ask people for feedback

  • Let ease of explanation guide you to refine core concepts

Make it easy for people to understand your package goals and philosophy

Porting libraries vs. Coming Up With an Idiomatic Solution for Elm

  • Instead of moment js ported to Elm, have an API built for a typed context
  • Ryan's date-format package

How to design an Elm package API

Pay attention to how other packages solve problems

Pick your constraints instead of trying to solve every problem

  • Helps you choose between tradeoffs
  • Having clear project goals explicitly in your Readme makes it easier to discuss tradeoffs with users and set expectations
  • Idiomatic elm package guide has lots of info on basic mechanics and best practices for publishing Elm packages

The mechanics of publishing an elm package

  • elm make --docs docs.json will tell you if you're missing docs or if there are documentation validation errors
  • elm-doc-preview
  • Can use elm-doc-preview site to share documentation of branches, or packages that haven't been published yet
  • Set up a CI
  • Dillon's CI script for dillonkearns/elm-markdown package
  • Dillon's elm-publish-action GitHub Action will publish package versions when you increment the version in your elm.json - nice because it runs CI checks before finalizing a new package release
  • elm publish will walk you through the steps you need before publishing the first version of your Elm package
  • #packages channel on the Elm slack shows a feed of packages as they're published
  • #api-design channel on the Elm slack is a good place to ask for feedback on your API design and package idea

Continue the Conversation

Share your package ideas with us @elmradiopodcast on Twitter!

Transcript

[00:00:00]
Hello, Jeroen.
[00:00:02]
Hello, Dillon.
[00:00:04]
How are you doing today?
[00:00:06]
I'm doing pretty well. How about you?
[00:00:08]
Not too bad. Can't complain.
[00:00:10]
We do have an exciting topic today.
[00:00:12]
So it's going to be how and when to publish an Elm package.
[00:00:15]
Yes, another tough one to squeeze everything into one episode, but here we go. Let's do it.
[00:00:21]
Yeah. So let's talk about what an Elm package is.
[00:00:25]
Yes.
[00:00:27]
So if you want to share your code, your library in Elm, you want to do it through an Elm package.
[00:00:33]
So it's a repository that you publish on the Elm package registry,
[00:00:39]
and that people can then install through Elm install your package name.
[00:00:44]
So that's the basis.
[00:00:46]
Yeah. And so there are some unique things for people who are used to other package ecosystems
[00:00:52]
like NPM for JavaScript or Ruby gems, things like that.
[00:00:58]
There are some things that are unique because of Elm and because of some decisions of the Elm package workflow.
[00:01:05]
So maybe we should talk a little bit about what makes Elm packages unique.
[00:01:10]
So first of all, it enforces semantic versioning.
[00:01:14]
You've probably seen the versions of Elm packages or NPM packages that are of form X.Y.Z, like 1.0.0.
[00:01:24]
Well, those are enforced in Elm. So all packages started with version 1.0.0.
[00:01:29]
Yes.
[00:01:30]
And then every time you make a breaking change, the Elm compiler enforces that you publish a major version.
[00:01:37]
So that would be 2.00.
[00:01:40]
Right. Where a breaking change is as far as the API is concerned.
[00:01:45]
So if you remove an existing API function,
[00:01:49]
if you change an existing type in a way that breaks users code in a way that users can depend on,
[00:01:57]
that would be a breaking change.
[00:01:59]
Yeah. But if the implementation changes in a way that is noticeable by the user,
[00:02:03]
that will not be considered as a breaking change.
[00:02:07]
Right. Which is interesting because it's a little bit different than semantic versioning in a sense, right?
[00:02:12]
Because you could technically have a breaking change where the API doesn't have a breaking change.
[00:02:18]
Yeah. Maybe it's more like API versioning.
[00:02:21]
Exactly. It's kind of API semantic versioning. Yes.
[00:02:25]
And so that allows you to depend on a package range.
[00:02:29]
So you can say, I depend on the list extract package,
[00:02:32]
and I can have version between version four and before version five.
[00:02:37]
But I can't support version five because by definition,
[00:02:41]
it's going to have a breaking API change which may possibly break my code.
[00:02:45]
So I think that's kind of the main reasoning is you can say,
[00:02:49]
I depend on this code and allow it to upgrade.
[00:02:52]
But of course, it still is possible for the code to break,
[00:02:55]
even if it's a non breaking change, quote unquote, as far as the API is concerned.
[00:03:00]
But in practice, that happens a lot less than JavaScript.
[00:03:03]
I'm a lot less afraid to do a minor or patch upgrade in an Elm package than I am in an NPM package.
[00:03:12]
Yeah, me too.
[00:03:13]
Another thing that's kind of unique about Elm packages,
[00:03:16]
I don't think any other package ecosystem has this sort of semantic versioning design,
[00:03:21]
which is one of the really unique things about Elm.
[00:03:23]
Not that I know of.
[00:03:24]
It's a pretty impressive feature.
[00:03:26]
I mean, as we said, semantic versioning only applies to the API itself,
[00:03:31]
not to the actual code.
[00:03:33]
There's not really a way to automate semantic versioning and say that your code won't break.
[00:03:39]
Yeah.
[00:03:40]
But it's quite nice.
[00:03:41]
But another thing that's different about the Elm ecosystem compared to Ruby or JavaScript
[00:03:47]
is that you can't publish a package that just does global side effects because of the nature of Elm.
[00:03:54]
And you also can't publish things like ports.
[00:03:56]
Yeah.
[00:03:57]
So you can't publish any JavaScript in there.
[00:03:59]
Yeah.
[00:04:00]
So that makes it a lot easier to depend on packages and to focus on just looking at the API
[00:04:07]
and saying, does this code do what I want it to do?
[00:04:09]
And you can pull it in with more confidence.
[00:04:12]
So anyway, that's sort of like a basic overview of some of the things that are interesting about the Elm package ecosystem.
[00:04:18]
Also, with code splitting at the function level that we get from Elm,
[00:04:22]
you don't have to split off packages into these tiny pieces like things like...
[00:04:26]
Load dash.
[00:04:28]
Load dash having a package for like every single set of functions grouped into these like ultra granular sizes.
[00:04:36]
There are about 200 functions in there.
[00:04:38]
So that's about 200 packages.
[00:04:41]
Right.
[00:04:42]
That seems so unmaintainable to me as a user.
[00:04:45]
But you do get into an interesting thing where sometimes you'll depend on a package that,
[00:04:50]
for example, something like Elm community packages like list extra, dict extra, these kinds of packages.
[00:04:57]
A lot of different packages depend on these.
[00:05:00]
And sometimes you'll have a major version update.
[00:05:05]
So it's a breaking change for some reason.
[00:05:07]
Maybe some function is removed.
[00:05:09]
For Elm community list extra, do you mean?
[00:05:12]
Yeah, exactly.
[00:05:13]
Let's say that something in Elm community list extra gets removed.
[00:05:16]
Some function is removed for whatever reason, hey, this is a better name for this function.
[00:05:21]
Maybe a function gets renamed.
[00:05:23]
And now it's a major version bump.
[00:05:25]
But if you had a package as a package author and you depend on that package,
[00:05:31]
even though it's a major version upgrade, you could safely upgrade.
[00:05:36]
Maybe your users could safely upgrade if they're also depending on Elm community list extra.
[00:05:41]
But because as far as Elm is concerned, it's a major version change.
[00:05:45]
It's a breaking API change.
[00:05:47]
Even if you and your users were not using that function that was renamed, everybody has to upgrade.
[00:05:55]
And so that can become kind of a nuisance.
[00:05:57]
So it can be kind of nice as a package author to reduce the number of dependencies that you have.
[00:06:03]
And so sometimes, to be honest, I find myself either quote unquote vendoring,
[00:06:08]
like copying in the list extra package, or just copying the function that I need into a little helper module.
[00:06:16]
Because for users, it can be hard to kind of manage these different versions of dependencies
[00:06:22]
because they might depend on another package that hasn't updated its list extra dependency yet.
[00:06:29]
And so that becomes this weird sort of chicken and egg problem.
[00:06:33]
Because you can't have two different major versions for a package in your application or your project.
[00:06:39]
Exactly.
[00:06:40]
Yeah, that's something that I vendor code a lot of too in Elm review,
[00:06:45]
because a lot of packages will depend on it and do want them to all be able to coexist.
[00:06:51]
So I encourage to vendor code, which is not great,
[00:06:55]
but that's the limitation that we have with Elm compiler at the moment.
[00:07:00]
Few pain points with the Elm compiler at the moment.
[00:07:03]
Right. I mean, the experience overall is quite nice.
[00:07:06]
And it's not, I wouldn't expect it to solve this problem.
[00:07:10]
But that said, I think that there is a way to come up with really creative solutions to this problem.
[00:07:15]
And it could be an interesting space to explore at some point.
[00:07:18]
But our title sort of hints at this big question, which I think is a really important one.
[00:07:23]
Should you publish an Elm package?
[00:07:25]
What do you think, Jeroen?
[00:07:26]
Should the listener publish an Elm package?
[00:07:29]
Don't do it.
[00:07:31]
There you go.
[00:07:32]
All right. See you next time.
[00:07:34]
See you next time.
[00:07:35]
In the NPM ecosystem, there are a lot of tutorials about how to publish your own package.
[00:07:41]
And it just shows you, hey, do this, create this project, run NPM publish, and you're done.
[00:07:48]
And a lot of people do it.
[00:07:50]
A lot of people do publish their package, even just to try it out.
[00:07:55]
I feel like in the Elm community, we try not to do that.
[00:07:59]
And we try to have a much higher bar for packages.
[00:08:04]
And I think in the long run, that will serve us very well.
[00:08:08]
Because we don't want to end up with millions of packages like the NPM registry has.
[00:08:14]
I don't know, hundreds of thousands of millions, maybe now?
[00:08:18]
It's probably millions. We should look that up.
[00:08:21]
But yeah, it's a good point. And there is very little noise in the Elm package registry,
[00:08:26]
which is quite refreshing to look through and be able to see a large number of high quality packages
[00:08:33]
to have a very high signal to noise ratio.
[00:08:36]
That's quite nice.
[00:08:37]
And the fact that the Elm semantic versioning starts at 1.0, I think is sort of a signal that this is the philosophy
[00:08:45]
to try to publish high quality packages and to try to vet packages a little bit to do even like an alpha or beta testing phase
[00:08:53]
before publishing a package to really do your homework and think about, is there a clear problem that I'm solving
[00:09:00]
with this package before you just go and put it out there?
[00:09:03]
And by the way, when I say 1.0 as the starting point for the Elm package semantic versioning,
[00:09:09]
1.0 is significant in the semantic versioning spec because it means that the semantics totally change.
[00:09:16]
Before 1.0 in SemVer, you can have a breaking change with a patch release.
[00:09:21]
So if you go from 0.0.1 to 0.0.2, you can have a breaking change according to the semantic versioning spec.
[00:09:30]
And so the Elm package repository just says, hey, if you're going to have a 0.0.1 release, that's great,
[00:09:37]
put it on the package repository once you've gotten past that phase.
[00:09:40]
Yeah, I don't really trust packages whose version starts with 0.0.1 because I feel like...
[00:09:46]
Like Elm?
[00:09:48]
No, Elm is better. It starts with 0.1.
[00:09:52]
It's a minor release.
[00:09:54]
Yeah, you see them on the NPM registry and you know it's going to be very different with the next version.
[00:10:03]
Yeah, it's something that I've kind of gotten used to also to just have...
[00:10:07]
I personally do pretty frequent releases and there are different schools of thought on this,
[00:10:12]
but I like doing frequent releases.
[00:10:15]
I don't shy away from getting a lot of different major versions up there.
[00:10:19]
It's interesting because in one sense, having to do a major version for a breaking change encourages you to batch together breaking changes.
[00:10:28]
Yeah, definitely.
[00:10:29]
And that's nice in one sense, but in another sense, it's not so nice for a user to have a bunch of breaking changes all at once.
[00:10:36]
So I think these are all sort of things to keep in mind and you really need to use your own judgment and just be aware of the trade offs.
[00:10:43]
Yeah.
[00:10:44]
But we're kind of...
[00:10:45]
Okay, so we teased this topic of should you publish an Elm package?
[00:10:49]
So what are the considerations for whether you should publish an Elm package?
[00:10:54]
Like where do you even start with this question?
[00:10:57]
Let's say I've got an idea.
[00:10:59]
There's some API that I think would be really cool to expose.
[00:11:03]
What question would you ask me if I say, hey, Jeroen, I've got this idea.
[00:11:06]
I think it would be really cool.
[00:11:07]
I'm going to publish a package.
[00:11:08]
Where would you...
[00:11:09]
What would you ask me?
[00:11:10]
I would ask you, what does it solve?
[00:11:12]
What problem does it solve?
[00:11:13]
Right.
[00:11:14]
What problem does it solve?
[00:11:15]
Who does it solve it for is probably good.
[00:11:18]
Does it solve it for you?
[00:11:19]
Does it solve it for other people also?
[00:11:22]
Exactly.
[00:11:23]
Because it's tempting to say, oh, it solves this problem.
[00:11:27]
Great.
[00:11:28]
Who has that problem?
[00:11:29]
Oh, well, I bet a lot of people have this problem.
[00:11:32]
If you have that problem, then at least you know that one person not maybe has that problem.
[00:11:37]
One person actually definitely concretely has that problem.
[00:11:41]
You know that person very well.
[00:11:43]
You can talk to them anytime.
[00:11:45]
Too often.
[00:11:49]
Especially if you're in self isolation.
[00:11:52]
Just go to the bathroom, go to the mirror and say, what are your problems?
[00:11:57]
What are your needs?
[00:11:58]
What are your problems?
[00:11:59]
Tell me about your problem.
[00:12:00]
But that is such a great place to start to scratch your own itch.
[00:12:04]
Really, that's always where I try to start.
[00:12:07]
To be honest, with Elm GraphQL, I didn't actually start there, if I'm being honest.
[00:12:13]
How dare you?
[00:12:16]
Because I wasn't a GraphQL user at the time.
[00:12:19]
But I was thinking there needs to be something out there that bridges the gap between information about what types exist on the server and information about what types exist on the client.
[00:12:32]
And there were some things like Haskell Servant and projects like that.
[00:12:36]
But I just thought that GraphQL was a really great way to solve that problem.
[00:12:40]
And I wanted that in Elm.
[00:12:42]
I wanted to be able to do that.
[00:12:44]
And so I started learning about GraphQL and building this project.
[00:12:48]
But actually, this is probably a good thing to talk about because even though I didn't scratch my own itch per se,
[00:12:55]
there was this thing that I thought would be really exciting and I wanted to have.
[00:12:59]
I was very deliberate about solving real problems in the way that I approach it.
[00:13:04]
So we can talk a little bit about maybe that story because I think that might be good to walk through a concrete example of going and asking these questions.
[00:13:13]
What problem are you solving?
[00:13:14]
And how are you going to design it?
[00:13:15]
What's the vision?
[00:13:17]
So I think the first thing to point out in this particular story when I built Elm GraphQL, like I said, it wasn't directly a concrete problem that I was solving for myself.
[00:13:28]
But you knew the problem existed in other environments.
[00:13:32]
So you knew that the problem existed somewhere.
[00:13:35]
Yeah, I mean, it seemed pretty clear to me that it would be valuable.
[00:13:39]
I knew that there were packages out there for making GraphQL queries in Elm and building up a GraphQL query.
[00:13:47]
And I knew that it wasn't fully type safe, at least some of the ways that packages were approaching that problem.
[00:13:55]
And I wanted to have a type safe way to do that.
[00:13:58]
So I knew that was a real problem.
[00:13:59]
So I started with a problem that I knew that was going to provide value in some way.
[00:14:04]
And I kept myself honest about providing a valuable solution.
[00:14:08]
And one of the things that I did that helps keep me honest doing that also was I started with examples.
[00:14:14]
So you can go back in the commit logs and you can see in Elm GraphQL, which is a code generation library.
[00:14:20]
It uses code generation to give you a typed API for your GraphQL schema.
[00:14:25]
And the very first commits didn't have any sort of code generation.
[00:14:30]
I was creating that generated code by hand.
[00:14:33]
But what it did have is an examples folder.
[00:14:35]
That's the very first thing it had.
[00:14:37]
It had an examples folder.
[00:14:39]
And shortly after that, it had some unit tests.
[00:14:42]
And those things kept me honest about solving real world problems.
[00:14:46]
Because what it allowed me to do is have an examples folder and say, OK, how does this design look for solving this real problem?
[00:14:53]
What does the API look like?
[00:14:55]
And is this something I'd be proud to show off to the world and say, hey, here's this library.
[00:15:00]
Here's what it looks like.
[00:15:01]
Here's how you build a query.
[00:15:02]
And here are what the error messages look like.
[00:15:04]
If you build something that's not a valid GraphQL query.
[00:15:07]
So starting with the examples folder, I think is extremely important for keeping yourself honest.
[00:15:13]
You want to start with a problem.
[00:15:16]
You want to start with a real problem.
[00:15:17]
If you have that problem, great.
[00:15:20]
If you don't have that problem, be very careful.
[00:15:24]
Be very careful and really think about is this valuable?
[00:15:27]
Are you keeping yourself honest?
[00:15:29]
Are you keeping yourself accountable about solving a real problem?
[00:15:32]
But then once you've done that, start with an examples folder.
[00:15:35]
Like, seriously, build the examples folder before you build anything else.
[00:15:40]
Another thing that I do, I will actually change things in the examples folder before I change anything else.
[00:15:47]
So like with Elm GraphQL, I'll go into the examples folder.
[00:15:51]
Again, I'll change this code that's being generated by the code gen.
[00:15:55]
I'll change it by hand.
[00:15:56]
But first, I'll start with the examples folder and I'll say, what would I like this example to look like?
[00:16:00]
If there's a new feature I'm thinking about adding, I'll start by seeing if I can do it with the existing APIs.
[00:16:06]
I'll create an example in the examples folder that illustrates this functionality.
[00:16:10]
See if I can do it with existing APIs.
[00:16:12]
If I can't, then what would I like it to look like?
[00:16:16]
I'll just write it how I want the example to work.
[00:16:20]
And then I'll hand generate the code, see how it actually feels to do an end to end example.
[00:16:26]
And only then do I do the actual code generation part.
[00:16:29]
But you don't have to do code generation to publish packages.
[00:16:33]
That's right.
[00:16:34]
Plenty of other problems to solve.
[00:16:37]
Exactly.
[00:16:38]
Yeah.
[00:16:39]
The only reason I mentioned that I do the code generation part last is because it's an illustration of how important I think it is to start with examples.
[00:16:48]
Put examples before anything else, because you want that feedback of seeing how does it feel to use this API?
[00:16:54]
So another thing that helps you experience that feedback of how does it feel using this API is writing a test case.
[00:17:02]
And if you write a unit test with elm test, it's extremely valuable to write meaningful test cases, not just toy examples.
[00:17:10]
That helps keep you honest that you're solving real problems because it changes the way that your brain is processing what you're doing.
[00:17:20]
Because you're thinking in terms of concrete problems and value rather than just in the abstract thinking about this API.
[00:17:28]
Oh, yeah. And one more thing on that topic.
[00:17:31]
So there is a really great package called Elm verify examples by Stoffel.
[00:17:35]
And I highly recommend checking that out for building a package.
[00:17:39]
It's great because you can write your documentation comments for your Elm package docs and you can do a syntax where you have an Elm code snippet.
[00:17:47]
And then you show the return value and it will actually generate an Elm test for you from that code snippet and from the expected output.
[00:17:55]
And so it makes sure that your documentation examples are up to date.
[00:17:59]
Yeah, that's very, very useful. I haven't actually tried it out yet because it was a bit harder in my case for Elm review.
[00:18:07]
Yes. The same with Elm GraphQL.
[00:18:10]
It was tough for that. But if there's a package where you can clearly say, here's the simple setup, here's the output it gives you, you should definitely use it.
[00:18:18]
It's a no brainer.
[00:18:19]
Definitely agree. So we talked about finding a problem for you and for others.
[00:18:24]
We talked about dog fooding, dog feeding.
[00:18:27]
Yes.
[00:18:28]
To get feedback. So dog feedback.
[00:18:30]
Don't know if people see that.
[00:18:32]
I like it.
[00:18:34]
I like it too.
[00:18:35]
Let's go with that.
[00:18:36]
I would also say just go ask other people for feedback.
[00:18:40]
So just what you said before, hey, I have an idea.
[00:18:44]
And that's what people think about it.
[00:18:46]
And they will ask you, what is the problem that you're trying to solve?
[00:18:49]
Right.
[00:18:50]
And I think that very often people will tell you things that you did not expect.
[00:18:55]
And people will tell you this is not a problem that needs solving sometimes.
[00:19:01]
Especially when it's about solving boilerplate, for instance.
[00:19:06]
Right.
[00:19:07]
If you come talk to me about solving boilerplate, I will tell you that's not a problem.
[00:19:11]
Right.
[00:19:12]
It depends on the use case of the sleeper.
[00:19:14]
You know, another thing that happens when you go to a human being and you say, hey, can I talk to you about this API idea I have?
[00:19:24]
What do you think about it? Get feedback.
[00:19:26]
Ideally get feedback from someone who it might potentially be relevant to.
[00:19:30]
But really, it could just be anybody.
[00:19:33]
Because when you go through that exercise of putting the concept and the goals of the project into words,
[00:19:40]
that is a forcing function that will check to keep you honest about whether you actually have a clear concept and a clear goal in mind and a clear problem that you're solving.
[00:19:50]
If you can't describe that concisely to somebody, you need to go back to the drawing board and think about what problem are you solving
[00:19:58]
and what's unique about the way you're solving it?
[00:20:00]
What's the philosophy and the goal and the vision?
[00:20:03]
If you don't have a clear vision, it's okay.
[00:20:05]
It's not going to happen overnight.
[00:20:07]
But that's a good test.
[00:20:09]
If you're trying to explain to somebody what it does, why it's meaningful, what types of things it could be used to do that would be interesting.
[00:20:16]
If you can't do that concisely, if you can't have a good elevator pitch, then work on your elevator pitch because you're not going to end up with a really useful package.
[00:20:26]
You're going to be not using your time very effectively if you're doing that without having a clear vision first.
[00:20:32]
Yeah, the same thing happens with documentation.
[00:20:35]
If you start writing your documentation and you have trouble doing it, then maybe it's not the problem of you trying to write something,
[00:20:43]
but it's a problem of you not knowing what the problem is and what you're trying to solve.
[00:20:48]
Same happens with the API.
[00:20:51]
Not too long ago with Elm Review, I had an API that I needed to document and it was really hard.
[00:20:57]
It took me like two months to finish it.
[00:20:59]
But before I finished it, I found a new API that was much better and it was much easier to explain and to document.
[00:21:07]
So then you knew you were onto something.
[00:21:09]
Exactly.
[00:21:10]
Before I was like, yeah, it makes sense in my head, but it's just really hard to explain it.
[00:21:15]
And yeah, I was not onto something good.
[00:21:18]
Yeah, that process of just communicating your work, communicating the goal, communicating how you use it and why that's nice.
[00:21:27]
That's just part of the process of improving your design, improving your API.
[00:21:33]
Another thing I want to mention here is we talked about the importance of having an examples folder really right from the start.
[00:21:41]
People think in terms of examples, thinking in terms of examples keeps you honest about doing meaningful things.
[00:21:48]
Another thing I wanted to say on this topic is that you've only got a few seconds to get people's interest when they're looking at your package,
[00:21:55]
when they've taken the time out of their day to click to your package.
[00:21:59]
You've only got a few seconds to let them know that it's meaningful and relevant to them.
[00:22:04]
So use that time wisely.
[00:22:06]
And the very first thing people want to see is a code example.
[00:22:10]
So put code examples early and often in your documentation.
[00:22:14]
Put it right up front, front and center in your readme.
[00:22:18]
Maybe not the very first paragraph, but the second paragraph and sprinkle it throughout your documentation examples.
[00:22:28]
Even if it seems like overkill to include an example, just do it.
[00:22:32]
Just get in the habit of doing it. Use Elm Verify examples all over the place.
[00:22:36]
If you can just do it.
[00:22:38]
Trust me, people are not going to read actual words.
[00:22:42]
People will read words once they have been using something for a while and they need to understand something more thoroughly.
[00:22:49]
Once they're getting to a corner case and they need to understand something conceptually to get there.
[00:22:54]
Like, for example, Yaron, we did a live stream last week where we went through Elm Review, which was super fun by the way.
[00:23:01]
And really cool to go watch it. Take that for a spin.
[00:23:05]
Go watch it for sure. Yeah, we'll link to that.
[00:23:07]
And I was going through and setting up Elm Review for the first time. You were guiding me through that.
[00:23:13]
Are you going to criticize my work?
[00:23:16]
No, no, not quite the opposite.
[00:23:19]
Okay, go ahead then.
[00:23:21]
But I was able to figure it out before you guided me through a lot of the steps, which is great.
[00:23:29]
And a big part of the reason why is because there were examples.
[00:23:33]
Yeah, a lot of examples.
[00:23:35]
There are a lot of examples. I was clicking through to find something and there were a lot of words.
[00:23:42]
I appreciate that there were a lot of words, but I noticed as I was going through it, I didn't read a single one.
[00:23:48]
But I looked at examples and I know you put so much love into those words.
[00:23:53]
But when I'm going back to it and I'm trying to figure out, wait a minute, why can't I write this rule?
[00:23:58]
I'm trying to figure out like, I want to write this Elm Review rule and I'm getting stuck.
[00:24:03]
Then I'm going to go through and read every word in the package docs.
[00:24:06]
But when I'm first getting started or trying to figure out, do I want to use this package or trying to get set up, just trying it out, I'm not going to look at words.
[00:24:16]
I'm only going to look at examples. So put good examples in. It's the first thing people look at.
[00:24:20]
Yeah, if people know what they were looking for, then they will read more.
[00:24:25]
If they're just looking at the package, not knowing that you're solving a problem that they may have, then they're just going to skim through it and look at the examples.
[00:24:36]
Look at how it kind of looks, look at the big words and titles and that's it.
[00:24:43]
Yes. And if you have an example, it's in the right place and it's a concise example and it shows them what they need to know.
[00:24:52]
But it's, oh, this example and we're checking for Foo and Bar and Baz, not really going to help them.
[00:24:58]
You've got to make the examples meaningful because when they look at an example, they're going to look at an example, they're going to scan for what is this example doing and is this similar to what I want to do?
[00:25:10]
Oh, this is writing a rule to check if this is a valid regular expression.
[00:25:15]
That seems kind of similar to what I want to do. OK, so this is how you would solve that problem.
[00:25:20]
Don't just write examples, write examples of meaningful concrete problems.
[00:25:25]
Yeah, it takes time, but it's worth it. It's really useful to do that.
[00:25:29]
An image could also work instead of an example, like if you're designing a UI components or if you in the case of Elm Review, I display an image like that is the example output that you get from Elm Review that just communicates everything all at once.
[00:25:46]
So an example or an image that is very clear to the user, both will work.
[00:25:52]
Yes, you're right. That's in the same category of examples that people will scan through and understand what what it's going to do.
[00:25:59]
Yeah, I agree. OK, so also on this topic of should you write a package?
[00:26:05]
Richard Feldman gave this talk, this keynote at Oslo Elm Day.
[00:26:10]
The talk was a tour of the Elm Spa example.
[00:26:13]
Never, never, you'll never change my pronunciation.
[00:26:19]
Sorry, Arun. It's just so relaxing in Elm Spa.
[00:26:23]
Not to me.
[00:26:28]
But Richard goes through in that talk, he talks about a lot of really interesting things.
[00:26:32]
But one of the things he hits on is, OK, we can build these cool packages.
[00:26:37]
He talks about Luke Westby's HTTP builder package, which is a really cool package.
[00:26:43]
And Richard is saying, like, OK, this is a great package.
[00:26:47]
Pulling this package in nice, we can make HTTP requests in this way.
[00:26:52]
And that's nice and clean. But then he's saying, well, OK, but let's look at the source code.
[00:26:58]
There's not that much code here. And then let's think about what is this really buying me?
[00:27:04]
Well, it's giving me this nice syntax for building up HTTP requests.
[00:27:08]
But what if I had my own version of this custom tailored library that actually knew about my domain,
[00:27:14]
that actually knew about the endpoints that I can make in my HTTP?
[00:27:19]
That could be even simpler than what Luke's package does.
[00:27:23]
Exactly. It has an advantage over Luke's package because Luke doesn't know and Luke's package can't know what your code base can do.
[00:27:31]
It doesn't know the constraints of your code base. It doesn't know the type of how you send an auth token there.
[00:27:37]
So it just needs to expose this generalized way to add headers.
[00:27:42]
Whereas if you you could even if you wanted to copy paste that code into your own code base, make a nice module,
[00:27:49]
use the same nice API design techniques that Luke used.
[00:27:54]
But you have the advantage of building it for your domain and solving your specific problem. It's not that hard with Elm code.
[00:28:01]
A lot of the time I find with Elm it's it's actually not that hard to write something that I don't know in other languages.
[00:28:08]
I feel like I would be reaching for a package. Yeah.
[00:28:11]
But in Elm, just with this like nice functional style, it's so easy to just build up a nice, simple API.
[00:28:17]
So let's build this HTTP API for ourselves.
[00:28:21]
Let's give it this specific knowledge that, oh, every HTTP request is going to need this auth token or these particular routes don't need an auth token.
[00:28:31]
And so these are the routes you can make requests to without an auth token. Let's build that in.
[00:28:35]
It's also quite nice that all Elm packages are open source and they only contain Elm.
[00:28:41]
So you don't need to like an NPM packages. Sometimes you need to build C code or Rust code maybe.
[00:28:48]
Since it's all Elm code in this case, you can just copy paste it and make your project think it's its own code.
[00:28:54]
Yes. And then, yeah, you do. You adapt it to your own needs if you need to.
[00:28:58]
If you need to fork it, well, you don't need to fork it. You can copy paste it. That's easier.
[00:29:03]
Yeah, exactly. So this is something to think about if you're considering publishing a package.
[00:29:09]
Really think about should this be a package or maybe could this be a blog post where I share some pattern with people,
[00:29:15]
where I share a repository that shows an example of this, like the Elm Spa example.
[00:29:20]
Elm what?
[00:29:22]
You heard me.
[00:29:24]
Unfortunately.
[00:29:28]
Just keep that in mind. We're not saying don't publish your package, but this is the process.
[00:29:33]
These are the questions to go through.
[00:29:35]
Yeah, there's also one thing that I think Evan advises against is porting libraries.
[00:29:43]
So for instance, you have a Moment.js in JavaScript, which is great, which is very big, though, but in Elm that would not be a problem.
[00:29:53]
Yes.
[00:29:54]
But it's great in JavaScript.
[00:29:56]
Exactly.
[00:29:57]
Well, since it's JavaScript, it has a lot of problems. Like it can misuse things.
[00:30:02]
But in Elm, you can define a different API that prevents you from misusing the package.
[00:30:09]
You can give your users more guarantees than you can with the JavaScript package.
[00:30:14]
Exactly.
[00:30:15]
So that's one advice I would give and I think Evan does too, if I understood him correctly,
[00:30:21]
is try to make the API look Elm like in order to give all those guarantees and nice things that you get with Elm.
[00:30:31]
Also, there are obviously a few things that you can't do in Elm that you can do in JavaScript packages,
[00:30:37]
like things that can mutate it.
[00:30:39]
Right, right.
[00:30:40]
So a very well designed package for doing the types of things that Moment.js does in Elm is going to look very different than in JavaScript,
[00:30:48]
even though Moment.js is great to use in JavaScript.
[00:30:51]
Like in many cases, it's stringly typed, meaning you pass in strings and it has different behavior because you passed in a string with this format versus this format.
[00:31:01]
So Ryan Haskell Glotz has a nice package where he basically does this.
[00:31:05]
And actually, if you're trying to understand better what it means to, instead of just thinking of porting a library from JavaScript or another ecosystem into Elm,
[00:31:15]
rather rethinking what does that package look like in the context of Elm, I think this is a really good example to look at.
[00:31:23]
Look at the API that Ryan built.
[00:31:25]
It's really nice and simple and type safe and allows you to sort of build up nicely formatted dates with a type safe API with an API that leverages the strengths of Elm.
[00:31:36]
Yeah, when I see packages that say, this is a port of this library in that language, I skim through it way more than for other packages.
[00:31:48]
Right.
[00:31:49]
Because I feel like it won't have the same niceties as other good Elm packages.
[00:31:55]
I might be wrong, but it could also just be a communication problem from their parts.
[00:32:00]
Don't say it's a port of something.
[00:32:02]
Say it's a good package for dealing with dates or times.
[00:32:06]
Right.
[00:32:07]
I mean, in terms of the mindset, I think of Elm as a superpower, as an API designer, as a package author.
[00:32:14]
So take advantage of that superpower.
[00:32:16]
Like if you're Superman and you go buy a flight to Mexico, then it doesn't really make sense.
[00:32:23]
Buying a flight to Mexico might be a great idea for your spring break.
[00:32:27]
But if you're Superman, just fly there.
[00:32:30]
Use your superpowers.
[00:32:32]
Yeah.
[00:32:34]
It's cheaper too.
[00:32:36]
It's cheaper, more fun.
[00:32:38]
So when you start designing your API, what should you look out for?
[00:32:42]
So as I said just before, when you're working in Elm, you want to give guarantees to the user.
[00:32:49]
So that means applying constraints to your functions, having specific types as inputs,
[00:32:56]
specific types as outputs, and types that can only have certain amounts of values.
[00:33:01]
Yes.
[00:33:02]
Certain sets of values.
[00:33:04]
Exactly.
[00:33:05]
So you want all those guarantees.
[00:33:07]
Basically what you're trying to do is when you see a user, a way that a user can shut themselves in the foot, prevent that.
[00:33:15]
Yes.
[00:33:16]
Make impossible states impossible for your package users.
[00:33:18]
Exactly.
[00:33:19]
Yeah.
[00:33:20]
Yeah.
[00:33:21]
Yeah, I couldn't agree more.
[00:33:23]
I think as an API designer, even more than an Elm application author, it's really beneficial to understand these API design techniques and these advanced techniques.
[00:33:34]
And so Charlie Koster has a really nice blog post series where he talks about these advanced type techniques,
[00:33:41]
opaque types, extensible records, the never type phantom types.
[00:33:46]
I would recommend checking that out and making sure that you have a good grasp of these advanced API design techniques
[00:33:53]
if you're publishing a package because they come in handy for providing these guarantees and constraints for your users
[00:34:01]
that make your library more intuitive, more easy to use, less error prone.
[00:34:07]
And actually, another thing that allows you to do is it allows you to protect users from breaking API changes.
[00:34:14]
Yep.
[00:34:15]
Because you don't want to expose internals to users, not only because exposing internals can make it harder to verify certain constraints and give them guarantees,
[00:34:26]
but it also, so if you have a type alias for a record that you expose to users that has some internal data structure, maybe it's, I don't know,
[00:34:35]
let's say it's some data structure like a dictionary type thing, something like that.
[00:34:39]
You've got a package that has this nice data structure and you want to expose an API for users and you have a non opaque type.
[00:34:47]
You have a type alias for a record that has the internals or maybe it's just a custom type, but you expose the constructor for that custom type.
[00:34:55]
Oh no.
[00:34:57]
Don't do it. Don't do it.
[00:34:59]
It's going to cause a lot more breaking changes if you ever go back and change the implementation details,
[00:35:05]
if you change the name of a field in your internals or slightly change a type or have some, you know,
[00:35:12]
refactoring you're doing that the users shouldn't care about.
[00:35:15]
Basically anything you're going to have to do a breaking change.
[00:35:18]
So that's not to say that there could never be a reason to expose some detail like that, but really think carefully before you expose the internals like that.
[00:35:28]
Yeah, definitely.
[00:35:29]
And as you said, you remove constraints and guarantees like that.
[00:35:32]
So people can shit themselves in the foot again.
[00:35:36]
So those four advanced topics are, or techniques are very useful.
[00:35:41]
There are plenty of others.
[00:35:43]
They're not necessarily all that advanced like Opic types who already talked about it.
[00:35:49]
The never type is not that complicated.
[00:35:52]
And the other ones are not that complicated to either.
[00:35:55]
So calling them advances, making them look more complex than they are.
[00:36:00]
So definitely, definitely look at them.
[00:36:02]
Right. And it's a very creative process.
[00:36:05]
So another thing that's useful is just to pay attention to how other package authors solve problems.
[00:36:12]
You know, watch their talks, listen to how they talk about them.
[00:36:15]
In fact, I can link to some talks like Richard had a nice talk about the sort of evolution of Elm CSS and some design changes along the way.
[00:36:26]
But just listen to how people talk about their way of using types to solve problems, because that's one of the core design sensibilities that you bring to the Elm package authoring experience.
[00:36:38]
So pay attention to how other people do it, because it's really good to learn from other people.
[00:36:42]
Brian Hicks has also a nice talk where it's called Let's Publish Nice Packages.
[00:36:48]
And he goes through some of these techniques on kind of thinking about a package and what problem it solves and some of the things that we've talked about here.
[00:36:56]
So I definitely recommend checking that out.
[00:36:58]
And one of the things he talks about there, too, that I think is also super valuable is looking at prior art.
[00:37:04]
You know, we kind of talked about how you don't want to port packages directly and just verbatim do the exact same API as another ecosystem.
[00:37:12]
But you do want to look at how did they solve these problems?
[00:37:15]
How do different competing libraries in these other ecosystems approach this problem differently?
[00:37:20]
And what can you learn from that?
[00:37:23]
What do you want to do the same? What do you want to do differently?
[00:37:25]
Look at GitHub issues. What are people having problems with?
[00:37:28]
What design iteration?
[00:37:30]
Sometimes you can even get a peek into the design process in these other ecosystems.
[00:37:35]
I'm very often going in and looking at GitHub issues in Gatsby, JS and 11D and GridSum and these other frameworks for inspiration with Elm pages,
[00:37:46]
because it's a great shortcut to not having to go through some of the same problems, pain points and challenges that they did.
[00:37:54]
Also look at what other package authors care about.
[00:37:57]
So do they care about the boilerplate? Do they care about how verbose it will be?
[00:38:03]
How much errors you can avoid with it?
[00:38:06]
And go through the issues that are opened on their repositories, because you will see people asking for some features.
[00:38:16]
You will often see them say no, because this defeats that problem.
[00:38:20]
You will learn about a lot of tradeoffs that you will have to think about at some point.
[00:38:26]
Or you will not think about it and then you will regret it maybe.
[00:38:30]
Right, because it is kind of all about tradeoffs, isn't it?
[00:38:33]
Yeah.
[00:38:34]
And that's what makes it really challenging but really rewarding is you're kind of navigating through all these different tradeoffs and it's a balancing act.
[00:38:43]
And you've got to go with these decisions.
[00:38:45]
And so speaking of tradeoffs, that's why I think it's really valuable to have a clear vision.
[00:38:51]
Keep in mind, if you're building an Elm package or any package, you're not going to have the perfect solution to everything because it doesn't exist.
[00:38:59]
I remember one time I was in like a ski rental shop and somebody came in and he said, I want to get a really great snowboard.
[00:39:07]
And the person working at the store said, oh great, what kind of snowboard are you looking for?
[00:39:12]
Do you want an alpine board? Do you want a board that's good for tricks?
[00:39:16]
And the guy said, oh everything, I want the best at everything.
[00:39:21]
And they said, sir, that's not how it works.
[00:39:24]
You've got to pick the specialization because it's about tradeoffs.
[00:39:27]
If you have a board that's really good at alpine going as fast as possible, it's going to make it worse at doing tricks.
[00:39:35]
Yeah.
[00:39:36]
So as you said, they're tradeoffs.
[00:39:38]
Which means if you don't have a clear vision for which problems you're prioritizing, for which use cases are the core focus of the library,
[00:39:48]
and for which approach you're going to take, you're going to try to make every tradeoff and you're not going to do any of them successfully.
[00:39:56]
And you're not going to have fun.
[00:39:58]
And you're not going to have a good time.
[00:40:00]
So I find that the packages that I love the most are the ones that just have a clear vision and they say, yes, there are tradeoffs here,
[00:40:08]
but we have this value that we prioritize above other things.
[00:40:13]
And so this is the one making the decision.
[00:40:15]
And then you get this cohesive experience where, okay, above everything else, this thing needs to be type safe and this thing needs to be impossible.
[00:40:24]
And so maybe that has this other tradeoff that it's a little bit more verbose.
[00:40:29]
But we decided that you can't make invalid things with the type system.
[00:40:33]
And so we're going to make that tradeoff and be a little more verbose.
[00:40:36]
Yeah, just like the Elm language, there are a lot of things that it won't allow you to do, but you gain a lot from it.
[00:40:44]
So we talked a lot about documentation, so giving examples, explaining the problem, your solution.
[00:40:51]
Sometimes there are already a few packages out there that do the same thing as you, especially in the case of Elm GraphQL.
[00:40:58]
And also Elm Review with Elm Analyze.
[00:41:01]
And what is useful for users if they already know those packages is that you explain what the differences are between your solution, your package, and the other solutions.
[00:41:13]
And maybe that will tell them exactly what they want to know.
[00:41:17]
Like this does this this way, and it gives us this guarantee, this nice thing.
[00:41:23]
But it won't do this that the other package solves better or something like that.
[00:41:29]
So just like what you said before is every package has a vision.
[00:41:34]
Our package has this vision. Explain it.
[00:41:37]
Exactly. If one package author is making the equivalent of the downhill snowboard, then they're going to make it really good at going downhill.
[00:41:47]
And the other competing one is going to make it really good at doing tricks, and they're going to be making different choices and different trade offs and evolving in a different way.
[00:41:57]
And sure, there are some things that maybe they can both learn from each other and that's, you know, a win without a trade off.
[00:42:03]
But a lot of the time, the really big wins are wins that you have because you set a certain goal and set of values and you're willing to make trade offs in favor of that value to create a cohesive set of values.
[00:42:16]
A cohesive set of benefits that work well together. Yeah.
[00:42:19]
It also helps with the conversation because so really, this is a whole nother topic, but maintaining open source projects is challenging.
[00:42:28]
And one of the things that's most challenging is when you have feedback that's not a clear cut decision.
[00:42:35]
It happens often and it helps to be prepared for that by having a clear vision for your package and that clear vision allows you to sort of discuss the goals of the package that you've outlined rather than, I don't like that.
[00:42:50]
Yeah, your users won't like that.
[00:42:55]
It's not a trick. That's what's honest because a package has to sort of set a course and some things don't fit on that course.
[00:43:05]
And of course, the author who's sort of leading that vision has to make a certain set of trade offs that, you know, there's no objective this fits into that course or this doesn't.
[00:43:17]
But at least that helps set some sort of guide rails of what that course is going to look like.
[00:43:22]
And expectations too.
[00:43:23]
It helps to set expectations of what's in scope.
[00:43:26]
I outlined this and a lot of other things we've talked about here in this little GitHub repo that's just a read me sort of thing.
[00:43:35]
It's the idiomatic Elm package guide.
[00:43:37]
So we'll link to that in the show notes.
[00:43:39]
I used it for Elm review.
[00:43:40]
Oh, nice. How was it?
[00:43:41]
Along with Brian Nix's talk.
[00:43:43]
Nice.
[00:43:44]
And yeah, it was very useful.
[00:43:45]
Okay, good.
[00:43:46]
Well, feedback is welcome if there's anything that.
[00:43:49]
I don't remember it now because it's been too long, but it was useful.
[00:43:54]
Okay, good. Yeah. Yeah.
[00:43:56]
I mean, it kind of talks about some of these things and like, I don't know, some things that I've tried to do from experience with this kind of thing, like getting feedback from people and finding it really useful to have a vision that's stated at the very top.
[00:44:10]
And like Jeroen said, having a comparison to other packages and this package solves this problem in this way. It doesn't solve this problem. It doesn't take this philosophy.
[00:44:21]
If you're looking for that, maybe look at this package.
[00:44:23]
It's really nice to have that right up front.
[00:44:25]
Also, because if somebody is considering using your package, that's often the first thing they want to know.
[00:44:30]
And if you're the first one to solve this problem, you won't have to do that.
[00:44:34]
So be the first one.
[00:44:37]
Okay, so if somebody wants to get started building an Elm package, let's say they've gone through this process.
[00:44:43]
They've kind of talked to a friend or somebody in the community about their idea and they've been able to concisely explain it.
[00:44:52]
They've got kind of a vision. They've got a clear problem they're solving. They've gone through all these things and done their homework.
[00:44:58]
How do they actually put the pedal to the metal and publish a package?
[00:45:03]
Or they need to write it.
[00:45:05]
Well, yeah, there you go. Write the package, implement your idea.
[00:45:10]
You're going to have to iterate on it. You're going to have to go through all these things.
[00:45:13]
So along the way, and I kind of outlined some of the tools and kind of basic mechanics of it in that idiomatic Elm package guide.
[00:45:21]
I try to make that just a resource that hopefully makes it a little easier to discover those things because they're not very clearly documented.
[00:45:29]
Yeah, you need to know about those tools somehow.
[00:45:33]
You need to know some of those basic tools. Like if you do elm make dash dash docs, the compiler is going to actually look at your documentation
[00:45:42]
because you have these doc comments for Elm functions and Elm modules and Elm types.
[00:45:47]
And you have to have a doc comment for every exposed type and module and function.
[00:45:52]
So you will get the same errors if you try to do Elm publish.
[00:45:57]
But if you do Elm make dash dash docs before you try to publish, it will not be as frustrated as when you try to publish it.
[00:46:08]
Exactly. And it's good to think of docs as a first class citizen.
[00:46:12]
So Remy has this tool at DMY on the interwebs.
[00:46:16]
He has this cool tool called Elm doc preview. And it's really, really useful for package authors.
[00:46:22]
It allows you to you just run that on the command line and you can see your documentation and it live reloads as you update it, which is great.
[00:46:31]
Yeah, there's also an online version where you can see the docs of a package that has not been released yet or a version that has not been released yet.
[00:46:39]
So you can preview someone else's repo documentation.
[00:46:43]
Exactly. Which is a great thing to get feedback on.
[00:46:46]
And if you're trying to ask people for feedback, which I always try to do before a big release, it's nice to have sort of a clearly packaged set of documentation and examples for people to look at.
[00:46:58]
Because it takes a lot of time for people to sort of get context on something.
[00:47:01]
So you want them to be able to look at what's the API going to look like to give you feedback.
[00:47:05]
You don't just want to send them a link to a GitHub repo and say, try out these examples and look at this code.
[00:47:11]
Do we have to specify that you should have tests in your package?
[00:47:16]
Please write tests. Don't publish them. Please write. Don't publish them.
[00:47:21]
Don't publish your tests. Just test like in a regular Elm application.
[00:47:25]
You've got your test folder, you run those, set up a CI.
[00:47:28]
I can link to some examples of some GitHub actions that I use for my continuous integration tests in some Elm packages.
[00:47:36]
I also built this GitHub action that I published that helps you publish your Elm package because, I don't know, there's a little bit of a dance with doing the publish process for an Elm package where you say, publish this package.
[00:47:48]
And then it checks everything out. It sees if the documentation is all in order and if everything's ready to go.
[00:47:54]
And then if it is, it says, OK, great. But this isn't tagged on GitHub yet with the latest version.
[00:48:00]
So run these commands, tag it in GitHub, push everything up and then run Elm publish again.
[00:48:07]
And what I kind of want to do is I just want to bump my Elm package version.
[00:48:11]
So the Elm.JSON file will have a bumped version. You use just the Elm command line tool, Elm bump to do that.
[00:48:19]
Elm space bump. And then I just want to push that and I want it to run all of my unit tests, all of my end to end tests, all of my Elm verify examples.
[00:48:28]
Make sure the docs check out all of that. And then and only then do I want it to push up the git tag for the current release and publish the package.
[00:48:37]
And so the GitHub action that I created does exactly that.
[00:48:41]
It's not a process that is that tedious. So if it's your first time or if you're beginning, just try Elm publish and the Elm compiler will tell you what to do and it's just fine.
[00:48:52]
You're absolutely right. It's not it's not so much that it's tedious. It's just that I want my CI server to run all of my tests and checks before I go through the trouble of creating a git tag.
[00:49:05]
But you're absolutely right. When you're starting, just do it by hand. You'll you'll get the hang of it and then you can streamline it later.
[00:49:13]
All right. Well, hopefully that gives people a pretty good overview of how to get started or whether they should even get started publishing package.
[00:49:19]
And hopefully that gives you some things to look into some inspiration to maybe watch some talks and learn about the experiences of developing some APIs and how they've evolved for other package authors.
[00:49:31]
And we hope you have fun with it. Yeah. Publish a package. Let the community know about it.
[00:49:36]
There's a packages channel on Slack, by the way.
[00:49:40]
So any package that gets published new version or first version is sent over there. If you want spoilers, go there.
[00:49:51]
Yes, that's a cool channel. And there's also an API design channel on the Elm Slack.
[00:49:55]
And that's a great place to just get feedback about your package ideas.
[00:49:59]
And, you know, there are a lot of people who will chime in and sort of give their thoughts on on package design ideas there.
[00:50:04]
Yeah. API design or a lot of other channels. Just get feedback.
[00:50:08]
Yes. I think you will learn most by getting feedback, asking for feedback.
[00:50:14]
Dog feedback. Absolutely. Dog feedback. Dog feedback. Hashtag dog feedback.
[00:50:19]
That's a thing now. Please make it a thing. Make it a thing.
[00:50:23]
Tweet us at ElmLangRadio. Hashtag dog feedback.
[00:50:29]
OK. Well, have a nice day. You too. See you next time. See you next time.