thawke

thawke

Hello,

I recently started getting this error when compiling ash. I moved the project that was complaining to /src on my machine and it will compile there, however as I update the versions of Ash in my other projects I keep getting error below. I don’t think the folder prefix /home/tanner/src/file-manager/server is absurdly long. The problem starts happening in {:ash, "== 3.5.2"}, the projects will happily compile in 3.5.1, 3.5.0 and 3.4.X versions without getting moved.

I’m running on Linux Mint 22.1, I get the same error on WSL Ubuntu.

** (EXIT from #PID<0.95.0>) an exception was raised:
    ** (File.Error) could not write to file "/home/tanner/src/file-manager/server/_build/dev/lib/ash/ebin/Elixir.Ash.Domain.Dsl.Resources.Resource.Resources.Definitions.Define.Resources.Definitions.CustomInputs.CustomInput.Resources.Definitions.CustomInputs.Transform.Transform.beam": file name too long
        (elixir 1.18.1) lib/file.ex:1144: File.write!/3
        (elixir 1.18.1) lib/kernel/parallel_compiler.ex:332: anonymous fn/3 in Kernel.ParallelCompiler.write_module_binaries/3
        (elixir 1.18.1) lib/enum.ex:1276: anonymous fn/3 in Enum.flat_map/2
        (stdlib 6.2) maps.erl:860: :maps.fold_1/4
        (elixir 1.18.1) lib/enum.ex:2558: Enum.flat_map/2
        (elixir 1.18.1) lib/kernel/parallel_compiler.ex:264: Kernel.ParallelCompiler.spawn_workers/3
        (mix 1.18.1) lib/mix/compilers/elixir.ex:1079: anonymous fn/9 in Mix.Compilers.Elixir.compiler_loop/6

Showing Posts 1 to 10

D4no0

D4no0

Since you mentioned WSL, you are using windows as your main OS?

Windows is known for having nested folder size limitations, some of them you can overcome by overriding specific registry entries, but there is still a hard limit. I think the first thing to check is that the path to the WSL volumes is not long, you might want to keep it as short as possible.

zachdaniel

zachdaniel

Creator of Ash

@thawke spark is our underlying DSL builder tool, and it creates modules under the hood. It was creating unnecessarily long module names. Can you try main of spark via {:spark, "ash-project/spark", override: true} and LMK if that helps?

thawke

thawke OP

@D4no0 My main OS is Linux Mint 22.1, however I have encryptfs on my home directory which does cut out some available path length. WSL I’m assuming has the same issue due to Windows path limitations.

@zachdaniel Using :ash 3.5.6, :ash_postgres 2.5.16, :ash_cloak 0.1.6 and {:spark, git: "https://github.com/ash-project/spark", override: true} I still get the really long name Elixir.Ash.Domain.Dsl.Resources.Resource.Resources.DefineCalculation.Resources.CustomInputs.CustomInput.Resources.CustomInputs.Transform.Transform.beam

zachdaniel

zachdaniel

Creator of Ash

:thinking: what SHA is locked for spark in your mix.lock file? Might be worth checking again w/ mix deps.update spark just to be sure you’re on latest. I was able to confirm the long module names were gone for me. Its possible we missed a case, just want to make sure I’m not going on a wild goose chase.

thawke

thawke OP

spark in the mix.lock file is "spark": {:git, "https://github.com/ash-project/spark", "2ea8dd6d2e9d9e1f1bd129af88da1a23ea885b02", []} which looks like it’s the latest commit on master.

If I run mix new test_project and set in mix.exs:

  defp deps do
    [
      {:ash, "== 3.5.6"},
      {:spark, git: "https://github.com/ash-project/spark", override: true}
    ]
  end

and run mix deps.get and mix deps.compile I still get Ash.Domain.Dsl.Resources.Resource.Resources.DefineCalculation.Resources.CustomInputs.CustomInput.Resources.CustomInputs.Transform.Transform.Options printed which writes to Elixir.Ash.Domain.Dsl.Resources.Resource.Resources.DefineCalculation.Resources.CustomInputs.CustomInput.Resources.CustomInputs.Transform.Transform.Options.beam

I reproduced the above on Windows, Mint and WSL, all running elixir 18.x.

zachdaniel

zachdaniel

Creator of Ash

What happens if you rm -rf _build and recompile?

zachdaniel

zachdaniel

Creator of Ash

nvm, I reproduced it, you’re right :slight_smile:

zachdaniel

zachdaniel

Creator of Ash

Okay, try again :smiley:

thawke

thawke OP

Latest version works well! (spark module at commit 64e384b) Thanks for your time, much appreciated.

zachdaniel

zachdaniel

Creator of Ash

Fix published on hex as version 2.2.52

— All posts loaded —

Where Next? Top

Trending in Questions Top

Blokh
Hey guys, I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly Do you guys have any suggestions what is the best prac...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
Onor.io
I have what I’ve heard referred to as a “lookup table” in my database. This is a way of assigning codes to common values. One common lo...
New
Trolleger
What approach to take when sending live updates to “random” users Hi! I have a question, I have a little chat app, and when I create a DM...
New
matt-savvy
Anyone here using Honeybadger? My Honeybadger account is being overwhelmed with noise from some bots. Seeing a lot of Bandit.HTTPError...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New

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
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge &amp; 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
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews