elixir-cldr / cldr_routes

Localised routes and path helpers for Phoenix applications
Other
14 stars 6 forks source link

Phx1.7-dev: Update Route.exprs #11

Closed rubas closed 1 year ago

rubas commented 1 year ago

Related to https://github.com/elixir-cldr/cldr_routes/issues/10

This fixes the compile issue, but we still have to test the route helpers and the new p sigil and find a backwards-compatible solution.

rubas commented 1 year ago

As long as the route helpers are not de-activated, it looks like it works.

You can disable router helpers by passing the helpers: false option to use Phoenix.Router.

kipcole9 commented 1 year ago

@rubas thanks for diving into this. I have a strategy to support localized verified routes but I haven't tackled it yet (and clearly not tested on Phoenix 1.7!

My normal strategy would be to bump the :phoenix dependency for :cldr_routes to be "~> 1.7" for situations like this. Trying to make each release backwards compatible becomes a nightmare. Do you think that will be workable for this case?

rubas commented 1 year ago

My normal strategy would be to bump the :phoenix dependency for :cldr_routes to be "~> 1.7" for situations like this?

For sure. This always works.

kipcole9 commented 1 year ago

I’ll happily merge this now that the Phoenix release is out. Will you in-draft it?

rubas commented 1 year ago

Phoenix release is out

1.7 is still in dev, isn't it? I expect first a -rc version, if we are closer to the release.

kipcole9 commented 1 year ago

I will work on localised verified routes this weekend now that the RC is out. Thank for the contribution and encouragement, it helps a lot.

ry-TU commented 1 year ago

@kipcole9 first of all thanks for your hard work generally for cldr, given Phoenix 1.7 is already out is there any chance we can publish a release to get the fix? Is there anything missing or we can help with to get this released?

kipcole9 commented 1 year ago

@ry-TU Apologies for being very slow on this lib. @rubas has been gently pushing me too and I think the version on the main branch is ready to test against with Phoenix 1.7. I published 1.0 to hex but despite my test suite, it simply didn't work well with a real Phoenix app. So for now, please use ex_cldr_routes directly from Github until we're all confident its working correctly.

# in mix.exs
def deps do
  [
    ...
    {:ex_cldr_routes, github: "elixir-cldr/cldr_routes"}
  ]
end
rubas commented 1 year ago

@ry-TU We just switched over the github version and slowly converting everything to ~q. Looks good so far.

@kipcole9 ❤️ 🧡 💚

kipcole9 commented 1 year ago

I've published ex_cldr_routes version 1.1.0.