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

Add make_precompiler_downloader option #87

Merged
merged 1 commit into from
May 8, 2024

Conversation

bjyoungblood
Copy link
Contributor

Allows users to customize download behavior, such as adding HTTP
authentication or using an alternate protocol like SFTP.

cache_dir = "./cache"
System.put_env("ELIXIR_MAKE_CACHE_DIR", cache_dir)

Mix.Task.reenable("elixir_make.precompile")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to reenable it here again since we reenable on setup?

[
make_precompiler: {:nif, MyApp.Precompiler},
make_precompiler_url: "https://example.com/@{artefact_filename}",
make_precompile_downloader: MyApp.Downloader
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps it makes more sense to define this module on this file?

@josevalim
Copy link
Member

Looks good to me. Can you please rename the option to make_precompiler_download (notice the r). This will make it consistent with all others, thank you.

Allows users to customize download behavior, such as adding HTTP
authentication or using an alternate protocol like SFTP.
@bjyoungblood
Copy link
Contributor Author

Thanks for the review! I've updated the PR with your suggestions.

@josevalim josevalim merged commit 4ce33b5 into elixir-lang:master May 8, 2024
2 checks passed
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

@bjyoungblood bjyoungblood deleted the custom-downloader branch May 8, 2024 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants