I just wrote my first hex package and felt the experience was a bit less smooth than it could have been, because the mix.exs
in my generated project did not include the required/recommended values for a Hex project: description and package.{licenses,contributors,links}.
Would also have been nice for the README to get a boilerplate paragraph about how to install this lib as a dependency.
I wouldn't be surprised if some or all of these omissions are intentional with good reasons behind it, so I thought I'd ask before making a pull request.
If it is intentionally omitted, could it make sense to add some flag like mix new my_project --hex
that adds this stuff? I guess another option would be a separate command similar to mix phoenix.new , but if you need to install it separately, that would of course be a bit less convenient.
I'd love for the "my first hex" experience to be super smooth :)
--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/c7d912b4-beec-45d1-bf31-5afffa67f55c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
What is required to setup a hex page that is missing in mix.exs? The answer depends a lot on how much we can automate in the first place.
> Would also have been nice for the README to get a boilerplate paragraph about how to install this lib as a dependency.This is already part of Elixir 1.1. :)
--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/86361c9b-d8e7-417b-a3c0-d1ebe7c8aef9%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/20150905165020.2b5b17a8.eksperimental%40autistici.org.
If Hex can go without those fields, I wouldn't add them. I would prefer to have the minimum required than add boilerplate for many things the user does not need to worry about when they first look at it.
I would really like to avoid adding more options for something that will be as simple as adding:description: "",package: [...]to your mix.exs file. Generators are a learning tool and we must focus on what is the most important at first, they are not there to write all the code.
As someone who wrote my first hex package yesterday, I would have found that a much smoother experience. But if you feel generating that boilerplate is not the way to go, I think some tweaks to https://hex.pm/docs/publish could go a long way – it currently explains in words the nested package structure to add, for example, and the code examples is further down on the page, so I tried to parse that text before I even saw the code example. I'll try to get around to make a pull request to the docs if they're on GitHub.
--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/a297f1e8-d454-470d-8fd2-eaca01061b61%40googlegroups.com.
I don't want to add the package boilerplate to `mix new` because unlike all the other boilerplate generated we cannot give good defaults, they would just be empty strings. It would also make the missing fields warning Hex shows useless so we run an even greater risk of package authors not filling out the fields.
--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAL%2B%3DsuPJ07V9_W5eQRESraeo-ZNGsxkhWLGtRt1y7_-bkGifTQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAK%3D%2B-TvvQPHvH4y_Ag1FxfdJOGmODQFSgK1fDmoC5ZGTaAiuhw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAGAFNpnoW2O9y%3D350YcHok_qatyAuizYpPHaD1A%2B%3DsJj%2B8%3DKJg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/b4645f34-5307-4c46-9004-aa8abdb2b8ee%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4JDNu8dYOB_XdSeaP5Fr4frSbW7pFs_zSdogtg05qN0hA%40mail.gmail.com.
It still goes back to the previous concerns: I don't want to add more information to the mix.exs file.
One option is to put even more information in the README that would tell you how to publish the package or have hex.publish be a bit smarter: if you run "mix hex.publish" and there is no :package key, we could output some code samples and a bit more information on how to get it published.
--On Sat, Nov 21, 2015 at 8:15 PM, Henrik N <hen...@nyh.se> wrote:I've written a few Hex packages since I started this thread, and I keep finding it a bit inconvenient and developer-unfriendly that we're not helping out more with the metadata fields.--Here's a proposal that attempts to address the concerns that have been raised:* Make it a separate task from "mix new", e.g. "mix hex.new".That way, projects that aren't intended to become packages won't be cluttered. Anyone who doesn't know of the new task gets the current experience. Anyone who knows of it can get a better experience.* Have it add the Hex metadata fields, but commented out.That way, there's little risk of the default data being pushed to Hex.The values could be empty if people are concerned that trying to guess or provide common values would be a bad idea.Optionally:* By having a separate generation task, we could also help out more with the README. It currently says "If available in Hex", for example.What do you think?
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/b4645f34-5307-4c46-9004-aa8abdb2b8ee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to a topic in the Google Groups "elixir-lang-core" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elixir-lang-core/bA9fR19JRTc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4JDNu8dYOB_XdSeaP5Fr4frSbW7pFs_zSdogtg05qN0hA%40mail.gmail.com.