Not ready to publish


#1

Hey, I have written a small libary to handle Http requests to API of todoist.com as I couldn’t find one that already existed. I want to use this in another small app that I am writing for myself. I have looked around and I think that I am supposed to publish the libary - but as I haven’t finished it completely yet and haven’t documented all of my functions, I figured I wouldn’t publish it for everyone to use yet.

Can someone please guide me in the direction of what I am supposed to do?


#2

If you plan to use it in an application, then you can include the src directory of your API as a source directory in the application elm.json, for instance

{
    "type": "application",
    "source-directories": [
        "src",
        "../elm-cff/src"
    ],

Here I include the src directory of my application, and the src directory of a package I’m working on.
You’ll have to manually install the packages dependencies, but otherwise this works very well.


#3

Thanks for the reply! I have tried this, but it didn’t work for me since the libary has dependencies that the application doesn’t have (In this case my libary uses Json.Decode.Pipeline and my application doesn’t). Importing the file from the libary will therefore give me a compile error due to the missing installation of Json.Decode.Pipeline in my main application even though it is only used in the libary.


#4

yes, so you need to install the package’s dependencies in your application as well.


#5

Yeah, it just seems like a bad solution to get a lot of direct dependencies that are actually indirect, but if this is the proper way to do it i will.
Thanks for your help :slight_smile:


#6

I can understand a reluctance to publish when something is not ready - but that is another option, just publish anyway.

I sometimes do this, as I figure nobody will care about my bad code or use the library, especially if I put a notice in the README saying its not really ready yet. On the other hand, someone may give some useful feedback on a poor API that might help me to get it up to standard. I think it doesn’t really matter if some obscure library gets to version 12.0.0 before its really ready.

Another advantages is that publishing forces you to write the docs, which can be useful housekeeping on the way to making a good package.

A final thought. If you publish something and later decide you actually wanted to make a really great 1.0.0 release so everyone thinks you are a genius who gets it right the first time, just publish again under a new name as 1.0.0 when you are ready.

Worth considering at any rate.


#7

This is actually what I ended up doing. Working around was annoying.
Thanks for the reply, I am really impressed by the elm community - will definitely be asking here again next time I run into trouble :smile:


#8

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.