Elixir

Elixir

Elixir Core Team

1. Bug fixes

Logger

  • [Logger.Translator] Fix logger crash when :gen_statem’s format_status/2 returns non-tuple

Mix

  • [mix deps.get] Fix regression when fetching a git repository with a :ref
  • [mix release] Validate RELEASE_MODE and set ERRORLEVEL on .bat scripts
  • [mix release] Fix invalid example in code comment inside the generated vm.args.eex

Showing Posts 13 to 4

rhcarvalho

rhcarvalho

I’m sorry it took me some time to understand what the regression was.

Here’s a PR: Bring back support for Git :ref and :depth used together by rhcarvalho · Pull Request #13713 · elixir-lang/elixir · GitHub, I think we can move the conversation there.

Thanks, @josevalim :purple_heart:

josevalim

josevalim

Creator of Elixir

Exactly. We cannot fetch the short ref, with or without the depth option. Perhaps we can change the message and say that it requires the full ref with depth (instead of disallowing it). Do you want to submit a PR?

rhcarvalho

rhcarvalho

Short ref (error) and full ref (ok):

root@214431fdf2a5:/app# iex
Erlang/OTP 27 [erts-15.0] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit:ns]

Interactive Elixir (1.17.1) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> Mix.install [{:flame, github: "phoenixframework/flame", ref: "4600277"}]
* Getting flame (https://github.com/phoenixframework/flame.git - 4600277)
fatal: couldn't find remote ref 4600277
** (Mix.Error) Command "git --git-dir=.git fetch --force --quiet --progress origin 4600277" failed
    (mix 1.17.1) lib/mix.ex:588: Mix.raise/2
    (mix 1.17.1) lib/mix/scm/git.ex:136: Mix.SCM.Git.checkout/2
    (elixir 1.17.1) lib/file.ex:1665: File.cd!/2
    (mix 1.17.1) lib/mix/dep/fetcher.ex:64: Mix.Dep.Fetcher.do_fetch/3
    (mix 1.17.1) lib/mix/dep/converger.ex:238: Mix.Dep.Converger.all/9
    (mix 1.17.1) lib/mix/dep/converger.ex:170: Mix.Dep.Converger.init_all/8
    (mix 1.17.1) lib/mix/dep/converger.ex:110: Mix.Dep.Converger.all/4
    iex:1: (file)
iex(1)> Mix.install [{:flame, github: "phoenixframework/flame", ref: "46002774775fa5be947a970d7ff5aeefc0dd6707"}]
* Getting flame (https://github.com/phoenixframework/flame.git - 46002774775fa5be947a970d7ff5aeefc0dd6707)
remote: Enumerating objects: 767, done.        
remote: Counting objects: 100% (257/257), done.        
remote: Compressing objects: 100% (90/90), done.        
remote: Total 767 (delta 206), reused 181 (delta 164), pack-reused 510        
...
==> flame
Compiling 13 files (.ex)
Generated flame app
:ok

With full ref and depth:

root@214431fdf2a5:/app# iex
Erlang/OTP 27 [erts-15.0] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit:ns]

Interactive Elixir (1.17.1) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> Mix.install [{:flame, github: "phoenixframework/flame", ref: "46002774775fa5be947a970d7ff5aeefc0dd6707", depth: 1}]
* Getting flame (https://github.com/phoenixframework/flame.git - 46002774775fa5be947a970d7ff5aeefc0dd6707)
remote: Enumerating objects: 38, done.        
remote: Counting objects: 100% (38/38), done.        
remote: Compressing objects: 100% (32/32), done.        
remote: Total 38 (delta 0), reused 17 (delta 0), pack-reused 0        
Resolving Hex dependencies...
Resolution completed in 0.053s
...
==> flame
Compiling 13 files (.ex)
Generated flame app
:ok
rhcarvalho

rhcarvalho

This is not even using :depth :slight_smile:

Maybe the problem is just the ref itself!

rhcarvalho

rhcarvalho

Did you try the full ref? 46002774775fa5be947a970d7ff5aeefc0dd6707

josevalim

josevalim

Creator of Elixir
iex(1)> Mix.install [{:flame, github: "phoenixframework/flame", ref: "4600277"}]
* Getting flame (https://github.com/phoenixframework/flame.git - 4600277)
fatal: couldn't find remote ref 4600277
** (Mix.Error) Command "git --git-dir=.git fetch --force --quiet --progress origin 4600277" failed
    (mix 1.17.2) lib/mix.ex:588: Mix.raise/2
rhcarvalho

rhcarvalho

Do you have an error report somewhere? What was the error message from mix deps.get / Git?

josevalim

josevalim

Creator of Elixir

git version 2.39.3 (Apple Git-145), so theoretically it is not the git version, unless the Apple Git has modifications.

rhcarvalho

rhcarvalho

In the Debian bookworm container from above:

$ git --version
git version 2.39.2

What is the version where cloning flame fails?

josevalim

josevalim

Creator of Elixir

What is your git --version?

The issue was that Mix.install [{:flame, github: "phoenixframework/flame", ref: "4600277"}] was not working on v1.17.

Where Next? Top

Trending in News Top

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews