Closed kipcole9 closed 1 year ago
I think this is fixed now. Would you consider taking taking it for a spin? You'll need to configure as:
def deps do
[
...
{:ex_cldr_routes, GitHub: "elixir-cldr/cldr_routes", branch: "verified_routes"},
...
]
end
I just tried your fix but when use the branch I get:
Because "your app" depends on "phoenix empty" which doesn't match any versions, version solving failed.
my-app-1 | ** (Mix) Hex dependency resolution failed
Never seen this error before.. maybe it's because we are still using Phoenix 1.6.16 but where is this "phoenix empty" coming from?
The error isn't great for sure. But that branch is also dependent on Phoenix ~> 1.7 so its probably the cause. Let me backport that commit to the main branch which supports Phoenix ~> 1.6 and you should be ok to try from there. Will add a comment here when that's done.
OK, I've back ported that change to the main branch so hopefully that will work for you (main doesn't include the verified routes support since that does require Phoenix ~> 1.7). Fingers crossed.
{:ex_cldr_routes, github: "elixir-cldr/cldr_routes"}
Dams, same issue:
Running mix do deps.get
my-app-1 | * Updating ex_cldr_routes (https://github.com/elixir-cldr/cldr_routes.git - origin/main)
my-app-1 | Resolving Hex dependencies...
my-app-1 | Resolution completed in 0.02s
my-app-1 | Because "your app" depends on "phoenix empty" which doesn't match any versions, version solving failed.
my-app-1 | ** (Mix) Hex dependency resolution failed
I will do some research to see if the problem exists on my end.
Are you running on the latest hex? Seems like a hex issue.
I'll publish a hex version now so you can run off that.
I've published ex_cldr_routes version 0.6.4 with the following changelog entry:
:as
option to correctly stringify atom names. Closes #14. Thanks to @krns for the report.Hope hex can resolve this for you!
Thank you for the release. The :as
option now works as expected with atoms, huge thanks!
However, I still have no idea why I cannot use branches of dependencies, but that doesn't seem to be a problem of the library - I'll do some research on that.
Very happy to hear you're up and running. Perhaps try mix local.hex
and see if there's an updated hex version available? I know the early in the hex 2.0 releases there were a few bugs (but I don't know enough to know if its related to your symptoms).
Good guess, but I'm already on the latest version 2.0.6.
We have the following LiveViews/folder structure:
article_live/index.ex
article_live/index.hmtl.heex
article_live/show.ex
article_live/show.hmtl.heex
In the router I specified the following routes:
For the index paths the following routes and helper functions are generated (because of our naming convention of the LiveViews):
Because I don't want to rename our LiveViews I tried to use the
as
options oflive/4
but the Cldr expects an binary value:When I change the option to
as: "article"
the Phoenix LiveView router expects an atom:With the new localized verified routes feature this will no longer be an issue as the route helpers will no longer be needed, but I think it would also be nice to make this configurable. Or maybe we need to revise our naming conventions after all...
What do you think?
_Originally posted by @krns in https://github.com/elixir-cldr/cldr_routes/issues/12#issuecomment-1525052829_