Skip to content

feat: Igniter install task #82

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

ken-kost
Copy link
Contributor

@ken-kost ken-kost commented Apr 4, 2025

#80

@ken-kost ken-kost marked this pull request as ready for review April 5, 2025 15:16
@ken-kost ken-kost force-pushed the feat-igniter-install-task branch 2 times, most recently from 13250c8 to 5155233 Compare April 5, 2025 15:36
Copy link
Owner

@BartOtten BartOtten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is solid work! Enjoyed reviewing it.

Only comments are due to the rapid development of the USAGE guide and SimpleLocale. Propose to leave it as is for after v1.2 when the dust of Localization has settled.

defp create_routex_backend(igniter, web_module) do
module = Module.concat(web_module, "RoutexBackend")

Igniter.Project.Module.create_module(igniter, module, """
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Needs update after the default config is determined.
  2. Maybe we can extract the default config and use it at this place and in the USAGE guide?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added plug :routex but not sure what you mean by this?

@ken-kost ken-kost requested a review from BartOtten April 8, 2025 18:52
@ken-kost ken-kost force-pushed the feat-igniter-install-task branch from 60fc234 to 5d53143 Compare April 8, 2025 19:37
@ken-kost ken-kost force-pushed the feat-igniter-install-task branch from 5d05a7e to f6548f4 Compare April 12, 2025 10:36
@ken-kost
Copy link
Contributor Author

Error:      test/mix/tasks/routex.install_test.exs:6
     ** (Mix.Error) Phoenix installer is not available. Please install it before proceeding:

       mix archive.install hex phx_new


     code: |> phx_test_project()

CI gives this error but it passes on my machine 🤔 Not sure what's missing, is it because phoenix is not explicit in deps and is fetched through some optional one.?

@ken-kost
Copy link
Contributor Author

Also I'm doing some documentation for igniter currently and there by learning to use igniter better, so I'll probably have some improvements for this soon. 👍

@BartOtten
Copy link
Owner

BartOtten commented Apr 27, 2025

We have some more to fix upfront as Inflex, dependency of Igniter, is not compatible with the upcoming Elixir. It uses regex in module attributes which is not allowed anymore.

= Compilation error in file lib/inflex/pluralize.ex ==
** (ArgumentError) cannot inject attribute @singular into function/macro because cannot escape #Reference<0.3344448465.2030698499.56741>. The supported values are: lists, tuples, maps, atoms, numbers, bitstrings, PIDs and remote functions in the format &Mod.fun/arity
    (elixir 1.19.0-dev) lib/kernel.ex:3791: Kernel.do_at_escape/2
    (elixir 1.19.0-dev) expanding macro: Kernel.@/1
    lib/inflex/pluralize.ex:179: Inflex.Pluralize.singularize/1

@ken-kost ken-kost force-pushed the feat-igniter-install-task branch from efbb00b to e2d57f0 Compare April 27, 2025 17:24
@ken-kost
Copy link
Contributor Author

@BartOtten How do I reproduce this? I downloaded 1.19 and compiled igniter; it worked. 🤔 Also tried iex -S mix

@BartOtten
Copy link
Owner

@BartOtten How do I reproduce this? I downloaded 1.19 and compiled igniter; it worked. 🤔 Also tried iex -S mix

Using Erlang/OTP 28 RC? I think that is the major differentiator as Erlang itself seems to have switched to a new regex model. Can wait a while though, as installing Erlang 28 will be much easier once it is final.

@ken-kost
Copy link
Contributor Author

I couldn't get hex working on new erlang version 😅 Wojtek said

Hey Kip, we will fix it by the time OTP 28 is out, hopefully much sooner. The problem is we precompile Hex for given Elixir version and the oldest supported OTP for that Elixir version. So you are probably running Hex compiled against OTP 25 on OTP 28 and they aren’t compatible. We will be precompiling Hex per OTP version going forward and it will fixed.

So I guess it will be fixed. 🤞

@BartOtten
Copy link
Owner

For learning purpose only (aka. not to rush you): https://github.com/BartOtten/routex/blob/main/.github/workflows/elixir.yml

There you can see how the pipeline uses a new rebar and hex. I didn't know how to test early Erlang/Elixir releases before so I learned along the way last week :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants