bitwalker / timex

A complete date/time library for Elixir projects.
https://hexdocs.pm/timex
MIT License
1.76k stars 379 forks source link

There is an issue with Tzdata 2024b - Produces the following error: #760

Open kairos0ne opened 2 months ago

kairos0ne commented 2 months ago

Steps to reproduce

Install Timex {:timex, "~> 3.0"},

Description of issue

There is a compile time error due to fault in Tzdata 2024b that can seen here: https://github.com/lau/tzdata/issues/143

image
ian-darby commented 1 month ago

I'm also seeing this with each deploy of our phoenix app.

acrogenesis commented 1 month ago

A fix has been merged in tzdata https://github.com/lau/tzdata/pull/146

acrogenesis commented 1 month ago

adding tzdata using git to the mix.exs solves the issue.

defp devs do
  [
    {:timex, "~> 3.7"},
    {:tzdata, git: "git@github.com:lau/tzdata.git", override: true}
  ]
end
avishov commented 1 month ago

adding tzdata using git to the mix.exs solves the issue.

defp devs do
  [
    {:timex, "~> 3.7"},
    {:tzdata, git: "git@github.com:lau/tzdata.git", override: true}
  ]
end

FYI This throws an error in my project

* Updating tzdata (git@github.com:lau/tzdata.git)
no such identity: /Users/DK/.ssh/cd: No such file or directory
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
** (Mix) Command "git --git-dir=.git fetch --force --quiet --progress" failed

Using {:tzdata, git: "https://github.com/lau/tzdata.git", override: true} instead works 👌

❯ mix deps.get
* Updating tzdata (https://github.com/lau/tzdata.git)
Resolving Hex dependencies...
Resolution completed in 1.083s
acrogenesis commented 1 month ago

@avishov When using git@github.com it uses ssh to authenticate to GitHub that's why it's failing as it isn't finding a ssh key to use.

jschaeff commented 1 month ago

Lib tzdata got bumped to fix this issue (https://github.com/lau/tzdata/releases/tag/v1.1.2)

See issue https://github.com/lau/tzdata/issues/143