advent-of-code-elixir-starter
advent-of-code-elixir-starter copied to clipboard
Config is not loaded
Using the default code, even if I uncomment the allow_network?: true
line in config.exs or by creating secrets.exs, mix d01.p1
still errors:
$ mix d01.p1
Compiling 1 file (.ex)
** (RuntimeError) Cache miss for day 1 of year 2020 and `:allow_network?` is not `true`
lib/advent_of_code/input.ex:28: AdventOfCode.Input.get!/2
lib/mix/tasks/d01.p1.ex:8: Mix.Tasks.D01.P1.run/1
(mix) lib/mix/task.ex:331: Mix.Task.run_task/3
(mix) lib/mix/cli.ex:79: Mix.CLI.run_task/2
Can you try copying this file from my advent of code repo and seeing if that works? if it does feel free to replace the file in this repo with that file and open a PR (I can do that if you don't want to do it 😄).
https://github.com/mhanberg/advent-of-code/blob/main/2020/lib/advent_of_code/input.ex
that seems to be already what I'm using. Or are there any differences?
I am not sure, but I use mine and it works so that’s why I’m asking you to try it out.
On Sat, Dec 12, 2020, at 2:58 AM, Chan Kwan Yin wrote:
that seems to be already what I'm using. Or are there any differences?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mhanberg/advent-of-code-elixir-starter/issues/5#issuecomment-743720598, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKEUECNEXLU2HKJF3CRMRTSUMPBVANCNFSM4UUTZN3Q.
I ran into this issue. I had forgotten to include use Mix.Config
at the top of my config/secrets.exs file. It was failing silently without it.