-
Notifications
You must be signed in to change notification settings - Fork 512
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
Solve circular require warning. #491
Solve circular require warning. #491
Conversation
See issue bkeepers#490.
@@ -4,7 +4,6 @@ | |||
return | |||
end | |||
|
|||
require "dotenv" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This require statement shouldn't be necessary since it is already required as the entrypoint of the gem. I suspect that it is still there from the time that Rails integration was a separate gem. Removing this gets rid of the warning in my app and does not seem to break the specs in the dotenv gem.
Thanks @martijnbolhuis! I'll get this released soon. |
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [dotenv-rails](https://github.com/bkeepers/dotenv) | `3.0.2` -> `3.1.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>bkeepers/dotenv (dotenv-rails)</summary> ### [`v3.1.0`](https://github.com/bkeepers/dotenv/blob/HEAD/Changelog.md#310) **What's Changed** - Fix regression with semantic-logger, allow setting custom logger by [@​bkeepers](https://github.com/bkeepers) in [https://github.com/bkeepers/dotenv/pull/494](https://github.com/bkeepers/dotenv/pull/494) ```ruby ``` ### [`v3.0.3`](https://github.com/bkeepers/dotenv/blob/HEAD/Changelog.md#303) [Compare Source](https://github.com/bkeepers/dotenv/compare/v3.0.2...v3.0.3) **What's Changed** - Solve circular require warning by [@​martijnbolhuis](https://github.com/martijnbolhuis) in [https://github.com/bkeepers/dotenv/pull/491](https://github.com/bkeepers/dotenv/pull/491) - Use tagged logger already configured on Rails by [@​kriansa](https://github.com/kriansa) in [https://github.com/bkeepers/dotenv/pull/489](https://github.com/bkeepers/dotenv/pull/489) - Fix exception on startup for Rails 7.1.0 by [@​bkeepers](https://github.com/bkeepers) and [@​zspencer](https://github.com/zspencer) in [https://github.com/bkeepers/dotenv/pull/492](https://github.com/bkeepers/dotenv/pull/492) **New Contributors** - [@​zspencer](https://github.com/zspencer) made their first contribution in [https://github.com/bkeepers/dotenv/pull/492](https://github.com/bkeepers/dotenv/pull/492) - [@​martijnbolhuis](https://github.com/martijnbolhuis) made their first contribution in [https://github.com/bkeepers/dotenv/pull/491](https://github.com/bkeepers/dotenv/pull/491) - [@​kriansa](https://github.com/kriansa) made their first contribution in [https://github.com/bkeepers/dotenv/pull/489](https://github.com/bkeepers/dotenv/pull/489) **Full Changelog**: bkeepers/dotenv@v3.0.2...v3.0.3 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/powerhome/power-web-development-interview). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMTIuMCIsInVwZGF0ZWRJblZlciI6IjM3LjIxMi4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Hi! This change caused me some issues, so I'll write it here in lack of a better place in case somebody comes across the same problem. It manifested as my test suite not being able to run because environment variables from The cause of events that lead to this issue is:
The reasoning is:
Unfortunately inside of
The end-result is that The fix for us is to adjust our Gemfile: gem "dotenv", require: %w[dotenv dotenv/rails] |
See issue #490.