fix: compile before search_docs HTTP lookups in mix projects#72
Closed
serpent213 wants to merge 1 commit into
Closed
fix: compile before search_docs HTTP lookups in mix projects#72serpent213 wants to merge 1 commit into
serpent213 wants to merge 1 commit into
Conversation
Contributor
Author
|
Or might it break workflows in case the project does not compile...? |
Contributor
|
Yeah this wouldn't be ideal to compile. We could however do an ensure loaded on the ssl module specifically? |
Contributor
Author
|
Will experiment some more... 👍🏻 |
When usage_rules.search_docs was invoked directly as a Mix task inside a project, the HTTPS request path could fail before the docs lookup ran with:
** (UndefinedFunctionError) function :ssl.versions/0 is undefined
The failure site is in Mint's SSL transport setup, but the behavior pointed more strongly at the direct Mix task boot path than at a general Req/Mint/OTP SSL problem. The same logic worked via mix run, and forcing a compile also avoided the crash, which suggested the task needed proper project loadpath setup before starting Req.
Use Mix loadpaths bootstrapping here instead of forcing mix compile. That keeps the HTTP client startup on the normal Mix project loadpath path while avoiding a regression where search_docs would fail early in projects that do not currently compile cleanly.
This keeps the fix scoped to task startup and avoids papering over the issue by explicitly starting :ssl or requiring a full project compile before an online docs search can run.
Contributor
Author
|
Definitely a heisenbug. Closing for now to avoid noise. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Does not seem to hurt, and solved my issue in a complex Mix setup. See commit message for details.
Contributor checklist
Leave anything that you believe does not apply unchecked.