7
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

mix hex.retireした話(Elixir)

7
Last updated at Posted at 2020-10-04

はじめに

  • lwwsxというLivedoor Weather Web Service(LWWS)のAPIをラップした(だけの)Hexをなんでもやってみようの精神で公開していました
  • 残念なことに、Livedoor Weather Web Service(LWWS)は2020年7月31日(金)14:00にサービス終了となっておりまして、lwwsxの公開を停止しようとおもって調べたことややったことを書いておきます
  • まずは公開をしないことには始まらないのですが、そこは公式のPublishing a packageをご参照くださいませ

調べたこと

  • FAQCan packages be removed from the repository?の項がありました

Instead of unpublishing we recommend to instead retire a package or release. This should be done if the maintainers no longer recommend its use, because it does not work, has security issues, been deprecated or any other reason. A package is retired with the mix hex.retire task. A retired package will still be resolvable and fetchable but users of the package will get a warning a message and the website will show the release as retired.

  • mix hex.retireを使えばよさそうです
  • ヘルプをみてみます
$ mix help hex.retire

                                 mix hex.retire                                 

Retires a package version.

    mix hex.retire PACKAGE VERSION REASON
    
    mix hex.retire PACKAGE VERSION --unretire

Mark a package as retired when you no longer recommend it's usage. A retired
package is still resolvable and usable but it will be flagged as retired in the
repository and a message will be displayed to users when they use the package.

## Retirement reasons

  • renamed - The package has been renamed, including the new package name
    in the message
  • deprecated - The package has been deprecated, if there's a replacing
    package include it in the message
  • security - There are security issues with this package
  • invalid - The package is invalid, for example it does not compile
    correctly
  • other - Any other reason not included above, clarify the reason in the
    message

## Command line options

  • --message "MESSAGE" - Required message (up to 140 characters)
    clarifying the retirement reason
  • --organization ORGANIZATION - Set this for private packages belonging
    to an organization

ふむふむこんな感じかな

$ mix hex.retire lwwsx 0.1.2 invalid --message "Livedoor Weather Web Service(LWWS) is no longer available.

$ mix hex.retire lwwsx 0.1.1 invalid --message "Livedoor Weather Web Service(LWWS) is no longer available.

$ mix hex.retire lwwsx 0.1.0 invalid --message "Livedoor Weather Web Service(LWWS) is no longer available.

スクリーンショット 2020-10-04 14.59.38.png

retiredしているHexdeps.getするとどうなる?

$ mix new hello_lwwsx
mix.exs
  defp deps do
    [
      {:lwwsx, "~> 0.1.2"}
    ]
  end
$ cd hello_lwwsx
$ mix deps.get
Resolving Hex dependencies...
Dependency resolution completed:
New:
  certifi 2.5.2
  hackney 1.16.0
  httpoison 1.7.0
  idna 6.0.1
  jason 1.2.2
  lwwsx 0.1.2 RETIRED!
    (invalid) Livedoor Weather Web Service(LWWS) is no longer available.
  metrics 1.0.1
  mimerl 1.2.0
  parse_trans 3.3.0
  ssl_verify_fun 1.1.6
  unicode_util_compat 0.5.0
  • こんなふうになるのね
    • RETIRED!

Wrapping Up

  • mix deps.getしたときになにかメッセージがでていないかはみておいたほうがよさそうですね
  • Enjoy !!! :fire::rocket::rocket::rocket:
7
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?