all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#67877] [PATCH 0/7] Enable Elixir packages that depend on Erlang packages to build
@ 2023-12-18 13:02 Pierre-Henry Fröhring
  2023-12-18 14:49 ` Liliana Marie Prikler
  0 siblings, 1 reply; 3+ messages in thread
From: Pierre-Henry Fröhring @ 2023-12-18 13:02 UTC (permalink / raw)
  To: 67877; +Cc: Liliana Marie Prikler

Hello lylip,

It's great to see progress!

I suggest the next objective is to enable Elixir packages that depend on Erlang
packages to build. For instance, the Elixir package [telemetry_metrics] depends on the
Erlang telemetry package and is a dependency of the Elixir Phoenix package.

While reviewing the code of the Rebar build system, we noticed the use of the
[skip_deps] Rebar flag, which is ignored by Rebar:
┌────
│ $ guix shell rebar3 -- rebar3 help compile
│ […]
│   -d, --deps_only  Only compile dependencies, no project apps will be
│                    built.
└────

So, to build Elixir packages that depend on Erlang, the necessary steps inlcude:
1) Updating the Rebar build system to align with the current usages of Rebar.
2) Allowing Elixir to access Erlang compiled libraries as discussed in [issue 66801].

If the following plan is agreed upon, then we will have an Elixir package that
depends on an Erlang package to build, specifically `telemetry_metrics'. Patches in the
series will have these objectives:

1. ☐ Update the Rebar build system to align with the current usages of Rebar.
2. ☐ Update the Erlang build system to install libraries under `lib/erlang/X.Y' as discussed in issue 66801.
3. ☐ Update the Erlang package so that `GUIX_ERL_LIBS' gather all libraries installed under `lib/erlang/X.Y'.
4. ☐ Update the Erlang package to wrap its binaires so that they have access to
   compiled libraries represented by `GUIX_ERL_LIBS'.
5. ☐ Add the Erlang Telemetry package.
6. ☐ Update the Elixir package so that it has access to Erlang packages represented by `GUIX_ERL_LIBS'.
7. ☐ Add the Elixir package `telemetry_metrics'.

If the corresponding patch series is merged, additional packages (whether Erlang,
Elixir, or other types) will be incorporated until Phoenix package builds.

What do you think of this plan?

–
Regards,
phf


[telemetry_metrics] <https://hex.pm/packages/telemetry_metrics>

[skip_deps] <https://git.savannah.gnu.org/cgit/guix.git/tree/guix/build-system/rebar.scm?id=f410d49eb24db4eecae054dfe136464bc92ba8a3#n103>

[issue 66801] <https://issues.guix.gnu.org/66801#75>




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [bug#67877] [PATCH 0/7] Enable Elixir packages that depend on Erlang packages to build
  2023-12-18 13:02 [bug#67877] [PATCH 0/7] Enable Elixir packages that depend on Erlang packages to build Pierre-Henry Fröhring
@ 2023-12-18 14:49 ` Liliana Marie Prikler
  2023-12-20 10:57   ` Pierre-Henry Fröhring
  0 siblings, 1 reply; 3+ messages in thread
From: Liliana Marie Prikler @ 2023-12-18 14:49 UTC (permalink / raw)
  To: contact, 67877

Am Montag, dem 18.12.2023 um 14:02 +0100 schrieb Pierre-Henry Fröhring:
> Hello lylip,
> 
> It's great to see progress!
> 
> I suggest the next objective is to enable Elixir packages that depend
> on Erlang packages to build. For instance, the Elixir package
> [telemetry_metrics] depends on the Erlang telemetry package and is a
> dependency of the Elixir Phoenix package.
> 
> While reviewing the code of the Rebar build system, we noticed the
> use of the [skip_deps] Rebar flag, which is ignored by Rebar:
> ┌────
> │ $ guix shell rebar3 -- rebar3 help compile
> │ […]
> │   -d, --deps_only  Only compile dependencies, no project apps will
> be
> │                    built.
> └────
> 
> So, to build Elixir packages that depend on Erlang, the necessary
> steps inlcude:
> 1) Updating the Rebar build system to align with the current usages
> of Rebar.
> 2) Allowing Elixir to access Erlang compiled libraries as discussed
> in [issue 66801].
> 
> If the following plan is agreed upon, then we will have an Elixir
> package that depends on an Erlang package to build, specifically
> `telemetry_metrics'. Patches in the series will have these
> objectives:
> 
> 1. ☐ Update the Rebar build system to align with the current usages
> of Rebar.
> 2. ☐ Update the Erlang build system to install libraries under
> `lib/erlang/X.Y' as discussed in issue 66801.
> 3. ☐ Update the Erlang package so that `GUIX_ERL_LIBS' gather all
> libraries installed under `lib/erlang/X.Y'.
> 4. ☐ Update the Erlang package to wrap its binaires so that they have
> access to
>    compiled libraries represented by `GUIX_ERL_LIBS'.
> 5. ☐ Add the Erlang Telemetry package.
> 6. ☐ Update the Elixir package so that it has access to Erlang
> packages represented by `GUIX_ERL_LIBS'.
> 7. ☐ Add the Elixir package `telemetry_metrics'.
> 
> If the corresponding patch series is merged, additional packages
> (whether Erlang, Elixir, or other types) will be incorporated until
> Phoenix package builds.
> 
> What do you think of this plan?
Since we typically disable phoning home (including telemetry), I don't
think having a telemetry package in Guix would be good optics :)
Perhaps you can think of another example package but still follow the
steps laid out above?

Cheers




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [bug#67877] [PATCH 0/7] Enable Elixir packages that depend on Erlang packages to build
  2023-12-18 14:49 ` Liliana Marie Prikler
@ 2023-12-20 10:57   ` Pierre-Henry Fröhring
  0 siblings, 0 replies; 3+ messages in thread
From: Pierre-Henry Fröhring @ 2023-12-20 10:57 UTC (permalink / raw)
  To: Liliana Marie Prikler; +Cc: 67877

Dear lylip,

> Perhaps you can think of another example package but still follow the
> steps laid out above?

The [yaml_elixir] package should fit the bill as it calls [yamerl]. I have
got everything working here. I am in the process of crafting the various
patches. I have written a literate programming implementation of the rebar
build system to document the reasoning for future references. The code in
the post actually runs. Could you please review the reasoning? I will add
your remarks to the post.  Here is the post:

<https://phfrohring.com/867329cb-afbd-49d7-9c5c-f36ac07cd62c.html>

Thank you.

--

Regards,

-- phf


[yaml_elixir] <https://hex.pm/packages/yaml_elixir>

[yamerl] <https://hex.pm/packages/yamerl>




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-12-20 11:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-18 13:02 [bug#67877] [PATCH 0/7] Enable Elixir packages that depend on Erlang packages to build Pierre-Henry Fröhring
2023-12-18 14:49 ` Liliana Marie Prikler
2023-12-20 10:57   ` Pierre-Henry Fröhring

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.