Phoenix 1.7.0-rc.0 is out!

Thanks @kokolegorille. I tweaked my list of patterns and added:


and that did the trick. Cheers for the help.


@kokolegorille @shortlyportly

Thanks a lot was having the exact same problem on a fresh new project with no changes (modifying home.html.heex wasn’t updating the browser).

I thought it was because of some extension but even disabling all extensions wasn’t working.

I added the first line only of you snippet and it works.

Maybe it should be enabled by default in a new project?

I would say the first pattern match heex already ?!

Yes it seems to. At least it works with only the first line if I modify a .heex file.

But should this line be added to a default project? I think it should be?

It is probably a good candidate for a PR…

This should cover that:


Hum my dev.exs doesn’t seem to be the same. I have a (live/views)/.(.ex) line and a templates/.(.eex) line

There was already a PR, it has been approved and will be in the next release, I guess

Oh yes sorry didn’t check the GitHub link it was merged 7 days ago. Perfect :+1:

How to generate url query string with verfified routes? Somehow it is keeps complaining about stuff like this:

query_string = [
    context: "resume_onboarding",
    user_return_to: ~p"/onboarding/#{session}/#{highest_valid_step}"

   |> push_redirect(to: ~p"/users/login?#{query_string}")}
	"owner": "_generated_diagnostic_collection_name_#0",
	"severity": 8,
	"message": "(ArgumentError) expected query string param to be compile-time map or keyword list, got: \"/users/login?#{query_string}\"\n\nStacktrace:\n  │ (phoenix 1.7.0-rc.0) lib/phoenix/verified_routes.ex:625: Phoenix.VerifiedRoutes.raise_invalid_query/1\n  │ (phoenix 1.7.0-rc.0) lib/phoenix/verified_routes.ex:548: Phoenix.VerifiedRoutes.verify_segment/3\n  │ (phoenix 1.7.0-rc.0) lib/phoenix/verified_routes.ex:714: Phoenix.VerifiedRoutes.rewrite_path/4\n  │ (phoenix 1.7.0-rc.0) lib/phoenix/verified_routes.ex:700: Phoenix.VerifiedRoutes.build_route/5\n  │ (phoenix 1.7.0-rc.0) expanding macro: Phoenix.VerifiedRoutes.sigil_p/2\n  │ lib/myapp_web/live/onboarding/new.ex:51: MyAppWeb.OnboardingLive.New.mount/3\n  │ (elixir 1.14.1) expanding macro: Kernel.|>/2\n  │ lib/myapp_web/live/onboarding/new.ex:51: MyAppWeb.OnboardingLive.New.mount/3",
	"source": "Elixir",
	"startLineNumber": 1,
	"startColumn": 1,
	"endLineNumber": 1,
	"endColumn": 1

dynamic query interpolations work, so can you provide the complete example and complete stacktrace? We’re missing something here to say what’s going on. Thanks!

Using the input component from the new core_components.ex module instead of your text_input should work like a charm (with just a bit of rewrite) :

1 Like

Ok sorry, I was already little tired while writing. This seems to be more an issue of vscode + ElixirLS extension. The app compiles and works as expected. But this issue always pops up in Problems / Output tabs in vscode. Anyway the stacktrace is the following:

== Compilation error in file lib/myapp_web/live/onboarding/new.ex ==
** (ArgumentError) expected query string param to be compile-time map or keyword list, got: "/users/login?#{query_string}"
    (phoenix 1.7.0-rc.0) lib/phoenix/verified_routes.ex:625: Phoenix.VerifiedRoutes.raise_invalid_query/1
    (phoenix 1.7.0-rc.0) lib/phoenix/verified_routes.ex:548: Phoenix.VerifiedRoutes.verify_segment/3
    (phoenix 1.7.0-rc.0) lib/phoenix/verified_routes.ex:714: Phoenix.VerifiedRoutes.rewrite_path/4
    (phoenix 1.7.0-rc.0) lib/phoenix/verified_routes.ex:700: Phoenix.VerifiedRoutes.build_route/5
    (phoenix 1.7.0-rc.0) expanding macro: Phoenix.VerifiedRoutes.sigil_p/2
    lib/myapp_web/live/onboarding/new.ex:51: MyAppWeb.OnboardingLive.New.mount/3
    (elixir 1.14.1) expanding macro: Kernel.|>/2
    lib/myapp_web/live/onboarding/new.ex:51: MyAppWeb.OnboardingLive.New.mount/3

FYI for 1.6, under FreeBSD I was never able to get the tailwind CLI working. Has anyone with FreeBSD tried this new release yet?

Tailwindcli is not build for FreeBSD (see here). The elixir tooling just fetches prebuild binaries from there by default. Configuring it with a custom path if you build the cli on your own should work.

Maybe the target selection could be adjusted though to detect running on freebsd:

1 Like

When I tried to add phx_live_storybook dependency to Phoenix 1.7 rc1, I got these compilation errors, along with few warnings.

== Compilation error in file lib/phx_live_storybook/live/error_view.ex ==
** (CompileError) lib/phx_live_storybook/live/error_view.ex:2: module Phoenix.View is not loaded and could not be found. This may be happening because the module you are trying to load directly or indirectly depends on the current module
    (elixir 1.14.0) expanding macro: Kernel.use/2
    lib/phx_live_storybook/live/error_view.ex:2: PhxLiveStorybook.ErrorView (module)
    expanding macro: PhxLiveStorybook.Web.__using__/1
    lib/phx_live_storybook/live/error_view.ex:2: PhxLiveStorybook.ErrorView (module)
    (elixir 1.14.0) expanding macro: Kernel.use/2
could not compile dependency :phx_live_storybook, "mix compile" failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile phx_live_storybook", update it with "mix deps.update phx_live_storybook" or clean it with "mix deps.clean phx_live_storybook"

Thanks, yes, I installed 1.7 and I can create a new site with and run it with phx.server with no errors, but there’s no page being served, just a “cannot connect” error in the browser. That’s going to be a show stopper for most BSD users when it comes to trying out the framework. I’m at a point where I’m still learning how these javascript bundlers / packagers work, so it’s not something that I can fix.

Are You trying to open in another machine?

If so You would need to modify config/dev.exs and allow binding on instead of

I’m familiar with that step, so no that wasn’t the issue. I should have checked the logs - I think there are logs, I’ve seen references to the logger - but I’ve already deleted the project and gone back to 1.6.

Did anyone try creating a new project with Phoenix 1.7 RC1 and adding authentication with the non-liveview option [Y,n] → n?

While when I select liveview everything works fine, in the non liveview case I get errors at the user registration phase already:

no “new” html template defined for CpartWeb.UserSessionHTML

However, in the generated code, there is a template at lib/cpart_web/controllers/user_registration_html/new.html.heex (automatically generated).

Moreover, I get a warning in VSCode regarding BCrypt but only for the non-liveview option.