Skip to content
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

Search path is already supported by parameters option #729

Merged
merged 2 commits into from
Feb 2, 2025

Conversation

greg-rychlewski
Copy link
Member

A while ago we added a search_path option to start_link. But looking closer I saw it was already supported by the parameters option.

I think we have to continue letting people use search_path so their apps don't break. But internally I'm changing it to re-use parameters so that we don't send an extra query unnecessarily on startup.

@josevalim
Copy link
Member

Let's deprecate the one at the root then? And tell them to use parameters? :)

@greg-rychlewski
Copy link
Member Author

@josevalim Does this look ok? I saw we used logger.warning instead of io.warn for the recent ssl deprecation so I did the same here.

@greg-rychlewski greg-rychlewski merged commit 34a57fe into elixir-ecto:master Feb 2, 2025
9 checks passed
@greg-rychlewski greg-rychlewski deleted the search_path_fix branch February 2, 2025 14:05
@greg-rychlewski
Copy link
Member Author

@josevalim I should have asked this a while ago. I see that IO.warn can be useful for compilation warnings and getting the stack trace. For runtime errors is there any reason to use IO.warn instead of Logger.warning?

@josevalim
Copy link
Member

Yes, IO.warn would be preferred for this style of warnings in general, since it also works with --warnings-as-errors, but in this case it doesn't matter much because it by definition happens outside of compilation, since we are starting processes. Both are fine IMO.

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